aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/plibc.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon/plibc.h')
-rw-r--r--src/daemon/plibc.h781
1 files changed, 392 insertions, 389 deletions
diff --git a/src/daemon/plibc.h b/src/daemon/plibc.h
index 4af3552d..92cd8035 100644
--- a/src/daemon/plibc.h
+++ b/src/daemon/plibc.h
@@ -22,29 +22,28 @@
22 * @brief PlibC header 22 * @brief PlibC header
23 * @attention This file is usually not installed under Unix, 23 * @attention This file is usually not installed under Unix,
24 * so ship it with your application 24 * so ship it with your application
25 * @version $Revision: 1.37 $ 25 * @version $Revision: 1.39 $
26 */ 26 */
27 27
28#ifndef _PLIBC_H_ 28#ifndef _PLIBC_H_
29#define _PLIBC_H_ 29#define _PLIBC_H_
30 30
31#ifndef SIGALRM 31#ifndef SIGALRM
32#define SIGALRM 14 32 #define SIGALRM 14
33#endif 33#endif
34 34
35#ifdef __cplusplus 35#ifdef __cplusplus
36extern "C" 36extern "C" {
37{
38#endif 37#endif
39 38
40#ifdef Q_OS_WIN32 39#ifdef Q_OS_WIN32
41#define WINDOWS 1 40 #define WINDOWS 1
42#endif 41#endif
43 42
44#ifdef WINDOWS 43#ifdef WINDOWS
45 44
46#if ENABLE_NLS 45#if ENABLE_NLS
47#include "langinfo.h" 46 #include "langinfo.h"
48#endif 47#endif
49 48
50#include <windows.h> 49#include <windows.h>
@@ -76,8 +75,8 @@ extern "C"
76#define int64_t long long 75#define int64_t long long
77#define int32_t long 76#define int32_t long
78 77
79 struct stat64 78struct stat64
80 { 79{
81 _dev_t st_dev; 80 _dev_t st_dev;
82 _ino_t st_ino; 81 _ino_t st_ino;
83 _mode_t st_mode; 82 _mode_t st_mode;
@@ -89,112 +88,112 @@ extern "C"
89 __time64_t st_atime; 88 __time64_t st_atime;
90 __time64_t st_mtime; 89 __time64_t st_mtime;
91 __time64_t st_ctime; 90 __time64_t st_ctime;
92 }; 91};
93 92
94#ifndef pid_t 93#ifndef pid_t
95#define pid_t int 94 #define pid_t int
96#endif 95#endif
97 96
98#ifndef WEXITSTATUS 97#ifndef WEXITSTATUS
99#define WEXITSTATUS(status) (((status) & 0xff00) >> 8) 98 #define WEXITSTATUS(status) (((status) & 0xff00) >> 8)
100#endif 99#endif
101 100
102/* Thanks to the Cygwin project */ 101/* Thanks to the Cygwin project */
103#define ENOCSI 43 /* No CSI structure available */ 102#define ENOCSI 43 /* No CSI structure available */
104#define EL2HLT 44 /* Level 2 halted */ 103#define EL2HLT 44 /* Level 2 halted */
105#ifndef EDEADLK 104#ifndef EDEADLK
106#define EDEADLK 45 /* Deadlock condition */ 105 #define EDEADLK 45 /* Deadlock condition */
107#endif 106#endif
108#ifndef ENOLCK 107#ifndef ENOLCK
109#define ENOLCK 46 /* No record locks available */ 108 #define ENOLCK 46 /* No record locks available */
110#endif 109#endif
111#define EBADE 50 /* Invalid exchange */ 110#define EBADE 50 /* Invalid exchange */
112#define EBADR 51 /* Invalid request descriptor */ 111#define EBADR 51 /* Invalid request descriptor */
113#define EXFULL 52 /* Exchange full */ 112#define EXFULL 52 /* Exchange full */
114#define ENOANO 53 /* No anode */ 113#define ENOANO 53 /* No anode */
115#define EBADRQC 54 /* Invalid request code */ 114#define EBADRQC 54 /* Invalid request code */
116#define EBADSLT 55 /* Invalid slot */ 115#define EBADSLT 55 /* Invalid slot */
117#ifndef EDEADLOCK 116#ifndef EDEADLOCK
118#define EDEADLOCK EDEADLK /* File locking deadlock error */ 117 #define EDEADLOCK EDEADLK /* File locking deadlock error */
119#endif 118#endif
120#define EBFONT 57 /* Bad font file fmt */ 119#define EBFONT 57 /* Bad font file fmt */
121#define ENOSTR 60 /* Device not a stream */ 120#define ENOSTR 60 /* Device not a stream */
122#define ENODATA 61 /* No data (for no delay io) */ 121#define ENODATA 61 /* No data (for no delay io) */
123#define ETIME 62 /* Timer expired */ 122#define ETIME 62 /* Timer expired */
124#define ENOSR 63 /* Out of streams resources */ 123#define ENOSR 63 /* Out of streams resources */
125#define ENONET 64 /* Machine is not on the network */ 124#define ENONET 64 /* Machine is not on the network */
126#define ENOPKG 65 /* Package not installed */ 125#define ENOPKG 65 /* Package not installed */
127#define EREMOTE 66 /* The object is remote */ 126#define EREMOTE 66 /* The object is remote */
128#define ENOLINK 67 /* The link has been severed */ 127#define ENOLINK 67 /* The link has been severed */
129#define EADV 68 /* Advertise error */ 128#define EADV 68 /* Advertise error */
130#define ESRMNT 69 /* Srmount error */ 129#define ESRMNT 69 /* Srmount error */
131#define ECOMM 70 /* Communication error on send */ 130#define ECOMM 70 /* Communication error on send */
132#define EPROTO 71 /* Protocol error */ 131#define EPROTO 71 /* Protocol error */
133#define EMULTIHOP 74 /* Multihop attempted */ 132#define EMULTIHOP 74 /* Multihop attempted */
134#define ELBIN 75 /* Inode is remote (not really error) */ 133#define ELBIN 75 /* Inode is remote (not really error) */
135#define EDOTDOT 76 /* Cross mount point (not really error) */ 134#define EDOTDOT 76 /* Cross mount point (not really error) */
136#define EBADMSG 77 /* Trying to read unreadable message */ 135#define EBADMSG 77 /* Trying to read unreadable message */
137#define ENOTUNIQ 80 /* Given log. name not unique */ 136#define ENOTUNIQ 80 /* Given log. name not unique */
138#define EBADFD 81 /* f.d. invalid for this operation */ 137#define EBADFD 81 /* f.d. invalid for this operation */
139#define EREMCHG 82 /* Remote address changed */ 138#define EREMCHG 82 /* Remote address changed */
140#define ELIBACC 83 /* Can't access a needed shared lib */ 139#define ELIBACC 83 /* Can't access a needed shared lib */
141#define ELIBBAD 84 /* Accessing a corrupted shared lib */ 140#define ELIBBAD 84 /* Accessing a corrupted shared lib */
142#define ELIBSCN 85 /* .lib section in a.out corrupted */ 141#define ELIBSCN 85 /* .lib section in a.out corrupted */
143#define ELIBMAX 86 /* Attempting to link in too many libs */ 142#define ELIBMAX 86 /* Attempting to link in too many libs */
144#define ELIBEXEC 87 /* Attempting to exec a shared library */ 143#define ELIBEXEC 87 /* Attempting to exec a shared library */
145#ifndef ENOSYS 144#ifndef ENOSYS
146#define ENOSYS 88 /* Function not implemented */ 145 #define ENOSYS 88 /* Function not implemented */
147#endif 146#endif
148#define ENMFILE 89 /* No more files */ 147#define ENMFILE 89 /* No more files */
149#ifndef ENOTEMPTY 148#ifndef ENOTEMPTY
150#define ENOTEMPTY 90 /* Directory not empty */ 149 #define ENOTEMPTY 90 /* Directory not empty */
151#endif 150#endif
152#ifndef ENAMETOOLONG 151#ifndef ENAMETOOLONG
153#define ENAMETOOLONG 91 /* File or path name too long */ 152 #define ENAMETOOLONG 91 /* File or path name too long */
154#endif 153#endif
155#define ELOOP 92 /* Too many symbolic links */ 154#define ELOOP 92 /* Too many symbolic links */
156#define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */ 155#define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */
157#define EPFNOSUPPORT 96 /* Protocol family not supported */ 156#define EPFNOSUPPORT 96 /* Protocol family not supported */
158#define ECONNRESET 104 /* Connection reset by peer */ 157#define ECONNRESET 104 /* Connection reset by peer */
159#define ENOBUFS 105 /* No buffer space available */ 158#define ENOBUFS 105 /* No buffer space available */
160#define EAFNOSUPPORT 106 /* Address family not supported by protocol family */ 159#define EAFNOSUPPORT 106 /* Address family not supported by protocol family */
161#define EPROTOTYPE 107 /* Protocol wrong type for socket */ 160#define EPROTOTYPE 107 /* Protocol wrong type for socket */
162#define ENOTSOCK 108 /* Socket operation on non-socket */ 161#define ENOTSOCK 108 /* Socket operation on non-socket */
163#define ENOPROTOOPT 109 /* Protocol not available */ 162#define ENOPROTOOPT 109 /* Protocol not available */
164#define ESHUTDOWN 110 /* Can't send after socket shutdown */ 163#define ESHUTDOWN 110 /* Can't send after socket shutdown */
165#define ECONNREFUSED 111 /* Connection refused */ 164#define ECONNREFUSED 111 /* Connection refused */
166#define EADDRINUSE 112 /* Address already in use */ 165#define EADDRINUSE 112 /* Address already in use */
167#define ECONNABORTED 113 /* Connection aborted */ 166#define ECONNABORTED 113 /* Connection aborted */
168#define ENETUNREACH 114 /* Network is unreachable */ 167#define ENETUNREACH 114 /* Network is unreachable */
169#define ENETDOWN 115 /* Network interface is not configured */ 168#define ENETDOWN 115 /* Network interface is not configured */
170#ifndef ETIMEDOUT 169#ifndef ETIMEDOUT
171#define ETIMEDOUT 116 /* Connection timed out */ 170 #define ETIMEDOUT 116 /* Connection timed out */
172#endif 171#endif
173#define EHOSTDOWN 117 /* Host is down */ 172#define EHOSTDOWN 117 /* Host is down */
174#define EHOSTUNREACH 118 /* Host is unreachable */ 173#define EHOSTUNREACH 118 /* Host is unreachable */
175#define EINPROGRESS 119 /* Connection already in progress */ 174#define EINPROGRESS 119 /* Connection already in progress */
176#define EALREADY 120 /* Socket already connected */ 175#define EALREADY 120 /* Socket already connected */
177#define EDESTADDRREQ 121 /* Destination address required */ 176#define EDESTADDRREQ 121 /* Destination address required */
178#define EMSGSIZE 122 /* Message too long */ 177#define EMSGSIZE 122 /* Message too long */
179#define EPROTONOSUPPORT 123 /* Unknown protocol */ 178#define EPROTONOSUPPORT 123 /* Unknown protocol */
180#define ESOCKTNOSUPPORT 124 /* Socket type not supported */ 179#define ESOCKTNOSUPPORT 124 /* Socket type not supported */
181#define EADDRNOTAVAIL 125 /* Address not available */ 180#define EADDRNOTAVAIL 125 /* Address not available */
182#define ENETRESET 126 /* Connection aborted by network */ 181#define ENETRESET 126 /* Connection aborted by network */
183#define EISCONN 127 /* Socket is already connected */ 182#define EISCONN 127 /* Socket is already connected */
184#define ENOTCONN 128 /* Socket is not connected */ 183#define ENOTCONN 128 /* Socket is not connected */
185#define ETOOMANYREFS 129 /* Too many references: cannot splice */ 184#define ETOOMANYREFS 129 /* Too many references: cannot splice */
186#define EPROCLIM 130 /* Too many processes */ 185#define EPROCLIM 130 /* Too many processes */
187#define EUSERS 131 /* Too many users */ 186#define EUSERS 131 /* Too many users */
188#define EDQUOT 132 /* Disk quota exceeded */ 187#define EDQUOT 132 /* Disk quota exceeded */
189#define ESTALE 133 /* Unknown error */ 188#define ESTALE 133 /* Unknown error */
190#ifndef ENOTSUP 189#ifndef ENOTSUP
191#define ENOTSUP 134 /* Not supported */ 190 #define ENOTSUP 134 /* Not supported */
192#endif 191#endif
193#define ENOMEDIUM 135 /* No medium (in tape drive) */ 192#define ENOMEDIUM 135 /* No medium (in tape drive) */
194#define ENOSHARE 136 /* No such host or network path */ 193#define ENOSHARE 136 /* No such host or network path */
195#define ECASECLASH 137 /* Filename exists with different case */ 194#define ECASECLASH 137 /* Filename exists with different case */
196#define EWOULDBLOCK EAGAIN /* Operation would block */ 195#define EWOULDBLOCK EAGAIN /* Operation would block */
197#define EOVERFLOW 139 /* Value too large for defined data type */ 196#define EOVERFLOW 139 /* Value too large for defined data type */
198 197
199#undef HOST_NOT_FOUND 198#undef HOST_NOT_FOUND
200#define HOST_NOT_FOUND 1 199#define HOST_NOT_FOUND 1
@@ -208,65 +207,65 @@ extern "C"
208#define PROT_READ 0x1 207#define PROT_READ 0x1
209#define PROT_WRITE 0x2 208#define PROT_WRITE 0x2
210#define MAP_SHARED 0x1 209#define MAP_SHARED 0x1
211#define MAP_PRIVATE 0x2 /* unsupported */ 210#define MAP_PRIVATE 0x2 /* unsupported */
212#define MAP_FIXED 0x10 211#define MAP_FIXED 0x10
213#define MAP_FAILED ((void *)-1) 212#define MAP_FAILED ((void *)-1)
214 213
215 struct statfs 214struct statfs
216 { 215{
217 long f_type; /* type of filesystem (see below) */ 216 long f_type; /* type of filesystem (see below) */
218 long f_bsize; /* optimal transfer block size */ 217 long f_bsize; /* optimal transfer block size */
219 long f_blocks; /* total data blocks in file system */ 218 long f_blocks; /* total data blocks in file system */
220 long f_bfree; /* free blocks in fs */ 219 long f_bfree; /* free blocks in fs */
221 long f_bavail; /* free blocks avail to non-superuser */ 220 long f_bavail; /* free blocks avail to non-superuser */
222 long f_files; /* total file nodes in file system */ 221 long f_files; /* total file nodes in file system */
223 long f_ffree; /* free file nodes in fs */ 222 long f_ffree; /* free file nodes in fs */
224 long f_fsid; /* file system id */ 223 long f_fsid; /* file system id */
225 long f_namelen; /* maximum length of filenames */ 224 long f_namelen; /* maximum length of filenames */
226 long f_spare[6]; /* spare for later */ 225 long f_spare[6]; /* spare for later */
227 }; 226};
228 227
229/* Taken from the Wine project <http://www.winehq.org> 228/* Taken from the Wine project <http://www.winehq.org>
230 /wine/include/winternl.h */ 229 /wine/include/winternl.h */
231 enum SYSTEM_INFORMATION_CLASS 230enum SYSTEM_INFORMATION_CLASS
232 { 231{
233 SystemBasicInformation = 0, 232 SystemBasicInformation = 0,
234 Unknown1, 233 Unknown1,
235 SystemPerformanceInformation = 2, 234 SystemPerformanceInformation = 2,
236 SystemTimeOfDayInformation = 3, /* was SystemTimeInformation */ 235 SystemTimeOfDayInformation = 3, /* was SystemTimeInformation */
237 Unknown4, 236 Unknown4,
238 SystemProcessInformation = 5, 237 SystemProcessInformation = 5,
239 Unknown6, 238 Unknown6,
240 Unknown7, 239 Unknown7,
241 SystemProcessorPerformanceInformation = 8, 240 SystemProcessorPerformanceInformation = 8,
242 Unknown9, 241 Unknown9,
243 Unknown10, 242 Unknown10,
244 SystemDriverInformation, 243 SystemDriverInformation,
245 Unknown12, 244 Unknown12,
246 Unknown13, 245 Unknown13,
247 Unknown14, 246 Unknown14,
248 Unknown15, 247 Unknown15,
249 SystemHandleList, 248 SystemHandleList,
250 Unknown17, 249 Unknown17,
251 Unknown18, 250 Unknown18,
252 Unknown19, 251 Unknown19,
253 Unknown20, 252 Unknown20,
254 SystemCacheInformation, 253 SystemCacheInformation,
255 Unknown22, 254 Unknown22,
256 SystemInterruptInformation = 23, 255 SystemInterruptInformation = 23,
257 SystemExceptionInformation = 33, 256 SystemExceptionInformation = 33,
258 SystemRegistryQuotaInformation = 37, 257 SystemRegistryQuotaInformation = 37,
259 SystemLookasideInformation = 45 258 SystemLookasideInformation = 45
260 }; 259};
261 260
262 typedef struct 261typedef struct
263 { 262{
264 LARGE_INTEGER IdleTime; 263 LARGE_INTEGER IdleTime;
265 LARGE_INTEGER KernelTime; 264 LARGE_INTEGER KernelTime;
266 LARGE_INTEGER UserTime; 265 LARGE_INTEGER UserTime;
267 LARGE_INTEGER Reserved1[2]; 266 LARGE_INTEGER Reserved1[2];
268 ULONG Reserved2; 267 ULONG Reserved2;
269 } SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION; 268} SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION;
270 269
271#define sleep(secs) (Sleep(secs * 1000)) 270#define sleep(secs) (Sleep(secs * 1000))
272 271
@@ -283,11 +282,11 @@ extern "C"
283#define SHUT_RDWR SD_BOTH 282#define SHUT_RDWR SD_BOTH
284 283
285/* Operations for flock() */ 284/* Operations for flock() */
286#define LOCK_SH 1 /* shared lock */ 285#define LOCK_SH 1 /* shared lock */
287#define LOCK_EX 2 /* exclusive lock */ 286#define LOCK_EX 2 /* exclusive lock */
288#define LOCK_NB 4 /* or'd with one of the above to prevent 287#define LOCK_NB 4 /* or'd with one of the above to prevent
289 blocking */ 288 blocking */
290#define LOCK_UN 8 /* remove lock */ 289#define LOCK_UN 8 /* remove lock */
291 290
292/* Not supported under MinGW */ 291/* Not supported under MinGW */
293#define S_IRGRP 0 292#define S_IRGRP 0
@@ -302,6 +301,10 @@ extern "C"
302#define S_IRWXG 0 301#define S_IRWXG 0
303#define S_IRWXO 0 302#define S_IRWXO 0
304 303
304#define SHUT_WR SD_SEND
305#define SHUT_RD SD_RECEIVE
306#define SHUT_RDWR SD_BOTH
307
305#define SetErrnoFromWinError(e) _SetErrnoFromWinError(e, __FILE__, __LINE__) 308#define SetErrnoFromWinError(e) _SetErrnoFromWinError(e, __FILE__, __LINE__)
306 309
307/** 310/**
@@ -309,273 +312,273 @@ extern "C"
309 */ 312 */
310#define index(s, c) strchr(s, c) 313#define index(s, c) strchr(s, c)
311 314
312 BOOL _plibc_CreateShortcut (const char *pszSrc, const char *pszDest); 315BOOL _plibc_CreateShortcut(const char *pszSrc, const char *pszDest);
313 BOOL _plibc_DereferenceShortcut (char *pszShortcut); 316BOOL _plibc_DereferenceShortcut(char *pszShortcut);
314 char *plibc_ChooseDir (char *pszTitle, unsigned long ulFlags); 317char *plibc_ChooseDir(char *pszTitle, unsigned long ulFlags);
315 char *plibc_ChooseFile (char *pszTitle, unsigned long ulFlags); 318char *plibc_ChooseFile(char *pszTitle, unsigned long ulFlags);
316 long QueryRegistry (HKEY hMainKey, char *pszKey, char *pszSubKey, 319long QueryRegistry(HKEY hMainKey, char *pszKey, char *pszSubKey,
317 char *pszBuffer, long *pdLength); 320 char *pszBuffer, long *pdLength);
318 321
319 BOOL __win_IsHandleMarkedAsBlocking (SOCKET hHandle); 322BOOL __win_IsHandleMarkedAsBlocking(SOCKET hHandle);
320 void __win_SetHandleBlockingMode (SOCKET s, BOOL bBlocking); 323void __win_SetHandleBlockingMode(SOCKET s, BOOL bBlocking);
321 void __win_DiscardHandleBlockingMode (SOCKET s); 324void __win_DiscardHandleBlockingMode(SOCKET s);
322 int _win_isSocketValid (int s); 325int _win_isSocketValid(int s);
323 int plibc_conv_to_win_path (const char *pszUnix, char *pszWindows); 326int plibc_conv_to_win_path(const char *pszUnix, char *pszWindows);
324 327
325 typedef void (*TPanicProc) (int, char *); 328typedef void (*TPanicProc) (int, char *);
326 void plibc_set_panic_proc (TPanicProc proc); 329void plibc_set_panic_proc(TPanicProc proc);
327 330
328 int flock (int fd, int operation); 331int flock(int fd, int operation);
329 int fsync (int fildes); 332int fsync(int fildes);
330 int inet_pton (int af, const char *src, void *dst); 333int inet_pton(int af, const char *src, void *dst);
331 int inet_pton4 (const char *src, u_char * dst, int pton); 334int inet_pton4(const char *src, u_char *dst, int pton);
332#if USE_IPV6 335#if USE_IPV6
333 int inet_pton6 (const char *src, u_char * dst); 336int inet_pton6(const char *src, u_char *dst);
334#endif 337#endif
335 int truncate (const char *fname, int distance); 338int truncate(const char *fname, int distance);
336 int statfs (const char *path, struct statfs *buf); 339int statfs(const char *path, struct statfs *buf);
337 const char *hstrerror (int err); 340const char *hstrerror(int err);
338 void gettimeofday (struct timeval *tp, void *tzp); 341void gettimeofday(struct timeval *tp, void *tzp);
339 int mkstemp (char *tmplate); 342int mkstemp(char *tmplate);
340 char *strptime (const char *buf, const char *format, struct tm *tm); 343char *strptime (const char *buf, const char *format, struct tm *tm);
341 char *ctime (const time_t * clock); 344char *ctime(const time_t *clock);
342 char *ctime_r (const time_t * clock, char *buf); 345char *ctime_r(const time_t *clock, char *buf);
343 int plibc_init (char *pszOrg, char *pszApp); 346const char *inet_ntop(int af, const void *src, char *dst, size_t size);
344 void plibc_shutdown (); 347int plibc_init(char *pszOrg, char *pszApp);
345 int plibc_initialized (); 348void plibc_shutdown();
346 int plibc_conv_to_win_path_ex (const char *pszUnix, char *pszWindows, 349int plibc_initialized();
347 int derefLinks); 350int plibc_conv_to_win_path_ex(const char *pszUnix, char *pszWindows, int derefLinks);
348 void _SetErrnoFromWinError (long lWinError, char *pszCaller, int iLine); 351void _SetErrnoFromWinError(long lWinError, char *pszCaller, int iLine);
349 void SetErrnoFromWinsockError (long lWinError); 352void SetErrnoFromWinsockError(long lWinError);
350 void SetHErrnoFromWinError (long lWinError); 353void SetHErrnoFromWinError(long lWinError);
351 void SetErrnoFromHRESULT (HRESULT hRes); 354void SetErrnoFromHRESULT(HRESULT hRes);
352 FILE *_win_fopen (const char *filename, const char *mode); 355FILE *_win_fopen(const char *filename, const char *mode);
353 DIR *_win_opendir (const char *dirname); 356DIR *_win_opendir(const char *dirname);
354 int _win_open (const char *filename, int oflag, ...); 357int _win_open(const char *filename, int oflag, ...);
355#ifdef ENABLE_NLS 358#ifdef ENABLE_NLS
356 char *_win_bindtextdomain (const char *domainname, const char *dirname); 359char *_win_bindtextdomain(const char *domainname, const char *dirname);
357#endif 360#endif
358 int _win_chdir (const char *path); 361int _win_chdir(const char *path);
359 int _win_close (int fd); 362int _win_close(int fd);
360 int _win_creat (const char *path, mode_t mode); 363int _win_creat(const char *path, mode_t mode);
361 int _win_fstat (int handle, struct stat *buffer); 364int _win_fstat(int handle, struct stat *buffer);
362 int _win_pipe (int *phandles); 365int _win_pipe(int *phandles);
363 int _win_rmdir (const char *path); 366int _win_rmdir(const char *path);
364 int _win_access (const char *path, int mode); 367int _win_access( const char *path, int mode );
365 int _win_chmod (const char *filename, int pmode); 368int _win_chmod(const char *filename, int pmode);
366 char *realpath (const char *file_name, char *resolved_name); 369char *realpath(const char *file_name, char *resolved_name);
367 long _win_random (void); 370long _win_random(void);
368 int _win_remove (const char *path); 371int _win_remove(const char *path);
369 int _win_rename (const char *oldname, const char *newname); 372int _win_rename(const char *oldname, const char *newname);
370 int _win_stat (const char *path, struct stat *buffer); 373int _win_stat(const char *path, struct stat *buffer);
371 int _win_stat64 (const char *path, struct stat64 *buffer); 374int _win_stat64(const char *path, struct stat64 *buffer);
372 int _win_unlink (const char *filename); 375int _win_unlink(const char *filename);
373 int _win_write (int fildes, const void *buf, size_t nbyte); 376int _win_write(int fildes, const void *buf, size_t nbyte);
374 int _win_read (int fildes, void *buf, size_t nbyte); 377int _win_read(int fildes, void *buf, size_t nbyte);
375 size_t _win_fwrite (const void *buffer, size_t size, size_t count, 378size_t _win_fwrite(const void *buffer, size_t size, size_t count, FILE *stream);
376 FILE * stream); 379size_t _win_fread( void *buffer, size_t size, size_t count, FILE *stream );
377 size_t _win_fread (void *buffer, size_t size, size_t count, FILE * stream); 380int _win_symlink(const char *path1, const char *path2);
378 int _win_symlink (const char *path1, const char *path2); 381void *_win_mmap(void *start, size_t len, int access, int flags, int fd,
379 void *_win_mmap (void *start, size_t len, int access, int flags, int fd, 382 unsigned long long offset);
380 unsigned long long offset); 383int _win_munmap(void *start, size_t length);
381 int _win_munmap (void *start, size_t length); 384int _win_lstat(const char *path, struct stat *buf);
382 int _win_lstat (const char *path, struct stat *buf); 385int _win_lstat64(const char *path, struct stat64 *buf);
383 int _win_lstat64 (const char *path, struct stat64 *buf); 386int _win_readlink(const char *path, char *buf, size_t bufsize);
384 int _win_readlink (const char *path, char *buf, size_t bufsize); 387int _win_accept(SOCKET s, struct sockaddr *addr, int *addrlen);
385 int _win_accept (SOCKET s, struct sockaddr *addr, int *addrlen); 388int _win_printf(const char *format,...);
386 int _win_printf (const char *format, ...); 389int _win_fprintf(FILE *f,const char *format,...);
387 int _win_fprintf (FILE * f, const char *format, ...); 390int _win_vprintf(const char *format, va_list ap);
388 int _win_vprintf (const char *format, va_list ap); 391int _win_vfprintf(FILE *stream, const char *format, va_list arg_ptr);
389 int _win_vfprintf (FILE * stream, const char *format, va_list arg_ptr); 392int _win_vsprintf(char *dest,const char *format, va_list arg_ptr);
390 int _win_vsprintf (char *dest, const char *format, va_list arg_ptr); 393int _win_vsnprintf(char* str, size_t size, const char *format, va_list arg_ptr);
391 int _win_vsnprintf (char *str, size_t size, const char *format, 394int _win_snprintf(char *str,size_t size,const char *format,...);
392 va_list arg_ptr); 395int _win_sprintf(char *dest,const char *format,...);
393 int _win_snprintf (char *str, size_t size, const char *format, ...); 396int _win_vsscanf(const char* str, const char* format, va_list arg_ptr);
394 int _win_sprintf (char *dest, const char *format, ...); 397int _win_sscanf(const char *str, const char *format, ...);
395 int _win_vsscanf (const char *str, const char *format, va_list arg_ptr); 398int _win_vfscanf(FILE *stream, const char *format, va_list arg_ptr);
396 int _win_sscanf (const char *str, const char *format, ...); 399int _win_vscanf(const char *format, va_list arg_ptr);
397 int _win_vfscanf (FILE * stream, const char *format, va_list arg_ptr); 400int _win_scanf(const char *format, ...);
398 int _win_vscanf (const char *format, va_list arg_ptr); 401int _win_fscanf(FILE *stream, const char *format, ...);
399 int _win_scanf (const char *format, ...); 402pid_t _win_waitpid(pid_t pid, int *stat_loc, int options);
400 int _win_fscanf (FILE * stream, const char *format, ...); 403int _win_bind(SOCKET s, const struct sockaddr *name, int namelen);
401 pid_t _win_waitpid (pid_t pid, int *stat_loc, int options); 404int _win_connect(SOCKET s,const struct sockaddr *name, int namelen);
402 int _win_bind (SOCKET s, const struct sockaddr *name, int namelen); 405int _win_getpeername(SOCKET s, struct sockaddr *name,
403 int _win_connect (SOCKET s, const struct sockaddr *name, int namelen); 406 int *namelen);
404 int _win_getpeername (SOCKET s, struct sockaddr *name, int *namelen); 407int _win_getsockname(SOCKET s, struct sockaddr *name,
405 int _win_getsockname (SOCKET s, struct sockaddr *name, int *namelen); 408 int *namelen);
406 int _win_getsockopt (SOCKET s, int level, int optname, char *optval, 409int _win_getsockopt(SOCKET s, int level, int optname, char *optval,
407 int *optlen); 410 int *optlen);
408 int _win_listen (SOCKET s, int backlog); 411int _win_listen(SOCKET s, int backlog);
409 int _win_recv (SOCKET s, char *buf, int len, int flags); 412int _win_recv(SOCKET s, char *buf, int len, int flags);
410 int _win_recvfrom (SOCKET s, void *buf, int len, int flags, 413int _win_recvfrom(SOCKET s, void *buf, int len, int flags,
411 struct sockaddr *from, int *fromlen); 414 struct sockaddr *from, int *fromlen);
412 int _win_select (int max_fd, fd_set * rfds, fd_set * wfds, fd_set * efds, 415int _win_select(int max_fd, fd_set * rfds, fd_set * wfds, fd_set * efds,
413 const struct timeval *tv); 416 const struct timeval *tv);
414 int _win_send (SOCKET s, const char *buf, int len, int flags); 417int _win_send(SOCKET s, const char *buf, int len, int flags);
415 int _win_sendto (SOCKET s, const char *buf, int len, int flags, 418int _win_sendto(SOCKET s, const char *buf, int len, int flags,
416 const struct sockaddr *to, int tolen); 419 const struct sockaddr *to, int tolen);
417 int _win_setsockopt (SOCKET s, int level, int optname, const void *optval, 420int _win_setsockopt(SOCKET s, int level, int optname, const void *optval,
418 int optlen); 421 int optlen);
419 int _win_shutdown (SOCKET s, int how); 422int _win_shutdown(SOCKET s, int how);
420 SOCKET _win_socket (int af, int type, int protocol); 423SOCKET _win_socket(int af, int type, int protocol);
421 struct hostent *_win_gethostbyaddr (const char *addr, int len, int type); 424struct hostent *_win_gethostbyaddr(const char *addr, int len, int type);
422 struct hostent *_win_gethostbyname (const char *name); 425struct hostent *_win_gethostbyname(const char *name);
423 char *_win_strerror (int errnum); 426char *_win_strerror(int errnum);
424 int IsWinNT (); 427int IsWinNT();
425 428
426#if !HAVE_STRNDUP 429#if !HAVE_STRNDUP
427 char *strndup (const char *s, size_t n); 430char *strndup (const char *s, size_t n);
428#endif 431#endif
429#if !HAVE_STRNLEN 432#if !HAVE_STRNLEN
430 size_t strnlen (const char *str, size_t maxlen); 433size_t strnlen (const char *str, size_t maxlen);
431#endif 434#endif
432 435
433#define strcasecmp(a, b) stricmp(a, b) 436#define strcasecmp(a, b) stricmp(a, b)
434#define strncasecmp(a, b, c) strnicmp(a, b, c) 437#define strncasecmp(a, b, c) strnicmp(a, b, c)
435 438
436#endif /* WINDOWS */ 439#endif /* WINDOWS */
437 440
438#ifndef WINDOWS 441#ifndef WINDOWS
439#define DIR_SEPARATOR '/' 442 #define DIR_SEPARATOR '/'
440#define DIR_SEPARATOR_STR "/" 443 #define DIR_SEPARATOR_STR "/"
441#define PATH_SEPARATOR ';' 444 #define PATH_SEPARATOR ';'
442#define PATH_SEPARATOR_STR ";" 445 #define PATH_SEPARATOR_STR ";"
443#define NEWLINE "\n" 446 #define NEWLINE "\n"
444 447
445#ifdef ENABLE_NLS 448#ifdef ENABLE_NLS
446#define BINDTEXTDOMAIN(d, n) bindtextdomain(d, n) 449 #define BINDTEXTDOMAIN(d, n) bindtextdomain(d, n)
447#endif 450#endif
448#define CREAT(p, m) creat(p, m) 451 #define CREAT(p, m) creat(p, m)
449#undef FOPEN 452 #undef FOPEN
450#define FOPEN(f, m) fopen(f, m) 453 #define FOPEN(f, m) fopen(f, m)
451#define OPENDIR(d) opendir(d) 454 #define OPENDIR(d) opendir(d)
452#define OPEN(f) open(f) 455 #define OPEN(f) open(f)
453#define CHDIR(d) chdir(d) 456 #define CHDIR(d) chdir(d)
454#define CLOSE(f) close(f) 457 #define CLOSE(f) close(f)
455#define RMDIR(f) rmdir(f) 458 #define RMDIR(f) rmdir(f)
456#define ACCESS(p, m) access(p, m) 459 #define ACCESS(p, m) access(p, m)
457#define CHMOD(f, p) chmod(f, p) 460 #define CHMOD(f, p) chmod(f, p)
458#define FSTAT(h, b) fstat(h, b) 461 #define FSTAT(h, b) fstat(h, b)
459#define PIPE(h) pipe(h) 462 #define PIPE(h) pipe(h)
460#define REMOVE(p) remove(p) 463 #define REMOVE(p) remove(p)
461#define RENAME(o, n) rename(o, n) 464 #define RENAME(o, n) rename(o, n)
462#define STAT(p, b) stat(p, b) 465 #define STAT(p, b) stat(p, b)
463#define STAT64(p, b) stat64(p, b) 466 #define STAT64(p, b) stat64(p, b)
464#define UNLINK(f) unlink(f) 467 #define UNLINK(f) unlink(f)
465#define WRITE(f, b, n) write(f, b, n) 468 #define WRITE(f, b, n) write(f, b, n)
466#define READ(f, b, n) read(f, b, n) 469 #define READ(f, b, n) read(f, b, n)
467#define GN_FREAD(b, s, c, f) fread(b, s, c, f) 470 #define GN_FREAD(b, s, c, f) fread(b, s, c, f)
468#define GN_FWRITE(b, s, c, f) fwrite(b, s, c, f) 471 #define GN_FWRITE(b, s, c, f) fwrite(b, s, c, f)
469#define SYMLINK(a, b) symlink(a, b) 472 #define SYMLINK(a, b) symlink(a, b)
470#define MMAP(s, l, p, f, d, o) mmap(s, l, p, f, d, o) 473 #define MMAP(s, l, p, f, d, o) mmap(s, l, p, f, d, o)
471#define MUNMAP(s, l) munmap(s, l) 474 #define MUNMAP(s, l) munmap(s, l)
472#define STRERROR(i) strerror(i) 475 #define STRERROR(i) strerror(i)
473#define RANDOM() random() 476 #define RANDOM() random()
474#define READLINK(p, b, s) readlink(p, b, s) 477 #define READLINK(p, b, s) readlink(p, b, s)
475#define LSTAT(p, b) lstat(p, b) 478 #define LSTAT(p, b) lstat(p, b)
476#define LSTAT64(p, b) lstat64(p, b) 479 #define LSTAT64(p, b) lstat64(p, b)
477#define PRINTF printf 480 #define PRINTF printf
478#define FPRINTF fprintf 481 #define FPRINTF fprintf
479#define VPRINTF(f, a) vprintf(f, a) 482 #define VPRINTF(f, a) vprintf(f, a)
480#define VFPRINTF(s, f, a) vfprintf(s, f, a) 483 #define VFPRINTF(s, f, a) vfprintf(s, f, a)
481#define VSPRINTF(d, f, a) vsprintf(d, f, a) 484 #define VSPRINTF(d, f, a) vsprintf(d, f, a)
482#define VSNPRINTF(str, size, fmt, a) vsnprintf(str, size, fmt, a) 485 #define VSNPRINTF(str, size, fmt, a) vsnprintf(str, size, fmt, a)
483#define _REAL_SNPRINTF snprintf 486 #define _REAL_SNPRINTF snprintf
484#define SPRINTF sprintf 487 #define SPRINTF sprintf
485#define VSSCANF(s, f, a) vsscanf(s, f, a) 488 #define VSSCANF(s, f, a) vsscanf(s, f, a)
486#define SSCANF sscanf 489 #define SSCANF sscanf
487#define VFSCANF(s, f, a) vfscanf(s, f, a) 490 #define VFSCANF(s, f, a) vfscanf(s, f, a)
488#define VSCANF(f, a) vscanf(f, a) 491 #define VSCANF(f, a) vscanf(f, a)
489#define SCANF scanf 492 #define SCANF scanf
490#define FSCANF fscanf 493 #define FSCANF fscanf
491#define WAITPID(p, s, o) waitpid(p, s, o) 494 #define WAITPID(p, s, o) waitpid(p, s, o)
492#define ACCEPT(s, a, l) accept(s, a, l) 495 #define ACCEPT(s, a, l) accept(s, a, l)
493#define BIND(s, n, l) bind(s, n, l) 496 #define BIND(s, n, l) bind(s, n, l)
494#define CONNECT(s, n, l) connect(s, n, l) 497 #define CONNECT(s, n, l) connect(s, n, l)
495#define GETPEERNAME(s, n, l) getpeername(s, n, l) 498 #define GETPEERNAME(s, n, l) getpeername(s, n, l)
496#define GETSOCKNAME(s, n, l) getsockname(s, n, l) 499 #define GETSOCKNAME(s, n, l) getsockname(s, n, l)
497#define GETSOCKOPT(s, l, o, v, p) getsockopt(s, l, o, v, p) 500 #define GETSOCKOPT(s, l, o, v, p) getsockopt(s, l, o, v, p)
498#define LISTEN(s, b) listen(s, b) 501 #define LISTEN(s, b) listen(s, b)
499#define RECV(s, b, l, f) recv(s, b, l, f) 502 #define RECV(s, b, l, f) recv(s, b, l, f)
500#define RECVFROM(s, b, l, f, r, o) recvfrom(s, b, l, f, r, o) 503 #define RECVFROM(s, b, l, f, r, o) recvfrom(s, b, l, f, r, o)
501#define SELECT(n, r, w, e, t) select(n, r, w, e, t) 504 #define SELECT(n, r, w, e, t) select(n, r, w, e, t)
502#define SEND(s, b, l, f) send(s, b, l, f) 505 #define SEND(s, b, l, f) send(s, b, l, f)
503#define SENDTO(s, b, l, f, o, n) sendto(s, b, l, f, o, n) 506 #define SENDTO(s, b, l, f, o, n) sendto(s, b, l, f, o, n)
504#define SETSOCKOPT(s, l, o, v, n) setsockopt(s, l, o, v, n) 507 #define SETSOCKOPT(s, l, o, v, n) setsockopt(s, l, o, v, n)
505#define SHUTDOWN(s, h) shutdown(s, h) 508 #define SHUTDOWN(s, h) shutdown(s, h)
506#define SOCKET(a, t, p) socket(a, t, p) 509 #define SOCKET(a, t, p) socket(a, t, p)
507#define GETHOSTBYADDR(a, l, t) gethostbyname(a, l, t) 510 #define GETHOSTBYADDR(a, l, t) gethostbyname(a, l, t)
508#define GETHOSTBYNAME(n) gethostbyname(n) 511 #define GETHOSTBYNAME(n) gethostbyname(n)
509#else 512#else
510#define DIR_SEPARATOR '\\' 513 #define DIR_SEPARATOR '\\'
511#define DIR_SEPARATOR_STR "\\" 514 #define DIR_SEPARATOR_STR "\\"
512#define PATH_SEPARATOR ':' 515 #define PATH_SEPARATOR ':'
513#define PATH_SEPARATOR_STR ":" 516 #define PATH_SEPARATOR_STR ":"
514#define NEWLINE "\r\n" 517 #define NEWLINE "\r\n"
515 518
516#ifdef ENABLE_NLS 519#ifdef ENABLE_NLS
517#define BINDTEXTDOMAIN(d, n) _win_bindtextdomain(d, n) 520 #define BINDTEXTDOMAIN(d, n) _win_bindtextdomain(d, n)
518#endif 521#endif
519#define CREAT(p, m) _win_creat(p, m) 522 #define CREAT(p, m) _win_creat(p, m)
520#define FOPEN(f, m) _win_fopen(f, m) 523 #define FOPEN(f, m) _win_fopen(f, m)
521#define OPENDIR(d) _win_opendir(d) 524 #define OPENDIR(d) _win_opendir(d)
522#define OPEN(f) _win_open(f) 525 #define OPEN(f) _win_open(f)
523#define CHDIR(d) _win_chdir(d) 526 #define CHDIR(d) _win_chdir(d)
524#define CLOSE(f) _win_close(f) 527 #define CLOSE(f) _win_close(f)
525#define FSTAT(h, b) _win_fstat(h, b) 528 #define FSTAT(h, b) _win_fstat(h, b)
526#define RMDIR(f) _win_rmdir(f) 529 #define RMDIR(f) _win_rmdir(f)
527#define ACCESS(p, m) _win_access(p, m) 530 #define ACCESS(p, m) _win_access(p, m)
528#define CHMOD(f, p) _win_chmod(f, p) 531 #define CHMOD(f, p) _win_chmod(f, p)
529#define PIPE(h) _win_pipe(h) 532 #define PIPE(h) _win_pipe(h)
530#define RANDOM() _win_random() 533 #define RANDOM() _win_random()
531#define REMOVE(p) _win_remove(p) 534 #define REMOVE(p) _win_remove(p)
532#define RENAME(o, n) _win_rename(o, n) 535 #define RENAME(o, n) _win_rename(o, n)
533#define STAT(p, b) _win_stat(p, b) 536 #define STAT(p, b) _win_stat(p, b)
534#define STAT64(p, b) _win_stat64(p, b) 537 #define STAT64(p, b) _win_stat64(p, b)
535#define UNLINK(f) _win_unlink(f) 538 #define UNLINK(f) _win_unlink(f)
536#define WRITE(f, b, n) _win_write(f, b, n) 539 #define WRITE(f, b, n) _win_write(f, b, n)
537#define READ(f, b, n) _win_read(f, b, n) 540 #define READ(f, b, n) _win_read(f, b, n)
538#define GN_FREAD(b, s, c, f) _win_fread(b, s, c, f) 541 #define GN_FREAD(b, s, c, f) _win_fread(b, s, c, f)
539#define GN_FWRITE(b, s, c, f) _win_fwrite(b, s, c, f) 542 #define GN_FWRITE(b, s, c, f) _win_fwrite(b, s, c, f)
540#define SYMLINK(a, b) _win_symlink(a, b) 543 #define SYMLINK(a, b) _win_symlink(a, b)
541#define MMAP(s, l, p, f, d, o) _win_mmap(s, l, p, f, d, o) 544 #define MMAP(s, l, p, f, d, o) _win_mmap(s, l, p, f, d, o)
542#define MUNMAP(s, l) _win_munmap(s, l) 545 #define MUNMAP(s, l) _win_munmap(s, l)
543#define STRERROR(i) _win_strerror(i) 546 #define STRERROR(i) _win_strerror(i)
544#define READLINK(p, b, s) _win_readlink(p, b, s) 547 #define READLINK(p, b, s) _win_readlink(p, b, s)
545#define LSTAT(p, b) _win_lstat(p, b) 548 #define LSTAT(p, b) _win_lstat(p, b)
546#define LSTAT64(p, b) _win_lstat64(p, b) 549 #define LSTAT64(p, b) _win_lstat64(p, b)
547#define PRINTF(f, ...) _win_printf(f , __VA_ARGS__) 550 #define PRINTF(f, ...) _win_printf(f , __VA_ARGS__)
548#define FPRINTF(fil, fmt, ...) _win_fprintf(fil, fmt, __VA_ARGS__) 551 #define FPRINTF(fil, fmt, ...) _win_fprintf(fil, fmt, __VA_ARGS__)
549#define VPRINTF(f, a) _win_vprintf(f, a) 552 #define VPRINTF(f, a) _win_vprintf(f, a)
550#define VFPRINTF(s, f, a) _win_vfprintf(s, f, a) 553 #define VFPRINTF(s, f, a) _win_vfprintf(s, f, a)
551#define VSPRINTF(d, f, a) _win_vsprintf(d, f, a) 554 #define VSPRINTF(d, f, a) _win_vsprintf(d, f, a)
552#define VSNPRINTF(str, size, fmt, a) _win_vsnprintf(str, size, fmt, a) 555 #define VSNPRINTF(str, size, fmt, a) _win_vsnprintf(str, size, fmt, a)
553#define _REAL_SNPRINTF(str, size, fmt, ...) _win_snprintf(str, size, fmt, __VA_ARGS__) 556 #define _REAL_SNPRINTF(str, size, fmt, ...) _win_snprintf(str, size, fmt, __VA_ARGS__)
554#define SPRINTF(d, f, ...) _win_sprintf(d, f, __VA_ARGS__) 557 #define SPRINTF(d, f, ...) _win_sprintf(d, f, __VA_ARGS__)
555#define VSSCANF(s, f, a) _win_vsscanf(s, f, a) 558 #define VSSCANF(s, f, a) _win_vsscanf(s, f, a)
556#define SSCANF(s, f, ...) _win_sscanf(s, f, __VA_ARGS__) 559 #define SSCANF(s, f, ...) _win_sscanf(s, f, __VA_ARGS__)
557#define VFSCANF(s, f, a) _win_vfscanf(s, f, a) 560 #define VFSCANF(s, f, a) _win_vfscanf(s, f, a)
558#define VSCANF(f, a) _win_vscanf(f, a) 561 #define VSCANF(f, a) _win_vscanf(f, a)
559#define SCANF(f, ...) _win_scanf(f, __VA_ARGS__) 562 #define SCANF(f, ...) _win_scanf(f, __VA_ARGS__)
560#define FSCANF(s, f, ...) _win_fscanf(s, f, __VA_ARGS__) 563 #define FSCANF(s, f, ...) _win_fscanf(s, f, __VA_ARGS__)
561#define WAITPID(p, s, o) _win_waitpid(p, s, o) 564 #define WAITPID(p, s, o) _win_waitpid(p, s, o)
562#define ACCEPT(s, a, l) _win_accept(s, a, l) 565 #define ACCEPT(s, a, l) _win_accept(s, a, l)
563#define BIND(s, n, l) _win_bind(s, n, l) 566 #define BIND(s, n, l) _win_bind(s, n, l)
564#define CONNECT(s, n, l) _win_connect(s, n, l) 567 #define CONNECT(s, n, l) _win_connect(s, n, l)
565#define GETPEERNAME(s, n, l) _win_getpeername(s, n, l) 568 #define GETPEERNAME(s, n, l) _win_getpeername(s, n, l)
566#define GETSOCKNAME(s, n, l) _win_getsockname(s, n, l) 569 #define GETSOCKNAME(s, n, l) _win_getsockname(s, n, l)
567#define GETSOCKOPT(s, l, o, v, p) _win_getsockopt(s, l, o, v, p) 570 #define GETSOCKOPT(s, l, o, v, p) _win_getsockopt(s, l, o, v, p)
568#define LISTEN(s, b) _win_listen(s, b) 571 #define LISTEN(s, b) _win_listen(s, b)
569#define RECV(s, b, l, f) _win_recv(s, b, l, f) 572 #define RECV(s, b, l, f) _win_recv(s, b, l, f)
570#define RECVFROM(s, b, l, f, r, o) _win_recvfrom(s, b, l, f, r, o) 573 #define RECVFROM(s, b, l, f, r, o) _win_recvfrom(s, b, l, f, r, o)
571#define SELECT(n, r, w, e, t) _win_select(n, r, w, e, t) 574 #define SELECT(n, r, w, e, t) _win_select(n, r, w, e, t)
572#define SEND(s, b, l, f) _win_send(s, b, l, f) 575 #define SEND(s, b, l, f) _win_send(s, b, l, f)
573#define SENDTO(s, b, l, f, o, n) _win_sendto(s, b, l, f, o, n) 576 #define SENDTO(s, b, l, f, o, n) _win_sendto(s, b, l, f, o, n)
574#define SETSOCKOPT(s, l, o, v, n) _win_setsockopt(s, l, o, v, n) 577 #define SETSOCKOPT(s, l, o, v, n) _win_setsockopt(s, l, o, v, n)
575#define SHUTDOWN(s, h) _win_shutdown(s, h) 578 #define SHUTDOWN(s, h) _win_shutdown(s, h)
576#define SOCKET(a, t, p) _win_socket(a, t, p) 579 #define SOCKET(a, t, p) _win_socket(a, t, p)
577#define GETHOSTBYADDR(a, l, t) _win_gethostbyname(a, l, t) 580 #define GETHOSTBYADDR(a, l, t) _win_gethostbyname(a, l, t)
578#define GETHOSTBYNAME(n) _win_gethostbyname(n) 581 #define GETHOSTBYNAME(n) _win_gethostbyname(n)
579#endif 582#endif
580 583
581 584
@@ -584,6 +587,6 @@ extern "C"
584#endif 587#endif
585 588
586 589
587#endif //_PLIBC_H_ 590#endif //_PLIBC_H_
588 591
589/* end of plibc.h */ 592/* end of plibc.h */