anope- supernets anope source code & configuration |
git clone git://git.acid.vegas/anope.git |
Log | Files | Refs | Archive | README |
socket.h (947B)
1 /* POSIX emulation layer for Windows. 2 * 3 * (C) 2008-2022 Anope Team 4 * Contact us at team@anope.org 5 * 6 * Please read COPYING and README for further details. 7 */ 8 9 #define read read_not_used 10 #define write write_not_used 11 #include <io.h> 12 #undef read 13 #undef write 14 15 #define F_GETFL 0 16 #define F_SETFL 1 17 18 #define O_NONBLOCK 1 19 20 extern CoreExport int read(int fd, char *buf, size_t count); 21 extern CoreExport int write(int fd, const char *buf, size_t count); 22 extern CoreExport int windows_close(int fd); 23 extern CoreExport int windows_accept(int fd, struct sockaddr *addr, int *addrlen); 24 extern CoreExport int windows_inet_pton(int af, const char *src, void *dst); 25 extern CoreExport const char *windows_inet_ntop(int af, const void *src, char *dst, size_t size); 26 extern CoreExport int fcntl(int fd, int cmd, int arg); 27 28 #ifndef WIN32_NO_OVERRIDE 29 # define accept windows_accept 30 # define inet_pton windows_inet_pton 31 # define inet_ntop windows_inet_ntop 32 #endif