Mercurial > pidgin
diff src/win32/libc_interface.h @ 8244:5e7ffea3f76a
[gaim-migrate @ 8967]
Now using winsock2.h, included in libc_interface.h. Some more functions added to libc_interface.c
committer: Tailor Script <tailor@pidgin.im>
author | Herman Bloggs <hermanator12002@yahoo.com> |
---|---|
date | Thu, 12 Feb 2004 19:54:18 +0000 |
parents | 59ffe137176d |
children | 98d8faecf5f1 |
line wrap: on
line diff
--- a/src/win32/libc_interface.h Thu Feb 12 19:17:54 2004 +0000 +++ b/src/win32/libc_interface.h Thu Feb 12 19:54:18 2004 +0000 @@ -22,7 +22,8 @@ */ #ifndef _LIBC_INTERFACE_H_ #define _LIBC_INTERFACE_H_ -#include <winsock.h> +#include <winsock2.h> +#include <ws2tcpip.h> #include <io.h> #include <errno.h> #include "libc_internal.h" @@ -40,6 +41,22 @@ #define getsockopt( args... ) \ wgaim_getsockopt( args ) +extern int wgaim_setsockopt(int socket, int level, int optname, void *optval, unsigned int *optlenptr); +#define setsockopt( args... ) \ +wgaim_setsockopt( args ) + +extern int wgaim_getsockname (int socket, struct sockaddr *addr, socklen_t *lenptr); +#define getsockname( socket, addr, lenptr ) \ +wgaim_getsockname( socket, addr, lenptr ) + +extern int wgaim_bind(int socket, struct sockaddr *addr, socklen_t length); +#define bind( socket, addr, length ) \ +wgaim_bind( socket, addr, length ) + +extern int wgaim_listen(int socket, unsigned int n); +#define listen( socket, n ) \ +wgaim_listen( socket, n ) + /* sys/ioctl.h */ extern int wgaim_ioctl(int fd, int command, void* opt); #define ioctl( fd, command, val ) \ @@ -94,6 +111,10 @@ #define sleep(x) Sleep((x)*1000) +extern int wgaim_gethostname(char *name, size_t size); +#define gethostname( name, size ) \ +wgaim_gethostname( name, size ) + /* sys/time.h */ extern int wgaim_gettimeofday(struct timeval *p, struct timezone *z); #define gettimeofday( timeval, timezone ) \