2
This file is part of PlibC.
3
(C) 2005, 2006, 2007, 2008 Nils Durner (and other contributing authors)
5
This library is free software; you can redistribute it and/or
6
modify it under the terms of the GNU Lesser General Public
7
License as published by the Free Software Foundation; either
8
version 2.1 of the License, or (at your option) any later version.
10
This library is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
Lesser General Public License for more details.
15
You should have received a copy of the GNU Lesser General Public
16
License along with this library; if not, write to the Free Software
17
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
* @file include/plibc.h
23
* @attention This file is usually not installed under Unix,
24
* so ship it with your application
25
* @version $Revision: 1.46 $
2
This file is part of PlibC.
3
(C) 2005, 2006, 2007, 2008 Nils Durner (and other contributing authors)
5
This library is free software; you can redistribute it and/or
6
modify it under the terms of the GNU Lesser General Public
7
License as published by the Free Software Foundation; either
8
version 2.1 of the License, or (at your option) any later version.
10
This library is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
Lesser General Public License for more details.
15
You should have received a copy of the GNU Lesser General Public
16
License along with this library; if not, write to the Free Software
17
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22
* @file include/plibc.h
24
* @attention This file is usually not installed under Unix,
25
* so ship it with your application
26
* @version $Revision: 1.46 $
45
#define HAVE_PLIBC_FD 0
57
#include <sys/types.h>
63
#define __BYTE_ORDER BYTE_ORDER
64
#define __BIG_ENDIAN BIG_ENDIAN
66
/* Conflicts with our definitions */
69
/* Convert LARGE_INTEGER to double */
70
#define Li2Double(x) ((double)((x).HighPart) * 4.294967296E9 + \
71
(double)((x).LowPart))
76
#define int64_t long long
99
#define WEXITSTATUS(status) (((status) & 0xff00) >> 8)
102
/* Thanks to the Cygwin project */
103
#define ENOCSI 43 /* No CSI structure available */
104
#define EL2HLT 44 /* Level 2 halted */
106
#define EDEADLK 45 /* Deadlock condition */
109
#define ENOLCK 46 /* No record locks available */
111
#define EBADE 50 /* Invalid exchange */
112
#define EBADR 51 /* Invalid request descriptor */
113
#define EXFULL 52 /* Exchange full */
114
#define ENOANO 53 /* No anode */
115
#define EBADRQC 54 /* Invalid request code */
116
#define EBADSLT 55 /* Invalid slot */
118
#define EDEADLOCK EDEADLK /* File locking deadlock error */
120
#define EBFONT 57 /* Bad font file fmt */
121
#define ENOSTR 60 /* Device not a stream */
122
#define ENODATA 61 /* No data (for no delay io) */
123
#define ETIME 62 /* Timer expired */
124
#define ENOSR 63 /* Out of streams resources */
125
#define ENONET 64 /* Machine is not on the network */
126
#define ENOPKG 65 /* Package not installed */
127
#define EREMOTE 66 /* The object is remote */
128
#define ENOLINK 67 /* The link has been severed */
129
#define EADV 68 /* Advertise error */
130
#define ESRMNT 69 /* Srmount error */
131
#define ECOMM 70 /* Communication error on send */
132
#define EPROTO 71 /* Protocol error */
133
#define EMULTIHOP 74 /* Multihop attempted */
134
#define ELBIN 75 /* Inode is remote (not really error) */
135
#define EDOTDOT 76 /* Cross mount point (not really error) */
136
#define EBADMSG 77 /* Trying to read unreadable message */
137
#define ENOTUNIQ 80 /* Given log. name not unique */
138
#define EBADFD 81 /* f.d. invalid for this operation */
139
#define EREMCHG 82 /* Remote address changed */
140
#define ELIBACC 83 /* Can't access a needed shared lib */
141
#define ELIBBAD 84 /* Accessing a corrupted shared lib */
142
#define ELIBSCN 85 /* .lib section in a.out corrupted */
143
#define ELIBMAX 86 /* Attempting to link in too many libs */
144
#define ELIBEXEC 87 /* Attempting to exec a shared library */
146
#define ENOSYS 88 /* Function not implemented */
148
#define ENMFILE 89 /* No more files */
150
#define ENOTEMPTY 90 /* Directory not empty */
153
#define ENAMETOOLONG 91 /* File or path name too long */
155
#define ELOOP 92 /* Too many symbolic links */
156
#define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */
157
#define EPFNOSUPPORT 96 /* Protocol family not supported */
158
#define ECONNRESET 104 /* Connection reset by peer */
159
#define ENOBUFS 105 /* No buffer space available */
160
#define EAFNOSUPPORT 106 /* Address family not supported by protocol family */
161
#define EPROTOTYPE 107 /* Protocol wrong type for socket */
162
#define ENOTSOCK 108 /* Socket operation on non-socket */
163
#define ENOPROTOOPT 109 /* Protocol not available */
164
#define ESHUTDOWN 110 /* Can't send after socket shutdown */
165
#define ECONNREFUSED 111 /* Connection refused */
166
#define EADDRINUSE 112 /* Address already in use */
167
#define ECONNABORTED 113 /* Connection aborted */
168
#define ENETUNREACH 114 /* Network is unreachable */
169
#define ENETDOWN 115 /* Network interface is not configured */
171
#define ETIMEDOUT 116 /* Connection timed out */
173
#define EHOSTDOWN 117 /* Host is down */
174
#define EHOSTUNREACH 118 /* Host is unreachable */
175
#define EINPROGRESS 119 /* Connection already in progress */
176
#define EALREADY 120 /* Socket already connected */
177
#define EDESTADDRREQ 121 /* Destination address required */
178
#define EMSGSIZE 122 /* Message too long */
179
#define EPROTONOSUPPORT 123 /* Unknown protocol */
180
#define ESOCKTNOSUPPORT 124 /* Socket type not supported */
181
#define EADDRNOTAVAIL 125 /* Address not available */
182
#define ENETRESET 126 /* Connection aborted by network */
183
#define EISCONN 127 /* Socket is already connected */
184
#define ENOTCONN 128 /* Socket is not connected */
185
#define ETOOMANYREFS 129 /* Too many references: cannot splice */
186
#define EPROCLIM 130 /* Too many processes */
187
#define EUSERS 131 /* Too many users */
188
#define EDQUOT 132 /* Disk quota exceeded */
189
#define ESTALE 133 /* Unknown error */
191
#define ENOTSUP 134 /* Not supported */
193
#define ENOMEDIUM 135 /* No medium (in tape drive) */
194
#define ENOSHARE 136 /* No such host or network path */
195
#define ECASECLASH 137 /* Filename exists with different case */
196
#define EWOULDBLOCK EAGAIN /* Operation would block */
197
#define EOVERFLOW 139 /* Value too large for defined data type */
199
#undef HOST_NOT_FOUND
200
#define HOST_NOT_FOUND 1
204
#define NO_RECOVERY 3
208
#define PROT_READ 0x1
209
#define PROT_WRITE 0x2
210
#define MAP_SHARED 0x1
211
#define MAP_PRIVATE 0x2 /* unsupported */
212
#define MAP_FIXED 0x10
213
#define MAP_FAILED ((void *)-1)
217
long f_type; /* type of filesystem (see below) */
218
long f_bsize; /* optimal transfer block size */
219
long f_blocks; /* total data blocks in file system */
220
long f_bfree; /* free blocks in fs */
221
long f_bavail; /* free blocks avail to non-superuser */
222
long f_files; /* total file nodes in file system */
223
long f_ffree; /* free file nodes in fs */
224
long f_fsid; /* file system id */
225
long f_namelen; /* maximum length of filenames */
226
long f_spare[6]; /* spare for later */
229
/* Taken from the Wine project <http://www.winehq.org>
230
/wine/include/winternl.h */
231
enum SYSTEM_INFORMATION_CLASS
233
SystemBasicInformation = 0,
235
SystemPerformanceInformation = 2,
236
SystemTimeOfDayInformation = 3, /* was SystemTimeInformation */
238
SystemProcessInformation = 5,
241
SystemProcessorPerformanceInformation = 8,
244
SystemDriverInformation,
254
SystemCacheInformation,
256
SystemInterruptInformation = 23,
257
SystemExceptionInformation = 33,
258
SystemRegistryQuotaInformation = 37,
259
SystemLookasideInformation = 45
264
LARGE_INTEGER IdleTime;
265
LARGE_INTEGER KernelTime;
266
LARGE_INTEGER UserTime;
267
LARGE_INTEGER Reserved1[2];
269
} SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION;
271
#define sleep(secs) (Sleep(secs * 1000))
273
/*********************** statfs *****************************/
274
/* fake block size */
275
#define FAKED_BLOCK_SIZE 512
277
/* linux-compatible values for fs type */
278
#define MSDOS_SUPER_MAGIC 0x4d44
279
#define NTFS_SUPER_MAGIC 0x5346544E
281
/*********************** End of statfs ***********************/
283
#define SHUT_RDWR SD_BOTH
285
/* Operations for flock() */
286
#define LOCK_SH 1 /* shared lock */
287
#define LOCK_EX 2 /* exclusive lock */
288
#define LOCK_NB 4 /* or'd with one of the above to prevent
290
#define LOCK_UN 8 /* remove lock */
292
/* Not supported under MinGW */
305
#define SHUT_WR SD_SEND
306
#define SHUT_RD SD_RECEIVE
307
#define SHUT_RDWR SD_BOTH
309
#define SetErrnoFromWinError(e) _SetErrnoFromWinError(e, __FILE__, __LINE__)
311
BOOL _plibc_CreateShortcut (const char *pszSrc, const char *pszDest);
312
BOOL _plibc_DereferenceShortcut (char *pszShortcut);
313
char *plibc_ChooseDir (char *pszTitle, unsigned long ulFlags);
314
char *plibc_ChooseFile (char *pszTitle, unsigned long ulFlags);
315
long QueryRegistry (HKEY hMainKey, char *pszKey, char *pszSubKey,
316
char *pszBuffer, long *pdLength);
318
BOOL __win_IsHandleMarkedAsBlocking (SOCKET hHandle);
319
void __win_SetHandleBlockingMode (SOCKET s, BOOL bBlocking);
320
void __win_DiscardHandleBlockingMode (SOCKET s);
321
int _win_isSocketValid (int s);
322
int plibc_conv_to_win_path (const char *pszUnix, char *pszWindows);
323
unsigned plibc_get_handle_count ();
325
typedef void (*TPanicProc) (int, char *);
326
void plibc_set_panic_proc (TPanicProc proc);
328
int flock (int fd, int operation);
329
int fsync (int fildes);
330
int inet_pton (int af, const char *src, void *dst);
331
int inet_pton4 (const char *src, u_char * dst, int pton);
49
#define HAVE_PLIBC_FD 0
62
#include <sys/types.h>
68
#define __BYTE_ORDER BYTE_ORDER
69
#define __BIG_ENDIAN BIG_ENDIAN
71
/* Conflicts with our definitions */
74
/* Convert LARGE_INTEGER to double */
75
#define Li2Double(x) ((double)((x).HighPart) * 4.294967296E9 + \
76
(double) ((x).LowPart))
81
#define int64_t long long
339
96
__time64_t st_atime;
340
98
__time64_t st_mtime;
341
100
__time64_t st_ctime;
109
#define WEXITSTATUS(status) (((status) & 0xff00) >> 8)
113
/* Thanks to the Cygwin project */
114
#define ENOCSI 43 /* No CSI structure available */
115
#define EL2HLT 44 /* Level 2 halted */
117
#define EDEADLK 45 /* Deadlock condition */
121
#define ENOLCK 46 /* No record locks available */
124
#define EBADE 50 /* Invalid exchange */
125
#define EBADR 51 /* Invalid request descriptor */
126
#define EXFULL 52 /* Exchange full */
127
#define ENOANO 53 /* No anode */
128
#define EBADRQC 54 /* Invalid request code */
129
#define EBADSLT 55 /* Invalid slot */
131
#define EDEADLOCK EDEADLK /* File locking deadlock error */
134
#define EBFONT 57 /* Bad font file fmt */
135
#define ENOSTR 60 /* Device not a stream */
136
#define ENODATA 61 /* No data (for no delay io) */
137
#define ETIME 62 /* Timer expired */
138
#define ENOSR 63 /* Out of streams resources */
139
#define ENONET 64 /* Machine is not on the network */
140
#define ENOPKG 65 /* Package not installed */
141
#define EREMOTE 66 /* The object is remote */
142
#define ENOLINK 67 /* The link has been severed */
143
#define EADV 68 /* Advertise error */
144
#define ESRMNT 69 /* Srmount error */
145
#define ECOMM 70 /* Communication error on send */
146
#define EPROTO 71 /* Protocol error */
147
#define EMULTIHOP 74 /* Multihop attempted */
148
#define ELBIN 75 /* Inode is remote (not really error) */
149
#define EDOTDOT 76 /* Cross mount point (not really error) */
150
#define EBADMSG 77 /* Trying to read unreadable message */
151
#define ENOTUNIQ 80 /* Given log. name not unique */
152
#define EBADFD 81 /* f.d. invalid for this operation */
153
#define EREMCHG 82 /* Remote address changed */
154
#define ELIBACC 83 /* Can't access a needed shared lib */
155
#define ELIBBAD 84 /* Accessing a corrupted shared lib */
156
#define ELIBSCN 85 /* .lib section in a.out corrupted */
157
#define ELIBMAX 86 /* Attempting to link in too many libs */
158
#define ELIBEXEC 87 /* Attempting to exec a shared library */
160
#define ENOSYS 88 /* Function not implemented */
163
#define ENMFILE 89 /* No more files */
165
#define ENOTEMPTY 90 /* Directory not empty */
169
#define ENAMETOOLONG 91 /* File or path name too long */
172
#define ELOOP 92 /* Too many symbolic links */
173
#define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */
174
#define EPFNOSUPPORT 96 /* Protocol family not supported */
175
#define ECONNRESET 104 /* Connection reset by peer */
176
#define ENOBUFS 105 /* No buffer space available */
177
#define EAFNOSUPPORT 106 /* Address family not supported by protocol family */
178
#define EPROTOTYPE 107 /* Protocol wrong type for socket */
179
#define ENOTSOCK 108 /* Socket operation on non-socket */
180
#define ENOPROTOOPT 109 /* Protocol not available */
181
#define ESHUTDOWN 110 /* Can't send after socket shutdown */
182
#define ECONNREFUSED 111 /* Connection refused */
183
#define EADDRINUSE 112 /* Address already in use */
184
#define ECONNABORTED 113 /* Connection aborted */
185
#define ENETUNREACH 114 /* Network is unreachable */
186
#define ENETDOWN 115 /* Network interface is not configured */
188
#define ETIMEDOUT 116 /* Connection timed out */
191
#define EHOSTDOWN 117 /* Host is down */
192
#define EHOSTUNREACH 118 /* Host is unreachable */
193
#define EINPROGRESS 119 /* Connection already in progress */
194
#define EALREADY 120 /* Socket already connected */
195
#define EDESTADDRREQ 121 /* Destination address required */
196
#define EMSGSIZE 122 /* Message too long */
197
#define EPROTONOSUPPORT 123 /* Unknown protocol */
198
#define ESOCKTNOSUPPORT 124 /* Socket type not supported */
199
#define EADDRNOTAVAIL 125 /* Address not available */
200
#define ENETRESET 126 /* Connection aborted by network */
201
#define EISCONN 127 /* Socket is already connected */
202
#define ENOTCONN 128 /* Socket is not connected */
203
#define ETOOMANYREFS 129 /* Too many references: cannot splice */
204
#define EPROCLIM 130 /* Too many processes */
205
#define EUSERS 131 /* Too many users */
206
#define EDQUOT 132 /* Disk quota exceeded */
207
#define ESTALE 133 /* Unknown error */
209
#define ENOTSUP 134 /* Not supported */
212
#define ENOMEDIUM 135 /* No medium (in tape drive) */
213
#define ENOSHARE 136 /* No such host or network path */
214
#define ECASECLASH 137 /* Filename exists with different case */
215
#define EWOULDBLOCK EAGAIN /* Operation would block */
216
#define EOVERFLOW 139 /* Value too large for defined data type */
218
#undef HOST_NOT_FOUND
219
#define HOST_NOT_FOUND 1
223
#define NO_RECOVERY 3
227
#define PROT_READ 0x1
228
#define PROT_WRITE 0x2
229
#define MAP_SHARED 0x1
230
#define MAP_PRIVATE 0x2 /* unsupported */
231
#define MAP_FIXED 0x10
232
#define MAP_FAILED ((void *)-1)
b'long f_type; /* type of filesystem (see below) */'
b'long f_bsize; /* optimal transfer block size */'
b'long f_blocks; /* total data blocks in file system */'
b'long f_bfree; /* free blocks in fs */'
b'long f_bavail; /* free blocks avail to non-superuser */'
b'long f_files; /* total file nodes in file system */'
b'long f_ffree; /* free file nodes in fs */'
b'long f_fsid; /* file system id */'
b'long f_namelen; /* maximum length of filenames */'
b'long f_spare[6]; /* spare for later */'
b'extern const struct in6_addr in6addr_any; /* :: */'
b'extern const struct in6_addr in6addr_loopback; /* ::1 */'
249
/* Taken from the Wine project <http://www.winehq.org>
250
/wine/include/winternl.h */
251
enum SYSTEM_INFORMATION_CLASS
b'SystemBasicInformation = 0, '
b'SystemPerformanceInformation ='
b'SystemTimeOfDayInformation = 3, /* was SystemTimeInformation */ '
b'SystemProcessInformation ='
b'SystemProcessorPerformanceInformation ='
b'SystemDriverInformation, '
b'SystemCacheInformation,'
b'SystemInterruptInformation ='
b'SystemExceptionInformation ='
b'SystemRegistryQuotaInformation ='
b'SystemLookasideInformation = 45 '
b'LARGE_INTEGER IdleTime;'
b'LARGE_INTEGER KernelTime;'
b'LARGE_INTEGER UserTime;'
b'LARGE_INTEGER Reserved1[2];'
b'} SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION;'
273
#define sleep(secs) (Sleep(secs * 1000))
275
/*********************** statfs *****************************/
276
/* fake block size */
277
#define FAKED_BLOCK_SIZE 512
279
/* linux-compatible values for fs type */
280
#define MSDOS_SUPER_MAGIC 0x4d44
281
#define NTFS_SUPER_MAGIC 0x5346544E
283
/*********************** End of statfs ***********************/
285
#define SHUT_RDWR SD_BOTH
287
/* Operations for flock() */
288
#define LOCK_SH 1 /* shared lock */
289
#define LOCK_EX 2 /* exclusive lock */
290
#define LOCK_NB 4 /* or'd with one of the above to prevent
292
#define LOCK_UN 8 /* remove lock */
294
/* Not supported under MinGW */
307
#define SHUT_WR SD_SEND
308
#define SHUT_RD SD_RECEIVE
309
#define SHUT_RDWR SD_BOTH
314
#define SetErrnoFromWinError(e) _SetErrnoFromWinError(e, __FILE__, __LINE__)
b'BOOL _plibc_CreateShortcut (const char *pszSrc, const char *pszDest);'
b'BOOL _plibc_DereferenceShortcut (char *pszShortcut);'
b'char *plibc_ChooseDir (char *pszTitle, unsigned long ulFlags);'
b'char *plibc_ChooseFile (char *pszTitle, unsigned long ulFlags);'
b'long QueryRegistry (HKEY hMainKey, char *pszKey, char *pszSubKey,'
b'char *pszBuffer, long *pdLength);'
b'BOOL __win_IsHandleMarkedAsBlocking (SOCKET hHandle);'
b'void __win_SetHandleBlockingMode (SOCKET s, BOOL bBlocking);'
b'void __win_DiscardHandleBlockingMode (SOCKET s);'
b'int _win_isSocketValid (int s);'
b'int plibc_conv_to_win_path (const char *pszUnix, char *pszWindows);'
b'unsigned plibc_get_handle_count ();'
b'typedef void (*TPanicProc) (int, char *);'
b'void plibc_set_panic_proc (TPanicProc proc);'
b'int flock (int fd, int operation);'
b'int fsync (int fildes);'
b'int inet_pton (int af, const char *src, void *dst);'
b'int inet_pton4 (const char *src, u_char * dst, int pton);'
352
335
int inet_pton6 (const char *src, u_char * dst);
355
339
int truncate (const char *fname, int distance);
356
int statfs (const char *path, struct statfs *buf);
357
const char *hstrerror (int err);
358
void gettimeofday (struct timeval *tp, void *tzp);
359
int mkstemp (char *tmplate);
360
char *strptime (const char *buf, const char *format, struct tm *tm);
361
char *ctime (const time_t * clock);
362
char *ctime_r (const time_t * clock, char *buf);
363
const char *inet_ntop (int af, const void *src, char *dst, size_t size);
364
int plibc_init (char *pszOrg, char *pszApp);
365
void plibc_shutdown ();
366
int plibc_initialized ();
367
int plibc_conv_to_win_path_ex (const char *pszUnix, char *pszWindows,
369
void _SetErrnoFromWinError (long lWinError, char *pszCaller, int iLine);
370
void SetErrnoFromWinsockError (long lWinError);
371
void SetHErrnoFromWinError (long lWinError);
372
void SetErrnoFromHRESULT (HRESULT hRes);
373
FILE *_win_fopen (const char *filename, const char *mode);
374
DIR *_win_opendir (const char *dirname);
375
int _win_open (const char *filename, int oflag, ...);
b'int statfs (const char *path, struct statfs *buf);'
b'const char *hstrerror (int err);'
b'void gettimeofday (struct timeval *tp, void *tzp);'
b'int mkstemp (char *tmplate);'
b'char *strptime (const char *buf, const char *format, struct tm *tm);'
b'char *ctime (const time_t * clock);'
b'char *ctime_r (const time_t * clock, char *buf);'
b'const char *inet_ntop (int af, const void *src, char *dst, size_t size);'
b'int plibc_init (char *pszOrg, char *pszApp);'
b'void plibc_shutdown ();'
b'int plibc_initialized ();'
b'int plibc_conv_to_win_path_ex (const char *pszUnix, char *pszWindows,'
b'void _SetErrnoFromWinError (long lWinError, char *pszCaller, int iLine);'
b'void SetErrnoFromWinsockError (long lWinError);'
b'void SetHErrnoFromWinError (long lWinError);'
b'void SetErrnoFromHRESULT (HRESULT hRes);'
b'FILE * _win_fopen (const char *filename, const char *mode);'
b'DIR * _win_opendir (const char *dirname);'
b'int _win_open (const char *filename, int oflag, ...);'
377
362
char *_win_bindtextdomain (const char *domainname, const char *dirname);
380
366
int _win_chdir (const char *path);
381
int _win_close (int fd);
382
int _win_creat (const char *path, mode_t mode);
383
int _win_fstat (int handle, struct stat *buffer);
384
int _win_ftruncate (int fildes, off_t length);
385
int _win_pipe (int *phandles);
386
int _win_rmdir (const char *path);
387
int _win_access (const char *path, int mode);
388
int _win_chmod (const char *filename, int pmode);
389
char *realpath (const char *file_name, char *resolved_name);
390
long _win_random (void);
391
int _win_remove (const char *path);
392
int _win_rename (const char *oldname, const char *newname);
393
int _win_stat (const char *path, struct stat *buffer);
394
int _win_stat64 (const char *path, struct stat64 *buffer);
395
int _win_unlink (const char *filename);
396
int _win_write (int fildes, const void *buf, size_t nbyte);
397
int _win_read (int fildes, void *buf, size_t nbyte);
398
size_t _win_fwrite (const void *buffer, size_t size, size_t count,
400
size_t _win_fread (void *buffer, size_t size, size_t count, FILE * stream);
401
int _win_symlink (const char *path1, const char *path2);
402
void *_win_mmap (void *start, size_t len, int access, int flags, int fd,
403
unsigned long long offset);
404
int _win_munmap (void *start, size_t length);
405
int _win_lstat (const char *path, struct stat *buf);
406
int _win_lstat64 (const char *path, struct stat64 *buf);
407
int _win_readlink (const char *path, char *buf, size_t bufsize);
408
int _win_accept (SOCKET s, struct sockaddr *addr, int *addrlen);
409
int _win_printf (const char *format, ...);
410
int _win_fprintf (FILE * f, const char *format, ...);
411
int _win_vprintf (const char *format, va_list ap);
412
int _win_vfprintf (FILE * stream, const char *format, va_list arg_ptr);
413
int _win_vsprintf (char *dest, const char *format, va_list arg_ptr);
414
int _win_vsnprintf (char *str, size_t size, const char *format,
416
int _win_snprintf (char *str, size_t size, const char *format, ...);
417
int _win_sprintf (char *dest, const char *format, ...);
418
int _win_vsscanf (const char *str, const char *format, va_list arg_ptr);
419
int _win_sscanf (const char *str, const char *format, ...);
420
int _win_vfscanf (FILE * stream, const char *format, va_list arg_ptr);
421
int _win_vscanf (const char *format, va_list arg_ptr);
422
int _win_scanf (const char *format, ...);
423
int _win_fscanf (FILE * stream, const char *format, ...);
424
pid_t _win_waitpid (pid_t pid, int *stat_loc, int options);
425
int _win_bind (SOCKET s, const struct sockaddr *name, int namelen);
426
int _win_connect (SOCKET s, const struct sockaddr *name, int namelen);
427
int _win_getpeername (SOCKET s, struct sockaddr *name, int *namelen);
428
int _win_getsockname (SOCKET s, struct sockaddr *name, int *namelen);
429
int _win_getsockopt (SOCKET s, int level, int optname, char *optval,
431
int _win_listen (SOCKET s, int backlog);
432
int _win_recv (SOCKET s, char *buf, int len, int flags);
433
int _win_recvfrom (SOCKET s, void *buf, int len, int flags,
434
struct sockaddr *from, int *fromlen);
435
int _win_select (int max_fd, fd_set * rfds, fd_set * wfds, fd_set * efds,
436
const struct timeval *tv);
437
int _win_send (SOCKET s, const char *buf, int len, int flags);
438
int _win_sendto (SOCKET s, const char *buf, int len, int flags,
439
const struct sockaddr *to, int tolen);
440
int _win_setsockopt (SOCKET s, int level, int optname, const void *optval,
442
int _win_shutdown (SOCKET s, int how);
443
SOCKET _win_socket (int af, int type, int protocol);
444
struct hostent *_win_gethostbyaddr (const char *addr, int len, int type);
445
struct hostent *_win_gethostbyname (const char *name);
446
struct hostent *gethostbyname2 (const char *name, int af);
447
char *_win_strerror (int errnum);
449
char *index (const char *s, int c);
b'int _win_close (int fd);'
b'int _win_creat (const char *path, mode_t mode);'
b'int _win_fstat (int handle, struct stat *buffer);'
b'int _win_ftruncate (int fildes, off_t length);'
b'int _win_kill (pid_t pid, int sig);'
b'int _win_pipe (int *phandles);'
b'int _win_rmdir (const char *path);'
b'int _win_access (const char *path, int mode);'
b'int _win_chmod (const char *filename, int pmode);'
b'char *realpath (const char *file_name, char *resolved_name);'
b'long _win_random (void);'
b'int _win_remove (const char *path);'
b'int _win_rename (const char *oldname, const char *newname);'
b'int _win_stat (const char *path, struct stat *buffer);'
b'int _win_stat64 (const char *path, struct stat64 *buffer);'
b'int _win_unlink (const char *filename);'
b'int _win_write (int fildes, const void *buf, size_t nbyte);'
b'int _win_read (int fildes, void *buf, size_t nbyte);'
b'size_t _win_fwrite (const void *buffer, size_t size, size_t count,'
b'size_t _win_fread (void *buffer, size_t size, size_t count, FILE * stream);'
b'int _win_symlink (const char *path1, const char *path2);'
b'void *_win_mmap (void *start, size_t len, int access, int flags, int fd,'
b'unsigned long long offset);'
b'int _win_munmap (void *start, size_t length);'
b'int _win_lstat (const char *path, struct stat *buf);'
b'int _win_lstat64 (const char *path, struct stat64 *buf);'
b'int _win_readlink (const char *path, char *buf, size_t bufsize);'
b'int _win_accept (SOCKET s, struct sockaddr *addr, int *addrlen);'
b'int _win_printf (const char *format, ...);'
b'int _win_fprintf (FILE * f, const char *format, ...);'
b'int _win_vprintf (const char *format, va_list ap);'
b'int _win_vfprintf (FILE * stream, const char *format, va_list arg_ptr);'
b'int _win_vsprintf (char *dest, const char *format, va_list arg_ptr);'
b'int _win_vsnprintf (char *str, size_t size, const char *format,'
b'int _win_snprintf (char *str, size_t size, const char *format, ...);'
b'int _win_sprintf (char *dest, const char *format, ...);'
b'int _win_vsscanf (const char *str, const char *format, va_list arg_ptr);'
b'int _win_sscanf (const char *str, const char *format, ...);'
b'int _win_vfscanf (FILE * stream, const char *format, va_list arg_ptr);'
b'int _win_vscanf (const char *format, va_list arg_ptr);'
b'int _win_scanf (const char *format, ...);'
b'int _win_fscanf (FILE * stream, const char *format, ...);'
b'pid_t _win_waitpid (pid_t pid, int *stat_loc, int options);'
b'int _win_bind (SOCKET s, const struct sockaddr *name, int namelen);'
b'int _win_connect (SOCKET s, const struct sockaddr *name, int namelen);'
b'int _win_getpeername (SOCKET s, struct sockaddr *name, '
b'int _win_getsockname (SOCKET s, struct sockaddr *name, '
b'int _win_getsockopt (SOCKET s, int level, int optname, char *optval,'
b'int _win_listen (SOCKET s, int backlog);'
b'int _win_recv (SOCKET s, char *buf, int len, int flags);'
b'int _win_recvfrom (SOCKET s, void *buf, int len, int flags,'
b'struct sockaddr *from, int *fromlen);'
b'int _win_select (int max_fd, fd_set * rfds, fd_set * wfds, fd_set * efds,'
b'const struct timeval *tv);'
b'int _win_send (SOCKET s, const char *buf, int len, int flags);'
b'int _win_sendto (SOCKET s, const char *buf, int len, int flags,'
b'const struct sockaddr *to, int tolen);'
b'int _win_setsockopt (SOCKET s, int level, int optname, const void *optval,'
b'int _win_shutdown (SOCKET s, int how);'
b'SOCKET _win_socket (int af, int type, int protocol);'
b'struct hostent *_win_gethostbyaddr (const char *addr, int len, int type);'
b'struct hostent *_win_gethostbyname (const char *name);'
b'struct hostent *gethostbyname2 (const char *name, int af);'
b'char *_win_strerror (int errnum);'
b'char *index (const char *s, int c);'
452
439
char *strndup (const char *s, size_t n);
456
444
size_t strnlen (const char *str, size_t maxlen);
459
#define strcasecmp(a, b) stricmp(a, b)
460
#define strncasecmp(a, b, c) strnicmp(a, b, c)
465
#define DIR_SEPARATOR '/'
466
#define DIR_SEPARATOR_STR "/"
467
#define PATH_SEPARATOR ';'
468
#define PATH_SEPARATOR_STR ";"
472
#define BINDTEXTDOMAIN(d, n) bindtextdomain(d, n)
474
#define CREAT(p, m) creat(p, m)
476
#define KILL(p,s) kill(p,s)
477
#define FOPEN(f, m) fopen(f, m)
478
#define FTRUNCATE(f, l) ftruncate(f, l)
479
#define OPENDIR(d) opendir(d)
481
#define CHDIR(d) chdir(d)
482
#define CLOSE(f) close(f)
483
#define LSEEK(f, o, w) lseek(f, o, w)
484
#define RMDIR(f) rmdir(f)
485
#define ACCESS(p, m) access(p, m)
486
#define CHMOD(f, p) chmod(f, p)
487
#define FSTAT(h, b) fstat(h, b)
488
#define PIPE(h) pipe(h)
489
#define REMOVE(p) remove(p)
490
#define RENAME(o, n) rename(o, n)
491
#define STAT(p, b) stat(p, b)
492
#define STAT64(p, b) stat64(p, b)
493
#define UNLINK(f) unlink(f)
494
#define WRITE(f, b, n) write(f, b, n)
495
#define READ(f, b, n) read(f, b, n)
496
#define GN_FREAD(b, s, c, f) fread(b, s, c, f)
497
#define GN_FWRITE(b, s, c, f) fwrite(b, s, c, f)
498
#define SYMLINK(a, b) symlink(a, b)
499
#define MMAP(s, l, p, f, d, o) mmap(s, l, p, f, d, o)
500
#define MUNMAP(s, l) munmap(s, l)
501
#define STRERROR(i) strerror(i)
502
#define RANDOM() random()
503
#define READLINK(p, b, s) readlink(p, b, s)
504
#define LSTAT(p, b) lstat(p, b)
505
#define LSTAT64(p, b) lstat64(p, b)
506
#define PRINTF printf
507
#define FPRINTF fprintf
508
#define VPRINTF(f, a) vprintf(f, a)
509
#define VFPRINTF(s, f, a) vfprintf(s, f, a)
510
#define VSPRINTF(d, f, a) vsprintf(d, f, a)
511
#define VSNPRINTF(str, size, fmt, a) vsnprintf(str, size, fmt, a)
512
#define _REAL_SNPRINTF snprintf
513
#define SPRINTF sprintf
514
#define VSSCANF(s, f, a) vsscanf(s, f, a)
515
#define SSCANF sscanf
516
#define VFSCANF(s, f, a) vfscanf(s, f, a)
517
#define VSCANF(f, a) vscanf(f, a)
519
#define FSCANF fscanf
520
#define WAITPID(p, s, o) waitpid(p, s, o)
521
#define ACCEPT(s, a, l) accept(s, a, l)
522
#define BIND(s, n, l) bind(s, n, l)
523
#define CONNECT(s, n, l) connect(s, n, l)
524
#define GETPEERNAME(s, n, l) getpeername(s, n, l)
525
#define GETSOCKNAME(s, n, l) getsockname(s, n, l)
526
#define GETSOCKOPT(s, l, o, v, p) getsockopt(s, l, o, v, p)
527
#define LISTEN(s, b) listen(s, b)
528
#define RECV(s, b, l, f) recv(s, b, l, f)
529
#define RECVFROM(s, b, l, f, r, o) recvfrom(s, b, l, f, r, o)
530
#define SELECT(n, r, w, e, t) select(n, r, w, e, t)
531
#define SEND(s, b, l, f) send(s, b, l, f)
532
#define SENDTO(s, b, l, f, o, n) sendto(s, b, l, f, o, n)
533
#define SETSOCKOPT(s, l, o, v, n) setsockopt(s, l, o, v, n)
534
#define SHUTDOWN(s, h) shutdown(s, h)
535
#define SOCKET(a, t, p) socket(a, t, p)
536
#define GETHOSTBYADDR(a, l, t) gethostbyname(a, l, t)
537
#define GETHOSTBYNAME(n) gethostbyname(n)
539
#define DIR_SEPARATOR '\\'
540
#define DIR_SEPARATOR_STR "\\"
541
#define PATH_SEPARATOR ':'
542
#define PATH_SEPARATOR_STR ":"
543
#define NEWLINE "\r\n"
546
#define BINDTEXTDOMAIN(d, n) _win_bindtextdomain(d, n)
548
#define CREAT(p, m) _win_creat(p, m)
549
#define FOPEN(f, m) _win_fopen(f, m)
550
#define FTRUNCATE(f, l) _win_ftruncate(f, l)
551
#define OPENDIR(d) _win_opendir(d)
552
#define OPEN _win_open
553
#define CHDIR(d) _win_chdir(d)
554
#define CLOSE(f) _win_close(f)
555
#define LSEEK(f, o, w) _win_lseek(f, o, w)
556
#define FSTAT(h, b) _win_fstat(h, b)
557
#define RMDIR(f) _win_rmdir(f)
558
#define ACCESS(p, m) _win_access(p, m)
559
#define CHMOD(f, p) _win_chmod(f, p)
560
#define PIPE(h) _win_pipe(h)
561
#define RANDOM() _win_random()
562
#define REMOVE(p) _win_remove(p)
563
#define RENAME(o, n) _win_rename(o, n)
564
#define STAT(p, b) _win_stat(p, b)
565
#define STAT64(p, b) _win_stat64(p, b)
566
#define UNLINK(f) _win_unlink(f)
567
#define WRITE(f, b, n) _win_write(f, b, n)
568
#define READ(f, b, n) _win_read(f, b, n)
569
#define GN_FREAD(b, s, c, f) _win_fread(b, s, c, f)
570
#define GN_FWRITE(b, s, c, f) _win_fwrite(b, s, c, f)
571
#define SYMLINK(a, b) _win_symlink(a, b)
572
#define MMAP(s, l, p, f, d, o) _win_mmap(s, l, p, f, d, o)
573
#define MUNMAP(s, l) _win_munmap(s, l)
574
#define STRERROR(i) _win_strerror(i)
575
#define READLINK(p, b, s) _win_readlink(p, b, s)
576
#define LSTAT(p, b) _win_lstat(p, b)
577
#define LSTAT64(p, b) _win_lstat64(p, b)
578
#define PRINTF(f, ...) _win_printf(f , __VA_ARGS__)
579
#define FPRINTF(fil, fmt, ...) _win_fprintf(fil, fmt, __VA_ARGS__)
580
#define VPRINTF(f, a) _win_vprintf(f, a)
581
#define VFPRINTF(s, f, a) _win_vfprintf(s, f, a)
582
#define VSPRINTF(d, f, a) _win_vsprintf(d, f, a)
583
#define VSNPRINTF(str, size, fmt, a) _win_vsnprintf(str, size, fmt, a)
584
#define _REAL_SNPRINTF(str, size, fmt, ...) _win_snprintf(str, size, fmt, __VA_ARGS__)
585
#define SPRINTF(d, f, ...) _win_sprintf(d, f, __VA_ARGS__)
586
#define VSSCANF(s, f, a) _win_vsscanf(s, f, a)
587
#define SSCANF(s, f, ...) _win_sscanf(s, f, __VA_ARGS__)
588
#define VFSCANF(s, f, a) _win_vfscanf(s, f, a)
589
#define VSCANF(f, a) _win_vscanf(f, a)
590
#define SCANF(f, ...) _win_scanf(f, __VA_ARGS__)
591
#define FSCANF(s, f, ...) _win_fscanf(s, f, __VA_ARGS__)
592
#define WAITPID(p, s, o) _win_waitpid(p, s, o)
593
#define ACCEPT(s, a, l) _win_accept(s, a, l)
594
#define BIND(s, n, l) _win_bind(s, n, l)
595
#define CONNECT(s, n, l) _win_connect(s, n, l)
596
#define GETPEERNAME(s, n, l) _win_getpeername(s, n, l)
597
#define GETSOCKNAME(s, n, l) _win_getsockname(s, n, l)
598
#define GETSOCKOPT(s, l, o, v, p) _win_getsockopt(s, l, o, v, p)
599
#define LISTEN(s, b) _win_listen(s, b)
600
#define RECV(s, b, l, f) _win_recv(s, b, l, f)
601
#define RECVFROM(s, b, l, f, r, o) _win_recvfrom(s, b, l, f, r, o)
602
#define SELECT(n, r, w, e, t) _win_select(n, r, w, e, t)
603
#define SEND(s, b, l, f) _win_send(s, b, l, f)
604
#define SENDTO(s, b, l, f, o, n) _win_sendto(s, b, l, f, o, n)
605
#define SETSOCKOPT(s, l, o, v, n) _win_setsockopt(s, l, o, v, n)
606
#define SHUTDOWN(s, h) _win_shutdown(s, h)
607
#define SOCKET(a, t, p) _win_socket(a, t, p)
608
#define GETHOSTBYADDR(a, l, t) _win_gethostbyname(a, l, t)
609
#define GETHOSTBYNAME(n) _win_gethostbyname(n)
449
#define strcasecmp(a, b) stricmp(a, b)
450
#define strncasecmp(a, b, c) strnicmp(a, b, c)
455
#define DIR_SEPARATOR '/'
456
#define DIR_SEPARATOR_STR "/"
457
#define PATH_SEPARATOR ';'
458
#define PATH_SEPARATOR_STR ";"
462
#define BINDTEXTDOMAIN(d, n) bindtextdomain(d, n)
465
#define CREAT(p, m) creat(p, m)
467
#define FOPEN(f, m) fopen(f, m)
468
#define FTRUNCATE(f, l) ftruncate(f, l)
469
#define OPENDIR(d) opendir(d)
471
#define CHDIR(d) chdir(d)
472
#define CLOSE(f) close(f)
473
#define LSEEK(f, o, w) lseek(f, o, w)
474
#define RMDIR(f) rmdir(f)
475
#define ACCESS(p, m) access(p, m)
476
#define CHMOD(f, p) chmod(f, p)
477
#define FSTAT(h, b) fstat(h, b)
478
#define PLIBC_KILL(p, s) kill(p, s)
479
#define PIPE(h) pipe(h)
480
#define REMOVE(p) remove(p)
481
#define RENAME(o, n) rename(o, n)
482
#define STAT(p, b) stat(p, b)
483
#define STAT64(p, b) stat64(p, b)
484
#define UNLINK(f) unlink(f)
485
#define WRITE(f, b, n) write(f, b, n)
486
#define READ(f, b, n) read(f, b, n)
487
#define GN_FREAD(b, s, c, f) fread(b, s, c, f)
488
#define GN_FWRITE(b, s, c, f) fwrite(b, s, c, f)
489
#define SYMLINK(a, b) symlink(a, b)
490
#define MMAP(s, l, p, f, d, o) mmap(s, l, p, f, d, o)
491
#define MUNMAP(s, l) munmap(s, l)
492
#define STRERROR(i) strerror(i)
493
#define RANDOM() random()
494
#define READLINK(p, b, s) readlink(p, b, s)
495
#define LSTAT(p, b) lstat(p, b)
496
#define LSTAT64(p, b) lstat64(p, b)
497
#define PRINTF printf
498
#define FPRINTF fprintf
499
#define VPRINTF(f, a) vprintf(f, a)
500
#define VFPRINTF(s, f, a) vfprintf(s, f, a)
501
#define VSPRINTF(d, f, a) vsprintf(d, f, a)
502
#define VSNPRINTF(str, size, fmt, a) vsnprintf(str, size, fmt, a)
503
#define _REAL_SNPRINTF snprintf
504
#define SPRINTF sprintf
505
#define VSSCANF(s, f, a) vsscanf(s, f, a)
506
#define SSCANF sscanf
507
#define VFSCANF(s, f, a) vfscanf(s, f, a)
508
#define VSCANF(f, a) vscanf(f, a)
510
#define FSCANF fscanf
511
#define WAITPID(p, s, o) waitpid(p, s, o)
512
#define ACCEPT(s, a, l) accept(s, a, l)
513
#define BIND(s, n, l) bind(s, n, l)
514
#define CONNECT(s, n, l) connect(s, n, l)
515
#define GETPEERNAME(s, n, l) getpeername(s, n, l)
516
#define GETSOCKNAME(s, n, l) getsockname(s, n, l)
517
#define GETSOCKOPT(s, l, o, v, p) getsockopt(s, l, o, v, p)
518
#define LISTEN(s, b) listen(s, b)
519
#define RECV(s, b, l, f) recv(s, b, l, f)
520
#define RECVFROM(s, b, l, f, r, o) recvfrom(s, b, l, f, r, o)
521
#define SELECT(n, r, w, e, t) select(n, r, w, e, t)
522
#define SEND(s, b, l, f) send(s, b, l, f)
523
#define SENDTO(s, b, l, f, o, n) sendto(s, b, l, f, o, n)
524
#define SETSOCKOPT(s, l, o, v, n) setsockopt(s, l, o, v, n)
525
#define SHUTDOWN(s, h) shutdown(s, h)
526
#define SOCKET(a, t, p) socket(a, t, p)
527
#define GETHOSTBYADDR(a, l, t) gethostbyname(a, l, t)
528
#define GETHOSTBYNAME(n) gethostbyname(n)
531
#define DIR_SEPARATOR '\\'
532
#define DIR_SEPARATOR_STR "\\"
533
#define PATH_SEPARATOR ':'
534
#define PATH_SEPARATOR_STR ":"
535
#define NEWLINE "\r\n"
538
#define BINDTEXTDOMAIN(d, n) _win_bindtextdomain(d, n)
541
#define CREAT(p, m) _win_creat(p, m)
542
#define FOPEN(f, m) _win_fopen(f, m)
543
#define FTRUNCATE(f, l) _win_ftruncate(f, l)
544
#define OPENDIR(d) _win_opendir(d)
545
#define OPEN _win_open
546
#define CHDIR(d) _win_chdir(d)
547
#define CLOSE(f) _win_close(f)
548
#define PLIBC_KILL(p, s) _win_kill(p, s)
549
#define LSEEK(f, o, w) _win_lseek(f, o, w)
550
#define FSTAT(h, b) _win_fstat(h, b)
551
#define RMDIR(f) _win_rmdir(f)
552
#define ACCESS(p, m) _win_access(p, m)
553
#define CHMOD(f, p) _win_chmod(f, p)
554
#define PIPE(h) _win_pipe(h)
555
#define RANDOM() _win_random()
556
#define REMOVE(p) _win_remove(p)
557
#define RENAME(o, n) _win_rename(o, n)
558
#define STAT(p, b) _win_stat(p, b)
559
#define STAT64(p, b) _win_stat64(p, b)
560
#define UNLINK(f) _win_unlink(f)
561
#define WRITE(f, b, n) _win_write(f, b, n)
562
#define READ(f, b, n) _win_read(f, b, n)
563
#define GN_FREAD(b, s, c, f) _win_fread(b, s, c, f)
564
#define GN_FWRITE(b, s, c, f) _win_fwrite(b, s, c, f)
565
#define SYMLINK(a, b) _win_symlink(a, b)
566
#define MMAP(s, l, p, f, d, o) _win_mmap(s, l, p, f, d, o)
567
#define MUNMAP(s, l) _win_munmap(s, l)
568
#define STRERROR(i) _win_strerror(i)
569
#define READLINK(p, b, s) _win_readlink(p, b, s)
570
#define LSTAT(p, b) _win_lstat(p, b)
571
#define LSTAT64(p, b) _win_lstat64(p, b)
572
#define PRINTF(f, ...) _win_printf(f , __VA_ARGS__)
573
#define FPRINTF(fil, fmt, ...) _win_fprintf(fil, fmt, __VA_ARGS__)
574
#define VPRINTF(f, a) _win_vprintf(f, a)
575
#define VFPRINTF(s, f, a) _win_vfprintf(s, f, a)
576
#define VSPRINTF(d, f, a) _win_vsprintf(d, f, a)
577
#define VSNPRINTF(str, size, fmt, a) _win_vsnprintf(str, size, fmt, a)
578
#define _REAL_SNPRINTF(str, size, fmt, ...) _win_snprintf(str, size, fmt, __VA_ARGS__)
579
#define SPRINTF(d, f, ...) _win_sprintf(d, f, __VA_ARGS__)
580
#define VSSCANF(s, f, a) _win_vsscanf(s, f, a)
581
#define SSCANF(s, f, ...) _win_sscanf(s, f, __VA_ARGS__)
582
#define VFSCANF(s, f, a) _win_vfscanf(s, f, a)
583
#define VSCANF(f, a) _win_vscanf(f, a)
584
#define SCANF(f, ...) _win_scanf(f, __VA_ARGS__)
585
#define FSCANF(s, f, ...) _win_fscanf(s, f, __VA_ARGS__)
586
#define WAITPID(p, s, o) _win_waitpid(p, s, o)
587
#define ACCEPT(s, a, l) _win_accept(s, a, l)
588
#define BIND(s, n, l) _win_bind(s, n, l)
589
#define CONNECT(s, n, l) _win_connect(s, n, l)
590
#define GETPEERNAME(s, n, l) _win_getpeername(s, n, l)
591
#define GETSOCKNAME(s, n, l) _win_getsockname(s, n, l)
592
#define GETSOCKOPT(s, l, o, v, p) _win_getsockopt(s, l, o, v, p)
593
#define LISTEN(s, b) _win_listen(s, b)
594
#define RECV(s, b, l, f) _win_recv(s, b, l, f)
595
#define RECVFROM(s, b, l, f, r, o) _win_recvfrom(s, b, l, f, r, o)
596
#define SELECT(n, r, w, e, t) _win_select(n, r, w, e, t)
597
#define SEND(s, b, l, f) _win_send(s, b, l, f)
598
#define SENDTO(s, b, l, f, o, n) _win_sendto(s, b, l, f, o, n)
599
#define SETSOCKOPT(s, l, o, v, n) _win_setsockopt(s, l, o, v, n)
600
#define SHUTDOWN(s, h) _win_shutdown(s, h)
601
#define SOCKET(a, t, p) _win_socket(a, t, p)
602
#define GETHOSTBYADDR(a, l, t) _win_gethostbyname(a, l, t)
603
#define GETHOSTBYNAME(n) _win_gethostbyname(n)