Thu, 30 Jan 2003 21:25:24 +0000
[gaim-migrate @ 4756]
The last of gtk-related code is out of the conversation framework. There
are now functions to set and retrieve the conversation window UI operations
structures that will be used in all windows.
| 3776 | 1 | /* |
| 2 | * libc_interface.h | |
| 3 | */ | |
| 4 | ||
| 5 | #ifndef _LIBC_INTERFACE_H_ | |
| 6 | #define _LIBC_INTERFACE_H_ | |
| 7 | #include <winsock.h> | |
| 8 | #include <errno.h> | |
| 9 | #include "libc_internal.h" | |
| 10 | ||
| 11 | /* sys/socket.h */ | |
| 12 | extern int wgaim_socket(int namespace, int style, int protocol); | |
| 13 | #define socket( namespace, style, protocol ) \ | |
| 14 | wgaim_socket( ## namespace ##, ## style ##, ## protocol ## ) | |
| 15 | ||
| 16 | extern int wgaim_connect(int socket, struct sockaddr *addr, u_long length); | |
| 17 | #define connect( socket, addr, length ) \ | |
| 18 | wgaim_connect( ## socket ##, ## addr ##, ## length ## ) | |
| 19 | ||
| 20 | extern int wgaim_getsockopt(int socket, int level, int optname, void *optval, unsigned int *optlenptr); | |
| 21 | #define getsockopt( args... ) \ | |
| 22 | wgaim_getsockopt( ## args ) | |
| 23 | ||
| 24 | /* sys/ioctl.h */ | |
| 25 | extern int wgaim_ioctl(int fd, int command, void* opt); | |
| 26 | #define ioctl( fd, command, val ) \ | |
| 27 | wgaim_ioctl( ## fd ##, ## command ##, ## val ## ) | |
| 28 | ||
| 29 | /* fcntl.h */ | |
| 30 | extern int wgaim_fcntl(int socket, int command, int val); | |
| 31 | #define fcntl( fd, command, val ) \ | |
| 32 | wgaim_fcntl( ## fd ##, ## command ##, ## val ## ) | |
| 33 | ||
| 34 | #define open( args... ) _open( ## args ) | |
| 35 | ||
| 36 | /* arpa/inet.h */ | |
| 37 | extern int wgaim_inet_aton(const char *name, struct in_addr *addr); | |
| 38 | #define inet_aton( name, addr ) \ | |
| 39 | wgaim_inet_aton( ## name ##, ## addr ## ) | |
| 40 | ||
| 41 | /* netdb.h */ | |
| 42 | extern struct hostent* wgaim_gethostbyname(const char *name); | |
| 43 | #define gethostbyname( name ) \ | |
| 44 | wgaim_gethostbyname( ## name ## ) | |
| 45 | ||
| 46 | /* string.h */ | |
| 47 | extern char* wgaim_strerror( int errornum ); | |
| 48 | #define hstrerror( herror ) \ | |
| 49 | wgaim_strerror( errno ) | |
| 50 | #define strerror( errornum ) \ | |
| 51 | wgaim_strerror( ## errornum ## ) | |
| 52 | ||
|
4193
0f6072a0ffa4
[gaim-migrate @ 4424]
Herman Bloggs <herman@bluedigits.com>
parents:
3776
diff
changeset
|
53 | extern char* wgaim_strsep(char **stringp, const char *delim); |
|
0f6072a0ffa4
[gaim-migrate @ 4424]
Herman Bloggs <herman@bluedigits.com>
parents:
3776
diff
changeset
|
54 | #define strsep( stringp, delim ) \ |
|
0f6072a0ffa4
[gaim-migrate @ 4424]
Herman Bloggs <herman@bluedigits.com>
parents:
3776
diff
changeset
|
55 | wgaim_strsep( ## stringp ##, ## delim ## ) |
|
0f6072a0ffa4
[gaim-migrate @ 4424]
Herman Bloggs <herman@bluedigits.com>
parents:
3776
diff
changeset
|
56 | |
| 3776 | 57 | #define bzero( dest, size ) memset( ## dest ##, 0, ## size ## ) |
| 58 | ||
| 59 | /* unistd.h */ | |
| 60 | extern int wgaim_read(int fd, void *buf, unsigned int size); | |
| 61 | #define read( fd, buf, buflen ) \ | |
| 62 | wgaim_read( ## fd ##, ## buf ##, ## buflen ## ) | |
| 63 | ||
| 64 | extern int wgaim_write(int fd, const void *buf, unsigned int size); | |
| 65 | #define write( socket, buf, buflen ) \ | |
| 66 | wgaim_write( ## socket ##, ## buf ##, ## buflen ## ) | |
| 67 | ||
| 68 | extern int wgaim_close(int fd); | |
| 69 | #define close( fd ) \ | |
| 70 | wgaim_close( ## fd ## ) | |
| 71 | ||
| 72 | #define sleep(x) Sleep((x)*1000) | |
| 73 | ||
| 74 | /* sys/time.h */ | |
| 75 | extern int wgaim_gettimeofday(struct timeval *p, struct timezone *z); | |
| 76 | #define gettimeofday( timeval, timezone ) \ | |
| 77 | wgaim_gettimeofday( ## timeval ##, ## timezone ## ) | |
| 78 | ||
| 79 | /* stdio.h */ | |
| 80 | #define snprintf _snprintf | |
| 81 | #define vsnprintf _vsnprintf | |
| 82 | ||
| 83 | /* sys/stat.h */ | |
| 84 | #define mkdir(a,b) _mkdir((a)) | |
|
4373
fb2ae2f5edd3
[gaim-migrate @ 4639]
Herman Bloggs <herman@bluedigits.com>
parents:
4193
diff
changeset
|
85 | #define fchmod(a,b) |
| 3776 | 86 | |
| 87 | #endif /* _LIBC_INTERFACE_H_ */ |