src/win32/libc_interface.h

Fri, 11 Mar 2005 13:05:31 +0000

author
Luke Schierer <lschiere@pidgin.im>
date
Fri, 11 Mar 2005 13:05:31 +0000
changeset 10684
0325b164a7eb
parent 10601
84245a6eba0e
child 11431
60971f504319
permissions
-rw-r--r--

[gaim-migrate @ 12231]
the cipher api that grim has been working on for ages is finally done!! big
congrats and thanks to him!!

lots of modified files in this commit. it builds here.

moved the md5 files to src/protocols/oscar so that it continues to depend
on nothing in gaim. everything else uses the new centralized cipher api.
I'm not sure if src/md5.* needs to be removed or not, so I left it there.
someone let me know or do it directly.

someone check if these need to be added to potfiles.in

and let there be much rejoicing!

3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
1 /*
5913
4d016c00bb36 [gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents: 5113
diff changeset
2 * gaim
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
4d016c00bb36 [gaim-migrate @ 6345]
Herman Bloggs <herman@bluedigits.com>
parents: 5113
diff changeset
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
32 /* sys/socket.h */
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
33 extern int wgaim_socket(int namespace, int style, int protocol);
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
34 #define socket( namespace, style, protocol ) \
7242
d91a60e1095c [gaim-migrate @ 7817]
Herman Bloggs <herman@bluedigits.com>
parents: 5913
diff changeset
35 wgaim_socket( namespace, style, protocol )
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
36
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
37 extern int wgaim_connect(int socket, struct sockaddr *addr, u_long length);
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
38 #define connect( socket, addr, length ) \
7242
d91a60e1095c [gaim-migrate @ 7817]
Herman Bloggs <herman@bluedigits.com>
parents: 5913
diff changeset
39 wgaim_connect( socket, addr, length )
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
40
8281
d364053cb2c1 [gaim-migrate @ 9005]
Herman Bloggs <herman@bluedigits.com>
parents: 8244
diff changeset
41 extern int wgaim_getsockopt(int socket, int level, int optname, void *optval, socklen_t *optlenptr);
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
42 #define getsockopt( args... ) \
7242
d91a60e1095c [gaim-migrate @ 7817]
Herman Bloggs <herman@bluedigits.com>
parents: 5913
diff changeset
43 wgaim_getsockopt( args )
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
44
9611
159762ee0f2d [gaim-migrate @ 10454]
Tim Ringenbach <marv@pidgin.im>
parents: 9570
diff changeset
45 extern int wgaim_setsockopt(int socket, int level, int optname, const void *optval, socklen_t optlen);
8244
014ff38feea9 [gaim-migrate @ 8967]
Herman Bloggs <herman@bluedigits.com>
parents: 7242
diff changeset
46 #define setsockopt( args... ) \
014ff38feea9 [gaim-migrate @ 8967]
Herman Bloggs <herman@bluedigits.com>
parents: 7242
diff changeset
47 wgaim_setsockopt( args )
014ff38feea9 [gaim-migrate @ 8967]
Herman Bloggs <herman@bluedigits.com>
parents: 7242
diff changeset
48
014ff38feea9 [gaim-migrate @ 8967]
Herman Bloggs <herman@bluedigits.com>
parents: 7242
diff changeset
49 extern int wgaim_getsockname (int socket, struct sockaddr *addr, socklen_t *lenptr);
014ff38feea9 [gaim-migrate @ 8967]
Herman Bloggs <herman@bluedigits.com>
parents: 7242
diff changeset
50 #define getsockname( socket, addr, lenptr ) \
014ff38feea9 [gaim-migrate @ 8967]
Herman Bloggs <herman@bluedigits.com>
parents: 7242
diff changeset
51 wgaim_getsockname( socket, addr, lenptr )
014ff38feea9 [gaim-migrate @ 8967]
Herman Bloggs <herman@bluedigits.com>
parents: 7242
diff changeset
52
014ff38feea9 [gaim-migrate @ 8967]
Herman Bloggs <herman@bluedigits.com>
parents: 7242
diff changeset
53 extern int wgaim_bind(int socket, struct sockaddr *addr, socklen_t length);
014ff38feea9 [gaim-migrate @ 8967]
Herman Bloggs <herman@bluedigits.com>
parents: 7242
diff changeset
54 #define bind( socket, addr, length ) \
014ff38feea9 [gaim-migrate @ 8967]
Herman Bloggs <herman@bluedigits.com>
parents: 7242
diff changeset
55 wgaim_bind( socket, addr, length )
014ff38feea9 [gaim-migrate @ 8967]
Herman Bloggs <herman@bluedigits.com>
parents: 7242
diff changeset
56
014ff38feea9 [gaim-migrate @ 8967]
Herman Bloggs <herman@bluedigits.com>
parents: 7242
diff changeset
57 extern int wgaim_listen(int socket, unsigned int n);
014ff38feea9 [gaim-migrate @ 8967]
Herman Bloggs <herman@bluedigits.com>
parents: 7242
diff changeset
58 #define listen( socket, n ) \
014ff38feea9 [gaim-migrate @ 8967]
Herman Bloggs <herman@bluedigits.com>
parents: 7242
diff changeset
59 wgaim_listen( socket, n )
014ff38feea9 [gaim-migrate @ 8967]
Herman Bloggs <herman@bluedigits.com>
parents: 7242
diff changeset
60
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
61 /* sys/ioctl.h */
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
62 extern int wgaim_ioctl(int fd, int command, void* opt);
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
63 #define ioctl( fd, command, val ) \
7242
d91a60e1095c [gaim-migrate @ 7817]
Herman Bloggs <herman@bluedigits.com>
parents: 5913
diff changeset
64 wgaim_ioctl( fd, command, val )
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
65
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
66 /* fcntl.h */
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
67 extern int wgaim_fcntl(int socket, int command, int val);
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
68 #define fcntl( fd, command, val ) \
7242
d91a60e1095c [gaim-migrate @ 7817]
Herman Bloggs <herman@bluedigits.com>
parents: 5913
diff changeset
69 wgaim_fcntl( fd, command, val )
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
70
10589
4e10236e06d4 [gaim-migrate @ 11994]
Daniel Atallah <datallah@pidgin.im>
parents: 10214
diff changeset
71 #if !GLIB_CHECK_VERSION(2,6,0)
4e10236e06d4 [gaim-migrate @ 11994]
Daniel Atallah <datallah@pidgin.im>
parents: 10214
diff changeset
72 # define open( args... ) _open( args )
4e10236e06d4 [gaim-migrate @ 11994]
Daniel Atallah <datallah@pidgin.im>
parents: 10214
diff changeset
73 #endif
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
74
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
75 /* arpa/inet.h */
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
76 extern int wgaim_inet_aton(const char *name, struct in_addr *addr);
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
77 #define inet_aton( name, addr ) \
7242
d91a60e1095c [gaim-migrate @ 7817]
Herman Bloggs <herman@bluedigits.com>
parents: 5913
diff changeset
78 wgaim_inet_aton( name, addr )
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
79
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
80 /* netdb.h */
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
81 extern struct hostent* wgaim_gethostbyname(const char *name);
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
82 #define gethostbyname( name ) \
7242
d91a60e1095c [gaim-migrate @ 7817]
Herman Bloggs <herman@bluedigits.com>
parents: 5913
diff changeset
83 wgaim_gethostbyname( name )
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
84
5084
21d2e7ec99ce [gaim-migrate @ 5439]
Herman Bloggs <herman@bluedigits.com>
parents: 4905
diff changeset
85 /* netinet/in.h */
21d2e7ec99ce [gaim-migrate @ 5439]
Herman Bloggs <herman@bluedigits.com>
parents: 4905
diff changeset
86 #define ntohl( netlong ) \
7242
d91a60e1095c [gaim-migrate @ 7817]
Herman Bloggs <herman@bluedigits.com>
parents: 5913
diff changeset
87 (unsigned int)ntohl( netlong )
5084
21d2e7ec99ce [gaim-migrate @ 5439]
Herman Bloggs <herman@bluedigits.com>
parents: 4905
diff changeset
88
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
89 /* string.h */
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
90 extern char* wgaim_strerror( int errornum );
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
91 #define hstrerror( herror ) \
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
92 wgaim_strerror( errno )
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
93 #define strerror( errornum ) \
7242
d91a60e1095c [gaim-migrate @ 7817]
Herman Bloggs <herman@bluedigits.com>
parents: 5913
diff changeset
94 wgaim_strerror( errornum )
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
95
7242
d91a60e1095c [gaim-migrate @ 7817]
Herman Bloggs <herman@bluedigits.com>
parents: 5913
diff changeset
96 #define bzero( dest, size ) memset( dest, 0, size )
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
97
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
98 /* unistd.h */
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
99 extern int wgaim_read(int fd, void *buf, unsigned int size);
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
100 #define read( fd, buf, buflen ) \
7242
d91a60e1095c [gaim-migrate @ 7817]
Herman Bloggs <herman@bluedigits.com>
parents: 5913
diff changeset
101 wgaim_read( fd, buf, buflen )
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
102
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
103 extern int wgaim_write(int fd, const void *buf, unsigned int size);
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
104 #define write( socket, buf, buflen ) \
7242
d91a60e1095c [gaim-migrate @ 7817]
Herman Bloggs <herman@bluedigits.com>
parents: 5913
diff changeset
105 wgaim_write( socket, buf, buflen )
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
106
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
107 extern int wgaim_close(int fd);
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
108 #define close( fd ) \
7242
d91a60e1095c [gaim-migrate @ 7817]
Herman Bloggs <herman@bluedigits.com>
parents: 5913
diff changeset
109 wgaim_close( fd )
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
110
9570
8b3f38824cd3 [gaim-migrate @ 10413]
Herman Bloggs <herman@bluedigits.com>
parents: 8563
diff changeset
111 #ifndef sleep
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
112 #define sleep(x) Sleep((x)*1000)
9570
8b3f38824cd3 [gaim-migrate @ 10413]
Herman Bloggs <herman@bluedigits.com>
parents: 8563
diff changeset
113 #endif
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
114
8244
014ff38feea9 [gaim-migrate @ 8967]
Herman Bloggs <herman@bluedigits.com>
parents: 7242
diff changeset
115 extern int wgaim_gethostname(char *name, size_t size);
014ff38feea9 [gaim-migrate @ 8967]
Herman Bloggs <herman@bluedigits.com>
parents: 7242
diff changeset
116 #define gethostname( name, size ) \
014ff38feea9 [gaim-migrate @ 8967]
Herman Bloggs <herman@bluedigits.com>
parents: 7242
diff changeset
117 wgaim_gethostname( name, size )
014ff38feea9 [gaim-migrate @ 8967]
Herman Bloggs <herman@bluedigits.com>
parents: 7242
diff changeset
118
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
119 /* sys/time.h */
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
120 extern int wgaim_gettimeofday(struct timeval *p, struct timezone *z);
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
121 #define gettimeofday( timeval, timezone ) \
7242
d91a60e1095c [gaim-migrate @ 7817]
Herman Bloggs <herman@bluedigits.com>
parents: 5913
diff changeset
122 wgaim_gettimeofday( timeval, timezone )
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
123
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
124 /* stdio.h */
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
125 #define snprintf _snprintf
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
126 #define vsnprintf _vsnprintf
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
127
4905
1464e05926f0 [gaim-migrate @ 5239]
Herman Bloggs <herman@bluedigits.com>
parents: 4714
diff changeset
128 extern int wgaim_rename(const char *oldname, const char *newname);
1464e05926f0 [gaim-migrate @ 5239]
Herman Bloggs <herman@bluedigits.com>
parents: 4714
diff changeset
129 #define rename( oldname, newname ) \
7242
d91a60e1095c [gaim-migrate @ 7817]
Herman Bloggs <herman@bluedigits.com>
parents: 5913
diff changeset
130 wgaim_rename( oldname, newname )
10601
84245a6eba0e [gaim-migrate @ 12028]
Daniel Atallah <datallah@pidgin.im>
parents: 10589
diff changeset
131
84245a6eba0e [gaim-migrate @ 12028]
Daniel Atallah <datallah@pidgin.im>
parents: 10589
diff changeset
132 #if GLIB_CHECK_VERSION(2,6,0)
84245a6eba0e [gaim-migrate @ 12028]
Daniel Atallah <datallah@pidgin.im>
parents: 10589
diff changeset
133 #ifdef g_rename
84245a6eba0e [gaim-migrate @ 12028]
Daniel Atallah <datallah@pidgin.im>
parents: 10589
diff changeset
134 # undef g_rename
10589
4e10236e06d4 [gaim-migrate @ 11994]
Daniel Atallah <datallah@pidgin.im>
parents: 10214
diff changeset
135 #endif
10601
84245a6eba0e [gaim-migrate @ 12028]
Daniel Atallah <datallah@pidgin.im>
parents: 10589
diff changeset
136 /* This is necessary because we want rename on win32 to be able to overwrite an existing file, it is done in internal.h if GLib < 2.6*/
84245a6eba0e [gaim-migrate @ 12028]
Daniel Atallah <datallah@pidgin.im>
parents: 10589
diff changeset
137 #define g_rename(oldname, newname) \
84245a6eba0e [gaim-migrate @ 12028]
Daniel Atallah <datallah@pidgin.im>
parents: 10589
diff changeset
138 wgaim_rename(oldname, newname)
84245a6eba0e [gaim-migrate @ 12028]
Daniel Atallah <datallah@pidgin.im>
parents: 10589
diff changeset
139 #endif
84245a6eba0e [gaim-migrate @ 12028]
Daniel Atallah <datallah@pidgin.im>
parents: 10589
diff changeset
140
4905
1464e05926f0 [gaim-migrate @ 5239]
Herman Bloggs <herman@bluedigits.com>
parents: 4714
diff changeset
141
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
142 /* sys/stat.h */
10589
4e10236e06d4 [gaim-migrate @ 11994]
Daniel Atallah <datallah@pidgin.im>
parents: 10214
diff changeset
143
4e10236e06d4 [gaim-migrate @ 11994]
Daniel Atallah <datallah@pidgin.im>
parents: 10214
diff changeset
144 #if !GLIB_CHECK_VERSION(2,6,0)
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
145 #define mkdir(a,b) _mkdir((a))
10589
4e10236e06d4 [gaim-migrate @ 11994]
Daniel Atallah <datallah@pidgin.im>
parents: 10214
diff changeset
146 #endif
4373
fb2ae2f5edd3 [gaim-migrate @ 4639]
Herman Bloggs <herman@bluedigits.com>
parents: 4193
diff changeset
147 #define fchmod(a,b)
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
148
5113
8e545faf3d80 [gaim-migrate @ 5476]
Herman Bloggs <herman@bluedigits.com>
parents: 5084
diff changeset
149 /* time.h */
8e545faf3d80 [gaim-migrate @ 5476]
Herman Bloggs <herman@bluedigits.com>
parents: 5084
diff changeset
150 extern struct tm *wgaim_localtime_r(const time_t *time, struct tm *resultp);
8e545faf3d80 [gaim-migrate @ 5476]
Herman Bloggs <herman@bluedigits.com>
parents: 5084
diff changeset
151 #define localtime_r( time, resultp ) \
7242
d91a60e1095c [gaim-migrate @ 7817]
Herman Bloggs <herman@bluedigits.com>
parents: 5913
diff changeset
152 wgaim_localtime_r( time, resultp )
5113
8e545faf3d80 [gaim-migrate @ 5476]
Herman Bloggs <herman@bluedigits.com>
parents: 5084
diff changeset
153
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
154 #endif /* _LIBC_INTERFACE_H_ */

mercurial