libpurple/win32/libc_interface.h

Tue, 15 Apr 2014 03:36:58 +0200

author
Tomasz Wasilczyk <twasilczyk@pidgin.im>
date
Tue, 15 Apr 2014 03:36:58 +0200
changeset 35849
77efee65c5f4
parent 32744
163329b5c8f6
child 35863
9def6c9f26a6
permissions
-rw-r--r--

cross-win32: fix socklen_t check, win32dep.h include, undef pthread's localtime_r

3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
1 /*
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
2 * purple
5913
4d016c00bb36 [gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents: 5113
diff changeset
3 *
4d016c00bb36 [gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents: 5113
diff changeset
4 * File: libc_interface.h
4d016c00bb36 [gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents: 5113
diff changeset
5 *
4d016c00bb36 [gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents: 5113
diff changeset
6 * Copyright (C) 2002-2003, Herman Bloggs <hermanator12002@yahoo.com>
4d016c00bb36 [gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents: 5113
diff changeset
7 *
4d016c00bb36 [gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents: 5113
diff changeset
8 * This program is free software; you can redistribute it and/or modify
4d016c00bb36 [gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents: 5113
diff changeset
9 * it under the terms of the GNU General Public License as published by
4d016c00bb36 [gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents: 5113
diff changeset
10 * the Free Software Foundation; either version 2 of the License, or
4d016c00bb36 [gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents: 5113
diff changeset
11 * (at your option) any later version.
4d016c00bb36 [gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents: 5113
diff changeset
12 *
4d016c00bb36 [gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents: 5113
diff changeset
13 * This program is distributed in the hope that it will be useful,
4d016c00bb36 [gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents: 5113
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
4d016c00bb36 [gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents: 5113
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4d016c00bb36 [gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents: 5113
diff changeset
16 * GNU General Public License for more details.
4d016c00bb36 [gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents: 5113
diff changeset
17 *
4d016c00bb36 [gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents: 5113
diff changeset
18 * You should have received a copy of the GNU General Public License
4d016c00bb36 [gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents: 5113
diff changeset
19 * along with this program; if not, write to the Free Software
19859
71d37b57eff2 The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19387
diff changeset
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
5913
4d016c00bb36 [gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents: 5113
diff changeset
21 *
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
22 */
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
23 #ifndef _LIBC_INTERFACE_H_
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
24 #define _LIBC_INTERFACE_H_
8244
014ff38feea9 [gaim-migrate @ 8967]
Herman Bloggs <herman@bluedigits.com>
parents: 7242
diff changeset
25 #include <winsock2.h>
014ff38feea9 [gaim-migrate @ 8967]
Herman Bloggs <herman@bluedigits.com>
parents: 7242
diff changeset
26 #include <ws2tcpip.h>
4714
08b54a8f301f [gaim-migrate @ 5025]
Herman Bloggs <herman@bluedigits.com>
parents: 4373
diff changeset
27 #include <io.h>
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
28 #include <errno.h>
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
29 #include "libc_internal.h"
10589
4e10236e06d4 [gaim-migrate @ 11994]
Daniel Atallah <datallah@pidgin.im>
parents: 10214
diff changeset
30 #include <glib.h>
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
31
22686
d41016d7812d Add extern "C" wrappers to win32 headers. There is also a change here that I thought I committed earlier that should provide better error messages for winsock errors.
Daniel Atallah <datallah@pidgin.im>
parents: 20294
diff changeset
32 #ifdef __cplusplus
d41016d7812d Add extern "C" wrappers to win32 headers. There is also a change here that I thought I committed earlier that should provide better error messages for winsock errors.
Daniel Atallah <datallah@pidgin.im>
parents: 20294
diff changeset
33 extern "C" {
d41016d7812d Add extern "C" wrappers to win32 headers. There is also a change here that I thought I committed earlier that should provide better error messages for winsock errors.
Daniel Atallah <datallah@pidgin.im>
parents: 20294
diff changeset
34 #endif /* __cplusplus */
d41016d7812d Add extern "C" wrappers to win32 headers. There is also a change here that I thought I committed earlier that should provide better error messages for winsock errors.
Daniel Atallah <datallah@pidgin.im>
parents: 20294
diff changeset
35
18553
a65fadc62b15 Fix some S_ISDIR calls to work with Visual Studio. --rlaager
Nick Hebner <hebnern@gmail.com>
parents: 15936
diff changeset
36 #ifdef _MSC_VER
a65fadc62b15 Fix some S_ISDIR calls to work with Visual Studio. --rlaager
Nick Hebner <hebnern@gmail.com>
parents: 15936
diff changeset
37 #define S_IRUSR S_IREAD
a65fadc62b15 Fix some S_ISDIR calls to work with Visual Studio. --rlaager
Nick Hebner <hebnern@gmail.com>
parents: 15936
diff changeset
38 #define S_IWUSR S_IWRITE
a65fadc62b15 Fix some S_ISDIR calls to work with Visual Studio. --rlaager
Nick Hebner <hebnern@gmail.com>
parents: 15936
diff changeset
39 #define S_IXUSR S_IEXEC
a65fadc62b15 Fix some S_ISDIR calls to work with Visual Studio. --rlaager
Nick Hebner <hebnern@gmail.com>
parents: 15936
diff changeset
40
a65fadc62b15 Fix some S_ISDIR calls to work with Visual Studio. --rlaager
Nick Hebner <hebnern@gmail.com>
parents: 15936
diff changeset
41 #define S_ISDIR(m) (((m)&S_IFDIR)==S_IFDIR)
a65fadc62b15 Fix some S_ISDIR calls to work with Visual Studio. --rlaager
Nick Hebner <hebnern@gmail.com>
parents: 15936
diff changeset
42
a65fadc62b15 Fix some S_ISDIR calls to work with Visual Studio. --rlaager
Nick Hebner <hebnern@gmail.com>
parents: 15936
diff changeset
43 #define F_OK 0
a65fadc62b15 Fix some S_ISDIR calls to work with Visual Studio. --rlaager
Nick Hebner <hebnern@gmail.com>
parents: 15936
diff changeset
44 #endif
a65fadc62b15 Fix some S_ISDIR calls to work with Visual Studio. --rlaager
Nick Hebner <hebnern@gmail.com>
parents: 15936
diff changeset
45
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
46 /* sys/socket.h */
22812
cf92ffc5949c Patch from vladb to remove a C++ protected word ("namespace") from win32 libpurple code. Fixes #5471
Daniel Atallah <datallah@pidgin.im>
parents: 22686
diff changeset
47 #define socket( domain, style, protocol ) \
cf92ffc5949c Patch from vladb to remove a C++ protected word ("namespace") from win32 libpurple code. Fixes #5471
Daniel Atallah <datallah@pidgin.im>
parents: 22686
diff changeset
48 wpurple_socket( domain, style, protocol )
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
49
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
50 #define connect( socket, addr, length ) \
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
51 wpurple_connect( socket, addr, length )
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
52
18554
c68c8e6e2c7a Fix up some macros for Visual Studio. --rlaager
Nick Hebner <hebnern@gmail.com>
parents: 18553
diff changeset
53 #define getsockopt( socket, level, optname, optval, optlenptr ) \
c68c8e6e2c7a Fix up some macros for Visual Studio. --rlaager
Nick Hebner <hebnern@gmail.com>
parents: 18553
diff changeset
54 wpurple_getsockopt( socket, level, optname, optval, optlenptr )
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
55
18554
c68c8e6e2c7a Fix up some macros for Visual Studio. --rlaager
Nick Hebner <hebnern@gmail.com>
parents: 18553
diff changeset
56 #define setsockopt( socket, level, optname, optval, optlen ) \
c68c8e6e2c7a Fix up some macros for Visual Studio. --rlaager
Nick Hebner <hebnern@gmail.com>
parents: 18553
diff changeset
57 wpurple_setsockopt( socket, level, optname, optval, optlen )
8244
014ff38feea9 [gaim-migrate @ 8967]
Herman Bloggs <herman@bluedigits.com>
parents: 7242
diff changeset
58
014ff38feea9 [gaim-migrate @ 8967]
Herman Bloggs <herman@bluedigits.com>
parents: 7242
diff changeset
59 #define getsockname( socket, addr, lenptr ) \
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
60 wpurple_getsockname( socket, addr, lenptr )
8244
014ff38feea9 [gaim-migrate @ 8967]
Herman Bloggs <herman@bluedigits.com>
parents: 7242
diff changeset
61
014ff38feea9 [gaim-migrate @ 8967]
Herman Bloggs <herman@bluedigits.com>
parents: 7242
diff changeset
62 #define bind( socket, addr, length ) \
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
63 wpurple_bind( socket, addr, length )
8244
014ff38feea9 [gaim-migrate @ 8967]
Herman Bloggs <herman@bluedigits.com>
parents: 7242
diff changeset
64
014ff38feea9 [gaim-migrate @ 8967]
Herman Bloggs <herman@bluedigits.com>
parents: 7242
diff changeset
65 #define listen( socket, n ) \
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
66 wpurple_listen( socket, n )
8244
014ff38feea9 [gaim-migrate @ 8967]
Herman Bloggs <herman@bluedigits.com>
parents: 7242
diff changeset
67
11431
60971f504319 [gaim-migrate @ 13668]
Daniel Atallah <datallah@pidgin.im>
parents: 10601
diff changeset
68 #define sendto(socket, buf, len, flags, to, tolen) \
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
69 wpurple_sendto(socket, buf, len, flags, to, tolen)
11431
60971f504319 [gaim-migrate @ 13668]
Daniel Atallah <datallah@pidgin.im>
parents: 10601
diff changeset
70
15936
1a5a326484f3 move internal stuff to libc_internal.h to fix warnings
Daniel Atallah <datallah@pidgin.im>
parents: 15884
diff changeset
71 #define recv(fd, buf, len, flags) \
1a5a326484f3 move internal stuff to libc_internal.h to fix warnings
Daniel Atallah <datallah@pidgin.im>
parents: 15884
diff changeset
72 wpurple_recv(fd, buf, len, flags)
1a5a326484f3 move internal stuff to libc_internal.h to fix warnings
Daniel Atallah <datallah@pidgin.im>
parents: 15884
diff changeset
73
1a5a326484f3 move internal stuff to libc_internal.h to fix warnings
Daniel Atallah <datallah@pidgin.im>
parents: 15884
diff changeset
74 #define send(socket, buf, buflen, flags) \
1a5a326484f3 move internal stuff to libc_internal.h to fix warnings
Daniel Atallah <datallah@pidgin.im>
parents: 15884
diff changeset
75 wpurple_send(socket, buf, buflen, flags)
1a5a326484f3 move internal stuff to libc_internal.h to fix warnings
Daniel Atallah <datallah@pidgin.im>
parents: 15884
diff changeset
76
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
77 /* sys/ioctl.h */
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
78 #define ioctl( fd, command, val ) \
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
79 wpurple_ioctl( fd, command, val )
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
80
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
81 /* fcntl.h */
20239
ae122f419324 applied changes from 2762c6075c0dc52a96098c5478c5bf68cfd890a3
Luke Schierer <lschiere@pidgin.im>
parents: 19859
diff changeset
82 #define fcntl( fd, command, ... ) \
ae122f419324 applied changes from 2762c6075c0dc52a96098c5478c5bf68cfd890a3
Luke Schierer <lschiere@pidgin.im>
parents: 19859
diff changeset
83 wpurple_fcntl( fd, command, ##__VA_ARGS__ )
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
84
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
85 /* arpa/inet.h */
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
86 #define inet_aton( name, addr ) \
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
87 wpurple_inet_aton( name, addr )
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
88
14974
8180f0f2e20c [gaim-migrate @ 17684]
Daniel Atallah <datallah@pidgin.im>
parents: 14286
diff changeset
89 #define inet_ntop( af, src, dst, cnt ) \
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
90 wpurple_inet_ntop( af, src, dst, cnt )
14974
8180f0f2e20c [gaim-migrate @ 17684]
Daniel Atallah <datallah@pidgin.im>
parents: 14286
diff changeset
91
32069
fc06dd6b7c3f Fix the compilation of the Bonjour prpl on Windows.
Eion Robb <eion@robbmob.com>
parents: 29735
diff changeset
92 #define inet_pton( af, src, dst ) \
fc06dd6b7c3f Fix the compilation of the Bonjour prpl on Windows.
Eion Robb <eion@robbmob.com>
parents: 29735
diff changeset
93 wpurple_inet_pton( af, src, dst )
fc06dd6b7c3f Fix the compilation of the Bonjour prpl on Windows.
Eion Robb <eion@robbmob.com>
parents: 29735
diff changeset
94
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
95 /* netdb.h */
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
96 #define gethostbyname( name ) \
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
97 wpurple_gethostbyname( name )
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
98
5084
21d2e7ec99ce [gaim-migrate @ 5439]
Herman Bloggs <herman@bluedigits.com>
parents: 4905
diff changeset
99 /* netinet/in.h */
21d2e7ec99ce [gaim-migrate @ 5439]
Herman Bloggs <herman@bluedigits.com>
parents: 4905
diff changeset
100 #define ntohl( netlong ) \
7242
d91a60e1095c [gaim-migrate @ 7817]
Herman Bloggs <herman@bluedigits.com>
parents: 5913
diff changeset
101 (unsigned int)ntohl( netlong )
5084
21d2e7ec99ce [gaim-migrate @ 5439]
Herman Bloggs <herman@bluedigits.com>
parents: 4905
diff changeset
102
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
103 /* string.h */
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
104 #define hstrerror( herror ) \
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
105 wpurple_strerror( errno )
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
106 #define strerror( errornum ) \
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
107 wpurple_strerror( errornum )
22686
d41016d7812d Add extern "C" wrappers to win32 headers. There is also a change here that I thought I committed earlier that should provide better error messages for winsock errors.
Daniel Atallah <datallah@pidgin.im>
parents: 20294
diff changeset
108 #define g_strerror( errornum ) \
d41016d7812d Add extern "C" wrappers to win32 headers. There is also a change here that I thought I committed earlier that should provide better error messages for winsock errors.
Daniel Atallah <datallah@pidgin.im>
parents: 20294
diff changeset
109 wpurple_strerror( errornum )
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
110
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
111 /* unistd.h */
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
112 #define read( fd, buf, buflen ) \
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
113 wpurple_read( fd, buf, buflen )
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
114
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
115 #define write( socket, buf, buflen ) \
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
116 wpurple_write( socket, buf, buflen )
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
117
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
118 #define close( fd ) \
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
119 wpurple_close( fd )
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
120
9570
8b3f38824cd3 [gaim-migrate @ 10413]
Herman Bloggs <herman@bluedigits.com>
parents: 8563
diff changeset
121 #ifndef sleep
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
122 #define sleep(x) Sleep((x)*1000)
9570
8b3f38824cd3 [gaim-migrate @ 10413]
Herman Bloggs <herman@bluedigits.com>
parents: 8563
diff changeset
123 #endif
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
124
8244
014ff38feea9 [gaim-migrate @ 8967]
Herman Bloggs <herman@bluedigits.com>
parents: 7242
diff changeset
125 #define gethostname( name, size ) \
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
126 wpurple_gethostname( name, size )
8244
014ff38feea9 [gaim-migrate @ 8967]
Herman Bloggs <herman@bluedigits.com>
parents: 7242
diff changeset
127
20294
5af4a755ab36 applied changes from b8fa91b64c41d38520d7944d70d627007e271158
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20239
diff changeset
128 #define fsync(fd) _commit(fd)
5af4a755ab36 applied changes from b8fa91b64c41d38520d7944d70d627007e271158
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20239
diff changeset
129
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
130 /* sys/time.h */
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
131 #define gettimeofday( timeval, timezone ) \
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
132 wpurple_gettimeofday( timeval, timezone )
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
133
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
134 /* stdio.h */
29735
f36754cb9828 Win32 build updates
Daniel Atallah <datallah@pidgin.im>
parents: 29491
diff changeset
135 #undef snprintf
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
136 #define snprintf _snprintf
29735
f36754cb9828 Win32 build updates
Daniel Atallah <datallah@pidgin.im>
parents: 29491
diff changeset
137 #undef vsnprintf
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
138 #define vsnprintf _vsnprintf
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
139
4905
1464e05926f0 [gaim-migrate @ 5239]
Herman Bloggs <herman@bluedigits.com>
parents: 4714
diff changeset
140 #define rename( oldname, newname ) \
32257
afafdf5bbf60 Remove wpurple_rename(). I suspect nobody actually ever used it directly
Daniel Atallah <datallah@pidgin.im>
parents: 29735
diff changeset
141 g_rename( oldname, newname )
10601
84245a6eba0e [gaim-migrate @ 12028]
Daniel Atallah <datallah@pidgin.im>
parents: 10589
diff changeset
142
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
143 /* sys/stat.h */
4373
fb2ae2f5edd3 [gaim-migrate @ 4639]
Herman Bloggs <herman@bluedigits.com>
parents: 4193
diff changeset
144 #define fchmod(a,b)
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
145
5113
8e545faf3d80 [gaim-migrate @ 5476]
Herman Bloggs <herman@bluedigits.com>
parents: 5084
diff changeset
146 /* time.h */
35849
77efee65c5f4 cross-win32: fix socklen_t check, win32dep.h include, undef pthread's localtime_r
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 32744
diff changeset
147 /* XXX: it may be also defined by pthread.h */
77efee65c5f4 cross-win32: fix socklen_t check, win32dep.h include, undef pthread's localtime_r
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 32744
diff changeset
148 #undef localtime_r
5113
8e545faf3d80 [gaim-migrate @ 5476]
Herman Bloggs <herman@bluedigits.com>
parents: 5084
diff changeset
149 #define localtime_r( time, resultp ) \
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
150 wpurple_localtime_r( time, resultp )
5113
8e545faf3d80 [gaim-migrate @ 5476]
Herman Bloggs <herman@bluedigits.com>
parents: 5084
diff changeset
151
22686
d41016d7812d Add extern "C" wrappers to win32 headers. There is also a change here that I thought I committed earlier that should provide better error messages for winsock errors.
Daniel Atallah <datallah@pidgin.im>
parents: 20294
diff changeset
152 #ifdef __cplusplus
d41016d7812d Add extern "C" wrappers to win32 headers. There is also a change here that I thought I committed earlier that should provide better error messages for winsock errors.
Daniel Atallah <datallah@pidgin.im>
parents: 20294
diff changeset
153 }
d41016d7812d Add extern "C" wrappers to win32 headers. There is also a change here that I thought I committed earlier that should provide better error messages for winsock errors.
Daniel Atallah <datallah@pidgin.im>
parents: 20294
diff changeset
154 #endif /* __cplusplus */
d41016d7812d Add extern "C" wrappers to win32 headers. There is also a change here that I thought I committed earlier that should provide better error messages for winsock errors.
Daniel Atallah <datallah@pidgin.im>
parents: 20294
diff changeset
155
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
156 #endif /* _LIBC_INTERFACE_H_ */

mercurial