2 * Empire - A multi-player, client/server Internet based war game.
3 * Copyright (C) 1986-2007, Dave Pare, Jeff Bailey, Thomas Ruschak,
4 * Ken Stevens, Steve McClure
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 * See files README, COPYING and CREDITS in the root of the source
23 * tree for related information and legal notices. It is expected
24 * that future projects/authors will amend these files as needed.
28 * sysdep_w32.h: system dependent support for WIN32 environments
30 * Known contributors to this file:
31 * Ron Koenderink, 2007
40 extern int getopt(int, char * const[], const char *);
42 extern int optind, opterr, optopt;
45 typedef int __w64 ssize_t;
59 void (*sa_handler)(int sig);
62 extern int w32_recv(int socket, char *buffer,
63 size_t buf_size, int flags);
64 extern int w32_send(int socket, char *buffer,
65 size_t buf_size, int flags);
66 extern int w32_close_socket(int fd);
67 extern int w32_socket(int family, int sock_type, int protocol);
68 extern int w32_connect(int sock, struct sockaddr *addr, int addrlen);
69 extern int w32_close_handle(int fd);
70 extern ssize_t w32_readv_handle(int fd, const struct iovec *iov,
72 extern ssize_t w32_writev_socket(int fd, const struct iovec *iov,
74 extern int w32_createfd(const char *fname, int oflag, ...);
75 extern int w32_openhandle(const char *fname, int oflag);
77 extern struct passwd *w32_getpw(void);
78 extern char *getpass(char *prompt);
79 extern void sysdep_init(void);
81 #define recv(sock, buffer, buf_size, flags) \
82 w32_recv((sock), (buffer), (buf_size), (flags))
83 #define socket(family, sock_type, protocol) \
84 w32_socket((family), (sock_type), (protocol))
85 #define connect(sock, addr, addrlen) \
86 w32_connect((sock), (addr), (addrlen))
88 #define pclose _pclose
90 #define snprintf _snprintf
91 #define getsose() ((void)0)
92 #define putso() ((void)0)
93 #define putse() ((void)0)
94 #endif /* sysdef_w32.h */