Mercurial > pidgin
comparison libgaim/win32/libc_interface.h @ 14912:390519f29a11
[gaim-migrate @ 17684]
g_access() is GTK >= 2.8 - add a wrapper (for wingaim I included the code from glib to deal with filename encoding issues)
Add inet_ntop() implementation for wingaim.
committer: Tailor Script <tailor@pidgin.im>
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Mon, 06 Nov 2006 20:29:24 +0000 |
parents | ab8a105eff62 |
children | 59189ce09f10 |
comparison
equal
deleted
inserted
replaced
14911:9f3be32d0913 | 14912:390519f29a11 |
---|---|
70 /* fcntl.h */ | 70 /* fcntl.h */ |
71 int wgaim_fcntl(int socket, int command, int val); | 71 int wgaim_fcntl(int socket, int command, int val); |
72 #define fcntl( fd, command, val ) \ | 72 #define fcntl( fd, command, val ) \ |
73 wgaim_fcntl( fd, command, val ) | 73 wgaim_fcntl( fd, command, val ) |
74 | 74 |
75 #if !GLIB_CHECK_VERSION(2,6,0) | |
76 # define open( args... ) _open( args ) | |
77 #endif | |
78 | |
79 /* arpa/inet.h */ | 75 /* arpa/inet.h */ |
80 int wgaim_inet_aton(const char *name, struct in_addr *addr); | 76 int wgaim_inet_aton(const char *name, struct in_addr *addr); |
81 #define inet_aton( name, addr ) \ | 77 #define inet_aton( name, addr ) \ |
82 wgaim_inet_aton( name, addr ) | 78 wgaim_inet_aton( name, addr ) |
79 | |
80 const char * | |
81 wgaim_inet_ntop (int af, const void *src, char *dst, socklen_t cnt); | |
82 #define inet_ntop( af, src, dst, cnt ) \ | |
83 wgaim_inet_ntop( af, src, dst, cnt ) | |
83 | 84 |
84 /* netdb.h */ | 85 /* netdb.h */ |
85 struct hostent* wgaim_gethostbyname(const char *name); | 86 struct hostent* wgaim_gethostbyname(const char *name); |
86 #define gethostbyname( name ) \ | 87 #define gethostbyname( name ) \ |
87 wgaim_gethostbyname( name ) | 88 wgaim_gethostbyname( name ) |
118 | 119 |
119 int wgaim_close(int fd); | 120 int wgaim_close(int fd); |
120 #define close( fd ) \ | 121 #define close( fd ) \ |
121 wgaim_close( fd ) | 122 wgaim_close( fd ) |
122 | 123 |
124 #if !GLIB_CHECK_VERSION(2,8,0) | |
125 int wgaim_g_access(const gchar *filename, int mode); | |
126 #undef g_access | |
127 #define g_access( filename, mode) \ | |
128 wgaim_g_access( filename, mode ) | |
129 #endif | |
130 | |
123 #ifndef sleep | 131 #ifndef sleep |
124 #define sleep(x) Sleep((x)*1000) | 132 #define sleep(x) Sleep((x)*1000) |
125 #endif | 133 #endif |
126 | 134 |
127 int wgaim_gethostname(char *name, size_t size); | 135 int wgaim_gethostname(char *name, size_t size); |
151 #endif | 159 #endif |
152 | 160 |
153 | 161 |
154 /* sys/stat.h */ | 162 /* sys/stat.h */ |
155 | 163 |
156 #if !GLIB_CHECK_VERSION(2,6,0) | |
157 #define mkdir(a,b) _mkdir((a)) | |
158 #endif | |
159 #define fchmod(a,b) | 164 #define fchmod(a,b) |
160 | 165 |
161 /* time.h */ | 166 /* time.h */ |
162 struct tm *wgaim_localtime_r(const time_t *time, struct tm *resultp); | 167 struct tm *wgaim_localtime_r(const time_t *time, struct tm *resultp); |
163 #define localtime_r( time, resultp ) \ | 168 #define localtime_r( time, resultp ) \ |