Revision 379ff53d slirp/slirp.h

b/slirp/slirp.h
11 11
#include "config.h"
12 12
#include "slirp_config.h"
13 13

  
14
#ifdef _WIN32
15
# include <inttypes.h>
16

  
17
typedef uint8_t u_int8_t;
18
typedef uint16_t u_int16_t;
19
typedef uint32_t u_int32_t;
20
typedef uint64_t u_int64_t;
21
typedef char *caddr_t;
22

  
23
# include <winsock2.h>
24
# include <sys/timeb.h>
25
# include <iphlpapi.h>
26

  
27
# define EWOULDBLOCK WSAEWOULDBLOCK
28
# define EINPROGRESS WSAEINPROGRESS
29
# define ENOTCONN WSAENOTCONN
30
# define EHOSTUNREACH WSAEHOSTUNREACH
31
# define ENETUNREACH WSAENETUNREACH
32
# define ECONNREFUSED WSAECONNREFUSED
33
#else
34
# define ioctlsocket ioctl
35
# define closesocket(s) close(s)
36
#endif
37

  
14 38
#include <sys/types.h>
15 39
#ifdef HAVE_SYS_BITYPES_H
16 40
# include <sys/bitypes.h>
......
79 103
# include <strings.h>
80 104
#endif
81 105

  
106
#ifndef _WIN32
82 107
#include <sys/uio.h>
108
#endif
83 109

  
84 110
#ifndef _P
85 111
#ifndef NO_PROTOTYPES
......
89 115
#endif
90 116
#endif
91 117

  
118
#ifndef _WIN32
92 119
#include <netinet/in.h>
93 120
#include <arpa/inet.h>
121
#endif
94 122

  
95 123
#ifdef GETTIMEOFDAY_ONE_ARG
96 124
#define gettimeofday(x, y) gettimeofday(x)
......
119 147
#ifdef HAVE_SYS_SIGNAL_H
120 148
# include <sys/signal.h>
121 149
#endif
150
#ifndef _WIN32
122 151
#include <sys/socket.h>
152
#endif
123 153

  
124 154
#if defined(HAVE_SYS_IOCTL_H)
125 155
# include <sys/ioctl.h>
......
232 262
 inline void remque_32 _P((void *));
233 263
#endif
234 264

  
235
#include <pwd.h>
265
#ifndef _WIN32
236 266
#include <netdb.h>
267
#endif
237 268

  
238 269
#define DEFAULT_BAUD 115200
239 270

  
......
292 323
#define MAX_MRU 16384
293 324
#endif
294 325

  
326
#ifndef _WIN32
327
#define min(x,y) ((x) < (y) ? (x) : (y))
328
#define max(x,y) ((x) > (y) ? (x) : (y))
329
#endif
330

  
295 331
#endif

Also available in: Unified diff