annotate libgaim/win32/libc_interface.h @ 15135:9e1d9c9229ce

[gaim-migrate @ 17920] gg: Display status message of offline buddies. committer: Tailor Script <tailor@pidgin.im>
author Bartoz Oler <bartosz@pidgin.im>
date Thu, 07 Dec 2006 23:16:04 +0000
parents 59189ce09f10
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14224
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
1 /*
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
2 * gaim
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
3 *
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
4 * File: libc_interface.h
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
5 *
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
6 * Copyright (C) 2002-2003, Herman Bloggs <hermanator12002@yahoo.com>
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
7 *
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
8 * This program is free software; you can redistribute it and/or modify
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
9 * it under the terms of the GNU General Public License as published by
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
10 * the Free Software Foundation; either version 2 of the License, or
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
11 * (at your option) any later version.
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
12 *
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
13 * This program is distributed in the hope that it will be useful,
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
16 * GNU General Public License for more details.
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
17 *
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
18 * You should have received a copy of the GNU General Public License
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
19 * along with this program; if not, write to the Free Software
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
21 *
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
22 */
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
23 #ifndef _LIBC_INTERFACE_H_
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
24 #define _LIBC_INTERFACE_H_
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
25 #include <winsock2.h>
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
26 #include <ws2tcpip.h>
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
27 #include <io.h>
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
28 #include <errno.h>
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
29 #include "libc_internal.h"
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
30 #include <glib.h>
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
31
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
32 /* sys/socket.h */
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
33 int wgaim_socket(int namespace, int style, int protocol);
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
34 #define socket( namespace, style, protocol ) \
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
35 wgaim_socket( namespace, style, protocol )
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
36
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
37 int wgaim_connect(int socket, struct sockaddr *addr, u_long length);
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
38 #define connect( socket, addr, length ) \
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
39 wgaim_connect( socket, addr, length )
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
40
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
41 int wgaim_getsockopt(int socket, int level, int optname, void *optval, socklen_t *optlenptr);
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
42 #define getsockopt( args... ) \
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
43 wgaim_getsockopt( args )
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
44
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
45 int wgaim_setsockopt(int socket, int level, int optname, const void *optval, socklen_t optlen);
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
46 #define setsockopt( args... ) \
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
47 wgaim_setsockopt( args )
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
48
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
49 int wgaim_getsockname (int socket, struct sockaddr *addr, socklen_t *lenptr);
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
50 #define getsockname( socket, addr, lenptr ) \
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
51 wgaim_getsockname( socket, addr, lenptr )
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
52
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
53 int wgaim_bind(int socket, struct sockaddr *addr, socklen_t length);
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
54 #define bind( socket, addr, length ) \
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
55 wgaim_bind( socket, addr, length )
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
56
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
57 int wgaim_listen(int socket, unsigned int n);
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
58 #define listen( socket, n ) \
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
59 wgaim_listen( socket, n )
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
60
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
61 int wgaim_sendto(int socket, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen);
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
62 #define sendto(socket, buf, len, flags, to, tolen) \
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
63 wgaim_sendto(socket, buf, len, flags, to, tolen)
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
64
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
65 /* sys/ioctl.h */
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
66 int wgaim_ioctl(int fd, int command, void* opt);
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
67 #define ioctl( fd, command, val ) \
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
68 wgaim_ioctl( fd, command, val )
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
69
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
70 /* fcntl.h */
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
71 int wgaim_fcntl(int socket, int command, int val);
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
72 #define fcntl( fd, command, val ) \
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
73 wgaim_fcntl( fd, command, val )
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
74
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
75 /* arpa/inet.h */
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
76 int wgaim_inet_aton(const char *name, struct in_addr *addr);
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
77 #define inet_aton( name, addr ) \
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
78 wgaim_inet_aton( name, addr )
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
79
14912
390519f29a11 [gaim-migrate @ 17684]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 14224
diff changeset
80 const char *
390519f29a11 [gaim-migrate @ 17684]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 14224
diff changeset
81 wgaim_inet_ntop (int af, const void *src, char *dst, socklen_t cnt);
390519f29a11 [gaim-migrate @ 17684]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 14224
diff changeset
82 #define inet_ntop( af, src, dst, cnt ) \
390519f29a11 [gaim-migrate @ 17684]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 14224
diff changeset
83 wgaim_inet_ntop( af, src, dst, cnt )
390519f29a11 [gaim-migrate @ 17684]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 14224
diff changeset
84
14224
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
85 /* netdb.h */
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
86 struct hostent* wgaim_gethostbyname(const char *name);
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
87 #define gethostbyname( name ) \
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
88 wgaim_gethostbyname( name )
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
89
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
90 /* netinet/in.h */
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
91 #define ntohl( netlong ) \
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
92 (unsigned int)ntohl( netlong )
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
93
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
94 /* string.h */
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
95 char* wgaim_strerror( int errornum );
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
96 #define hstrerror( herror ) \
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
97 wgaim_strerror( errno )
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
98 #define strerror( errornum ) \
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
99 wgaim_strerror( errornum )
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
100
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
101 #define bzero( dest, size ) memset( dest, 0, size )
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
102
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
103 /* unistd.h */
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
104 int wgaim_read(int fd, void *buf, unsigned int size);
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
105 #define read( fd, buf, buflen ) \
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
106 wgaim_read( fd, buf, buflen )
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
107
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
108 int wgaim_write(int fd, const void *buf, unsigned int size);
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
109 #define write( socket, buf, buflen ) \
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
110 wgaim_write( socket, buf, buflen )
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
111
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
112 int wgaim_recv(int fd, void *buf, size_t len, int flags);
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
113 #define recv(fd, buf, len, flags) \
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
114 wgaim_recv(fd, buf, len, flags)
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
115
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
116 int wgaim_send(int fd, const void *buf, unsigned int size, int flags);
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
117 #define send(socket, buf, buflen, flags) \
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
118 wgaim_send(socket, buf, buflen, flags)
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
119
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
120 int wgaim_close(int fd);
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
121 #define close( fd ) \
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
122 wgaim_close( fd )
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
123
14912
390519f29a11 [gaim-migrate @ 17684]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 14224
diff changeset
124 #if !GLIB_CHECK_VERSION(2,8,0)
390519f29a11 [gaim-migrate @ 17684]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 14224
diff changeset
125 int wgaim_g_access(const gchar *filename, int mode);
390519f29a11 [gaim-migrate @ 17684]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 14224
diff changeset
126 #define g_access( filename, mode) \
390519f29a11 [gaim-migrate @ 17684]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 14224
diff changeset
127 wgaim_g_access( filename, mode )
390519f29a11 [gaim-migrate @ 17684]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 14224
diff changeset
128 #endif
390519f29a11 [gaim-migrate @ 17684]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 14224
diff changeset
129
14224
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
130 #ifndef sleep
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
131 #define sleep(x) Sleep((x)*1000)
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
132 #endif
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
133
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
134 int wgaim_gethostname(char *name, size_t size);
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
135 #define gethostname( name, size ) \
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
136 wgaim_gethostname( name, size )
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
137
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
138 /* sys/time.h */
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
139 int wgaim_gettimeofday(struct timeval *p, struct timezone *z);
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
140 #define gettimeofday( timeval, timezone ) \
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
141 wgaim_gettimeofday( timeval, timezone )
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
142
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
143 /* stdio.h */
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
144 #define snprintf _snprintf
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
145 #define vsnprintf _vsnprintf
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
146
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
147 int wgaim_rename(const char *oldname, const char *newname);
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
148 #define rename( oldname, newname ) \
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
149 wgaim_rename( oldname, newname )
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
150
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
151 #if GLIB_CHECK_VERSION(2,6,0)
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
152 #ifdef g_rename
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
153 # undef g_rename
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
154 #endif
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
155 /* 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*/
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
156 #define g_rename(oldname, newname) \
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
157 wgaim_rename(oldname, newname)
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
158 #endif
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
159
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
160
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
161 /* sys/stat.h */
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
162
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
163 #define fchmod(a,b)
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
164
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
165 /* time.h */
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
166 struct tm *wgaim_localtime_r(const time_t *time, struct tm *resultp);
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
167 #define localtime_r( time, resultp ) \
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
168 wgaim_localtime_r( time, resultp )
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
169
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
170 /* helper for gaim_utf8_strftime() by way of gaim_internal_strftime() in src/util.c */
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
171 const char *wgaim_get_timezone_abbreviation(const struct tm *tm);
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
172
ab8a105eff62 [gaim-migrate @ 16905]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
diff changeset
173 #endif /* _LIBC_INTERFACE_H_ */