src/win32/libc_interface.h

Tue, 27 May 2003 03:38:52 +0000

author
Mark Doliner <markdoliner@pidgin.im>
date
Tue, 27 May 2003 03:38:52 +0000
changeset 5537
812794b97b08
parent 5113
8e545faf3d80
child 5913
4d016c00bb36
permissions
-rw-r--r--

[gaim-migrate @ 5937]
This is:
-AIM over OSCAR use Christian's new, kick ass
gaim_notify_email stuff for new mail notification. This
should be good, but it's kind of a pain to test. Let me
know if you have any problems

-Minor fix to the translation README

-2 minor changes to the doxygen of 2 major header files
(this means you'll have to recompile a lot of files :-) )

-If your global proxy setting is "No Proxy" and your global
proxy host is empty, but $http_proxy is set to something,
gaim used to switch your global proxy setting to "HTTP." It
no longer does this. This makes more sense to me. If you
disagree, please let me know--this is open to debate, and
what not. Also, the use of environmental proxy settings
will be changed a bit in the next day or two

3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
1 /*
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
2 * libc_interface.h
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
3 */
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
4
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
5 #ifndef _LIBC_INTERFACE_H_
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
6 #define _LIBC_INTERFACE_H_
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
7 #include <winsock.h>
4714
08b54a8f301f [gaim-migrate @ 5025]
Herman Bloggs <herman@bluedigits.com>
parents: 4373
diff changeset
8 #include <io.h>
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
9 #include <errno.h>
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
10 #include "libc_internal.h"
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
11
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
12 /* sys/socket.h */
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
13 extern int wgaim_socket(int namespace, int style, int protocol);
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
14 #define socket( namespace, style, protocol ) \
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
15 wgaim_socket( ## namespace ##, ## style ##, ## protocol ## )
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
16
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
17 extern int wgaim_connect(int socket, struct sockaddr *addr, u_long length);
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
18 #define connect( socket, addr, length ) \
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
19 wgaim_connect( ## socket ##, ## addr ##, ## length ## )
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
20
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
21 extern int wgaim_getsockopt(int socket, int level, int optname, void *optval, unsigned int *optlenptr);
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
22 #define getsockopt( args... ) \
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
23 wgaim_getsockopt( ## args )
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
24
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
25 /* sys/ioctl.h */
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
26 extern int wgaim_ioctl(int fd, int command, void* opt);
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
27 #define ioctl( fd, command, val ) \
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
28 wgaim_ioctl( ## fd ##, ## command ##, ## val ## )
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
29
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
30 /* fcntl.h */
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
31 extern int wgaim_fcntl(int socket, int command, int val);
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
32 #define fcntl( fd, command, val ) \
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
33 wgaim_fcntl( ## fd ##, ## command ##, ## val ## )
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
34
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
35 #define open( args... ) _open( ## args )
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 /* arpa/inet.h */
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
38 extern int wgaim_inet_aton(const char *name, struct in_addr *addr);
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
39 #define inet_aton( name, addr ) \
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
40 wgaim_inet_aton( ## name ##, ## addr ## )
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
41
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
42 /* netdb.h */
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
43 extern struct hostent* wgaim_gethostbyname(const char *name);
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
44 #define gethostbyname( name ) \
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
45 wgaim_gethostbyname( ## name ## )
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
46
5084
21d2e7ec99ce [gaim-migrate @ 5439]
Herman Bloggs <herman@bluedigits.com>
parents: 4905
diff changeset
47 /* netinet/in.h */
21d2e7ec99ce [gaim-migrate @ 5439]
Herman Bloggs <herman@bluedigits.com>
parents: 4905
diff changeset
48 #define ntohl( netlong ) \
21d2e7ec99ce [gaim-migrate @ 5439]
Herman Bloggs <herman@bluedigits.com>
parents: 4905
diff changeset
49 (unsigned int)ntohl( ## netlong ## )
21d2e7ec99ce [gaim-migrate @ 5439]
Herman Bloggs <herman@bluedigits.com>
parents: 4905
diff changeset
50
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
51 /* string.h */
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
52 extern char* wgaim_strerror( int errornum );
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
53 #define hstrerror( herror ) \
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
54 wgaim_strerror( errno )
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
55 #define strerror( errornum ) \
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
56 wgaim_strerror( ## errornum ## )
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
57
4193
0f6072a0ffa4 [gaim-migrate @ 4424]
Herman Bloggs <herman@bluedigits.com>
parents: 3776
diff changeset
58 extern char* wgaim_strsep(char **stringp, const char *delim);
0f6072a0ffa4 [gaim-migrate @ 4424]
Herman Bloggs <herman@bluedigits.com>
parents: 3776
diff changeset
59 #define strsep( stringp, delim ) \
0f6072a0ffa4 [gaim-migrate @ 4424]
Herman Bloggs <herman@bluedigits.com>
parents: 3776
diff changeset
60 wgaim_strsep( ## stringp ##, ## delim ## )
0f6072a0ffa4 [gaim-migrate @ 4424]
Herman Bloggs <herman@bluedigits.com>
parents: 3776
diff changeset
61
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
62 #define bzero( dest, size ) memset( ## dest ##, 0, ## size ## )
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
63
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
64 /* unistd.h */
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
65 extern int wgaim_read(int fd, void *buf, unsigned int size);
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
66 #define read( fd, buf, buflen ) \
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
67 wgaim_read( ## fd ##, ## buf ##, ## buflen ## )
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
68
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
69 extern int wgaim_write(int fd, const void *buf, unsigned int size);
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
70 #define write( socket, buf, buflen ) \
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
71 wgaim_write( ## socket ##, ## buf ##, ## buflen ## )
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
72
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
73 extern int wgaim_close(int fd);
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
74 #define close( fd ) \
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
75 wgaim_close( ## fd ## )
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
76
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
77 #define sleep(x) Sleep((x)*1000)
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
78
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
79 /* sys/time.h */
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
80 extern int wgaim_gettimeofday(struct timeval *p, struct timezone *z);
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
81 #define gettimeofday( timeval, timezone ) \
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
82 wgaim_gettimeofday( ## timeval ##, ## timezone ## )
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
83
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
84 /* stdio.h */
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
85 #define snprintf _snprintf
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
86 #define vsnprintf _vsnprintf
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
87
4905
1464e05926f0 [gaim-migrate @ 5239]
Herman Bloggs <herman@bluedigits.com>
parents: 4714
diff changeset
88 extern int wgaim_rename(const char *oldname, const char *newname);
1464e05926f0 [gaim-migrate @ 5239]
Herman Bloggs <herman@bluedigits.com>
parents: 4714
diff changeset
89 #define rename( oldname, newname ) \
1464e05926f0 [gaim-migrate @ 5239]
Herman Bloggs <herman@bluedigits.com>
parents: 4714
diff changeset
90 wgaim_rename( ## oldname ##, ## newname ## )
1464e05926f0 [gaim-migrate @ 5239]
Herman Bloggs <herman@bluedigits.com>
parents: 4714
diff changeset
91
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
92 /* sys/stat.h */
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
93 #define mkdir(a,b) _mkdir((a))
4373
fb2ae2f5edd3 [gaim-migrate @ 4639]
Herman Bloggs <herman@bluedigits.com>
parents: 4193
diff changeset
94 #define fchmod(a,b)
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
95
5113
8e545faf3d80 [gaim-migrate @ 5476]
Herman Bloggs <herman@bluedigits.com>
parents: 5084
diff changeset
96 /* time.h */
8e545faf3d80 [gaim-migrate @ 5476]
Herman Bloggs <herman@bluedigits.com>
parents: 5084
diff changeset
97 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
98 #define localtime_r( time, resultp ) \
8e545faf3d80 [gaim-migrate @ 5476]
Herman Bloggs <herman@bluedigits.com>
parents: 5084
diff changeset
99 wgaim_localtime_r( ## time ##, ## resultp ## )
8e545faf3d80 [gaim-migrate @ 5476]
Herman Bloggs <herman@bluedigits.com>
parents: 5084
diff changeset
100
3776
4372bb2cc50f [gaim-migrate @ 3916]
Herman Bloggs <herman@bluedigits.com>
parents:
diff changeset
101 #endif /* _LIBC_INTERFACE_H_ */

mercurial