# HG changeset patch # User Herman Bloggs # Date 1035225201 0 # Node ID 813304a57f881e6b57616eedd3addb3fe4b5f0b5 # Parent 10ffafd1c91fb8a9466c07e2cc6b122c5244df33 [gaim-migrate @ 3918] libc_interface portions moved to libc_interface.h committer: Tailor Script diff -r 10ffafd1c91f -r 813304a57f88 src/win32/win32dep.h --- a/src/win32/win32dep.h Mon Oct 21 18:32:24 2002 +0000 +++ b/src/win32/win32dep.h Mon Oct 21 18:33:21 2002 +0000 @@ -7,6 +7,8 @@ #include #include #include "winerror.h" +#include "libc_interface.h" + /* * PROTOS @@ -21,76 +23,10 @@ gpointer data); extern void wgaim_init(void); -/* sys/socket.h */ -extern int wgaim_socket(int namespace, int style, int protocol); -extern int wgaim_connect(int socket, struct sockaddr *addr, u_long length); -extern int wgaim_getsockopt(int socket, int level, int optname, void *optval, unsigned int *optlenptr); -/* sys/ioctl.h */ -extern int wgaim_ioctl(int fd, int command, void* opt); -/* fcntl.h */ -extern int wgaim_fcntl(int socket, int command, int val); -/* arpa/inet.h */ -extern int wgaim_inet_aton(const char *name, struct in_addr *addr); -/* netdb.h */ -extern struct hostent* wgaim_gethostbyname(const char *name); -/* string.h */ -extern char* wgaim_strerror( int errornum ); -/* unistd.h */ -extern int wgaim_read(int fd, void *buf, unsigned int size); -extern int wgaim_write(int fd, const void *buf, unsigned int size); -extern int wgaim_close(int fd); - /* * MACROS */ -#define bzero( dest, size ) memset( ## dest ##, 0, ## size ## ) -#define sleep(x) Sleep((x)*1000) -#define snprintf _snprintf -#define vsnprintf _vsnprintf -#define mkdir(a,b) _mkdir((a)) -#define open( args... ) _open( ## args ) - -/* sockets */ -#define socket( namespace, style, protocol ) \ -wgaim_socket( ## namespace ##, ## style ##, ## protocol ## ) - -#define connect( socket, addr, length ) \ -wgaim_connect( ## socket ##, ## addr ##, ## length ## ) - -#define getsockopt( args... ) \ -wgaim_getsockopt( ## args ) - -#define read( fd, buf, buflen ) \ -wgaim_read( ## fd ##, ## buf ##, ## buflen ## ) - -#define write( socket, buf, buflen ) \ -wgaim_write( ## socket ##, ## buf ##, ## buflen ## ) - -#define close( fd ) \ -wgaim_close( ## fd ## ) - -#define inet_aton( name, addr ) \ -wgaim_inet_aton( ## name ##, ## addr ## ) - -/* hostent */ -#define gethostbyname( name ) \ -wgaim_gethostbyname( ## name ## ) - -#define hstrerror( herror ) wgaim_strerror( errno ) - -/* fcntl commands & options */ -#define F_SETFL 1 -#define O_NONBLOCK 1 -#define fcntl( fd, command, val ) \ -wgaim_fcntl( ## fd ##, ## command ##, ## val ## ) - -#define ioctl( fd, command, val ) \ -wgaim_ioctl( ## fd ##, ## command ##, ## val ## ) - -#define strerror( errornum ) \ -wgaim_strerror( ## errornum ## ) - /* * Gaim specific */