Mercurial > pidgin
annotate src/win32/libc_interface.h @ 12116:e75ef7aa913e
[gaim-migrate @ 14416]
" This patch implements a replacement for the queuing
system from 1.x. It also obsoletes a previous patch
[#1338873] I submitted to prioritize the unseen states
in gtk conversations.
The attached envelope.png is ripped from the
msgunread.png already included in gaim. It should be
dropped in the pixmaps directory (Makefile.am is
updated accordingly in this patch).
The two separate queuing preferences from 1.x, queuing
messages while away and queuing all new messages (from
docklet), are replaced with a single 3-way preference
for conversations. The new preference is "Hide new IM
conversations". This preference can be set to never,
away and always.
When a gtk conversation is created, it may be placed in
a hidden conversation window instead of being placed
normally. This decision is based upon the preference
and possibly the away state of the account the
conversation is being created for. This *will* effect
conversations the user explicitly requests to be
created, so in these cases the caller must be sure to
present the conversation to the user, using
gaim_gtkconv_present_conversation(). This is done
already in gtkdialogs.c which handles creating
conversations requested by the user from gaim proper
(menus, double-clicking on budy in blist, etc.).
The main advantage to not queuing messages is that the
conversations exist, the message is written to the
conversation (and logged if appropriate) and the unseen
state is set on the conversation. This means no
additional features are needed to track whether there
are queued messages or not, just use the unseen state
on conversations.
Since conversations may not be visible (messages
"queued"), gaim proper needs some notification that
there are messages waiting. I opted for a menutray icon
that shows up when an im conversation has an unseen
message. Clicking this icon will focus (and show if
hidden) the first conversation with an unseen message.
This is essentially the same behavior of the docklet in
cvs right now, except that the icon is only visible
when there is a conversation with an unread message.
The api that is added is flexible enough to allow
either the docklet or the new blist menutray icon to be
visible for conversations of any/all types and for
unseen messages >= any state. Currently they are set to
only IM conversations and only unseen states >= TEXT
(system messages and no log messages will not trigger
blinking the docklet or showing the blist tray icon),
but these could be made preferences relatively easily
in the future. Other plugins could probably benefit as
well: gaim_gtk_conversations_get_first_unseen().
There is probably some limit to comment size, so I'll
stop rambling now. If anyone has more
questions/comments, catch me in #gaim, here or on
gaim-devel."
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Wed, 16 Nov 2005 18:17:01 +0000 |
parents | d2e44c8085e0 |
children | 202ce52b77a9 |
rev | line source |
---|---|
3776
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
1 /* |
5913
9657e243d001
[gaim-migrate @ 6345]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5113
diff
changeset
|
2 * gaim |
9657e243d001
[gaim-migrate @ 6345]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5113
diff
changeset
|
3 * |
9657e243d001
[gaim-migrate @ 6345]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5113
diff
changeset
|
4 * File: libc_interface.h |
9657e243d001
[gaim-migrate @ 6345]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5113
diff
changeset
|
5 * |
9657e243d001
[gaim-migrate @ 6345]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5113
diff
changeset
|
6 * Copyright (C) 2002-2003, Herman Bloggs <hermanator12002@yahoo.com> |
9657e243d001
[gaim-migrate @ 6345]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5113
diff
changeset
|
7 * |
9657e243d001
[gaim-migrate @ 6345]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5113
diff
changeset
|
8 * This program is free software; you can redistribute it and/or modify |
9657e243d001
[gaim-migrate @ 6345]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5113
diff
changeset
|
9 * it under the terms of the GNU General Public License as published by |
9657e243d001
[gaim-migrate @ 6345]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5113
diff
changeset
|
10 * the Free Software Foundation; either version 2 of the License, or |
9657e243d001
[gaim-migrate @ 6345]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5113
diff
changeset
|
11 * (at your option) any later version. |
9657e243d001
[gaim-migrate @ 6345]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5113
diff
changeset
|
12 * |
9657e243d001
[gaim-migrate @ 6345]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5113
diff
changeset
|
13 * This program is distributed in the hope that it will be useful, |
9657e243d001
[gaim-migrate @ 6345]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5113
diff
changeset
|
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
9657e243d001
[gaim-migrate @ 6345]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5113
diff
changeset
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
9657e243d001
[gaim-migrate @ 6345]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5113
diff
changeset
|
16 * GNU General Public License for more details. |
9657e243d001
[gaim-migrate @ 6345]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5113
diff
changeset
|
17 * |
9657e243d001
[gaim-migrate @ 6345]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5113
diff
changeset
|
18 * You should have received a copy of the GNU General Public License |
9657e243d001
[gaim-migrate @ 6345]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5113
diff
changeset
|
19 * along with this program; if not, write to the Free Software |
9657e243d001
[gaim-migrate @ 6345]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5113
diff
changeset
|
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
9657e243d001
[gaim-migrate @ 6345]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5113
diff
changeset
|
21 * |
3776
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
22 */ |
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
23 #ifndef _LIBC_INTERFACE_H_ |
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
24 #define _LIBC_INTERFACE_H_ |
8244
5e7ffea3f76a
[gaim-migrate @ 8967]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
7242
diff
changeset
|
25 #include <winsock2.h> |
5e7ffea3f76a
[gaim-migrate @ 8967]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
7242
diff
changeset
|
26 #include <ws2tcpip.h> |
4714
51ce3eb7e0bf
[gaim-migrate @ 5025]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
4373
diff
changeset
|
27 #include <io.h> |
3776
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
28 #include <errno.h> |
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
29 #include "libc_internal.h" |
10589
0f7452b1f777
[gaim-migrate @ 11994]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10214
diff
changeset
|
30 #include <glib.h> |
3776
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
31 |
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
32 /* sys/socket.h */ |
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
33 extern int wgaim_socket(int namespace, int style, int protocol); |
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
34 #define socket( namespace, style, protocol ) \ |
7242
59ffe137176d
[gaim-migrate @ 7817]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5913
diff
changeset
|
35 wgaim_socket( namespace, style, protocol ) |
3776
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
36 |
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
37 extern int wgaim_connect(int socket, struct sockaddr *addr, u_long length); |
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
38 #define connect( socket, addr, length ) \ |
7242
59ffe137176d
[gaim-migrate @ 7817]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5913
diff
changeset
|
39 wgaim_connect( socket, addr, length ) |
3776
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
40 |
8281
98d8faecf5f1
[gaim-migrate @ 9005]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
8244
diff
changeset
|
41 extern int wgaim_getsockopt(int socket, int level, int optname, void *optval, socklen_t *optlenptr); |
3776
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
42 #define getsockopt( args... ) \ |
7242
59ffe137176d
[gaim-migrate @ 7817]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5913
diff
changeset
|
43 wgaim_getsockopt( args ) |
3776
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
44 |
9611 | 45 extern int wgaim_setsockopt(int socket, int level, int optname, const void *optval, socklen_t optlen); |
8244
5e7ffea3f76a
[gaim-migrate @ 8967]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
7242
diff
changeset
|
46 #define setsockopt( args... ) \ |
5e7ffea3f76a
[gaim-migrate @ 8967]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
7242
diff
changeset
|
47 wgaim_setsockopt( args ) |
5e7ffea3f76a
[gaim-migrate @ 8967]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
7242
diff
changeset
|
48 |
5e7ffea3f76a
[gaim-migrate @ 8967]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
7242
diff
changeset
|
49 extern int wgaim_getsockname (int socket, struct sockaddr *addr, socklen_t *lenptr); |
5e7ffea3f76a
[gaim-migrate @ 8967]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
7242
diff
changeset
|
50 #define getsockname( socket, addr, lenptr ) \ |
5e7ffea3f76a
[gaim-migrate @ 8967]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
7242
diff
changeset
|
51 wgaim_getsockname( socket, addr, lenptr ) |
5e7ffea3f76a
[gaim-migrate @ 8967]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
7242
diff
changeset
|
52 |
5e7ffea3f76a
[gaim-migrate @ 8967]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
7242
diff
changeset
|
53 extern int wgaim_bind(int socket, struct sockaddr *addr, socklen_t length); |
5e7ffea3f76a
[gaim-migrate @ 8967]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
7242
diff
changeset
|
54 #define bind( socket, addr, length ) \ |
5e7ffea3f76a
[gaim-migrate @ 8967]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
7242
diff
changeset
|
55 wgaim_bind( socket, addr, length ) |
5e7ffea3f76a
[gaim-migrate @ 8967]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
7242
diff
changeset
|
56 |
5e7ffea3f76a
[gaim-migrate @ 8967]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
7242
diff
changeset
|
57 extern int wgaim_listen(int socket, unsigned int n); |
5e7ffea3f76a
[gaim-migrate @ 8967]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
7242
diff
changeset
|
58 #define listen( socket, n ) \ |
5e7ffea3f76a
[gaim-migrate @ 8967]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
7242
diff
changeset
|
59 wgaim_listen( socket, n ) |
5e7ffea3f76a
[gaim-migrate @ 8967]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
7242
diff
changeset
|
60 |
11431
d2e44c8085e0
[gaim-migrate @ 13668]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10601
diff
changeset
|
61 extern int wgaim_sendto(int socket, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); |
d2e44c8085e0
[gaim-migrate @ 13668]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10601
diff
changeset
|
62 #define sendto(socket, buf, len, flags, to, tolen) \ |
d2e44c8085e0
[gaim-migrate @ 13668]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10601
diff
changeset
|
63 wgaim_sendto(socket, buf, len, flags, to, tolen) |
d2e44c8085e0
[gaim-migrate @ 13668]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10601
diff
changeset
|
64 |
3776
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
65 /* sys/ioctl.h */ |
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
66 extern int wgaim_ioctl(int fd, int command, void* opt); |
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
67 #define ioctl( fd, command, val ) \ |
7242
59ffe137176d
[gaim-migrate @ 7817]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5913
diff
changeset
|
68 wgaim_ioctl( fd, command, val ) |
3776
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
69 |
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
70 /* fcntl.h */ |
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
71 extern int wgaim_fcntl(int socket, int command, int val); |
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
72 #define fcntl( fd, command, val ) \ |
7242
59ffe137176d
[gaim-migrate @ 7817]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5913
diff
changeset
|
73 wgaim_fcntl( fd, command, val ) |
3776
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
74 |
10589
0f7452b1f777
[gaim-migrate @ 11994]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10214
diff
changeset
|
75 #if !GLIB_CHECK_VERSION(2,6,0) |
0f7452b1f777
[gaim-migrate @ 11994]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10214
diff
changeset
|
76 # define open( args... ) _open( args ) |
0f7452b1f777
[gaim-migrate @ 11994]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10214
diff
changeset
|
77 #endif |
3776
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
78 |
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
79 /* arpa/inet.h */ |
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
80 extern int wgaim_inet_aton(const char *name, struct in_addr *addr); |
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
81 #define inet_aton( name, addr ) \ |
7242
59ffe137176d
[gaim-migrate @ 7817]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5913
diff
changeset
|
82 wgaim_inet_aton( name, addr ) |
3776
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
83 |
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
84 /* netdb.h */ |
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
85 extern struct hostent* wgaim_gethostbyname(const char *name); |
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
86 #define gethostbyname( name ) \ |
7242
59ffe137176d
[gaim-migrate @ 7817]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5913
diff
changeset
|
87 wgaim_gethostbyname( name ) |
3776
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
88 |
5084
a96653493416
[gaim-migrate @ 5439]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
4905
diff
changeset
|
89 /* netinet/in.h */ |
a96653493416
[gaim-migrate @ 5439]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
4905
diff
changeset
|
90 #define ntohl( netlong ) \ |
7242
59ffe137176d
[gaim-migrate @ 7817]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5913
diff
changeset
|
91 (unsigned int)ntohl( netlong ) |
5084
a96653493416
[gaim-migrate @ 5439]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
4905
diff
changeset
|
92 |
3776
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
93 /* string.h */ |
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
94 extern char* wgaim_strerror( int errornum ); |
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
95 #define hstrerror( herror ) \ |
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
96 wgaim_strerror( errno ) |
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
97 #define strerror( errornum ) \ |
7242
59ffe137176d
[gaim-migrate @ 7817]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5913
diff
changeset
|
98 wgaim_strerror( errornum ) |
3776
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
99 |
7242
59ffe137176d
[gaim-migrate @ 7817]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5913
diff
changeset
|
100 #define bzero( dest, size ) memset( dest, 0, size ) |
3776
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
101 |
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
102 /* unistd.h */ |
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
103 extern int wgaim_read(int fd, void *buf, unsigned int size); |
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
104 #define read( fd, buf, buflen ) \ |
7242
59ffe137176d
[gaim-migrate @ 7817]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5913
diff
changeset
|
105 wgaim_read( fd, buf, buflen ) |
3776
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
106 |
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
107 extern int wgaim_write(int fd, const void *buf, unsigned int size); |
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
108 #define write( socket, buf, buflen ) \ |
7242
59ffe137176d
[gaim-migrate @ 7817]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5913
diff
changeset
|
109 wgaim_write( socket, buf, buflen ) |
3776
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
110 |
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
111 extern int wgaim_close(int fd); |
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
112 #define close( fd ) \ |
7242
59ffe137176d
[gaim-migrate @ 7817]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5913
diff
changeset
|
113 wgaim_close( fd ) |
3776
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
114 |
9570
24f84b7ffe8e
[gaim-migrate @ 10413]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
8563
diff
changeset
|
115 #ifndef sleep |
3776
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
116 #define sleep(x) Sleep((x)*1000) |
9570
24f84b7ffe8e
[gaim-migrate @ 10413]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
8563
diff
changeset
|
117 #endif |
3776
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
118 |
8244
5e7ffea3f76a
[gaim-migrate @ 8967]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
7242
diff
changeset
|
119 extern int wgaim_gethostname(char *name, size_t size); |
5e7ffea3f76a
[gaim-migrate @ 8967]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
7242
diff
changeset
|
120 #define gethostname( name, size ) \ |
5e7ffea3f76a
[gaim-migrate @ 8967]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
7242
diff
changeset
|
121 wgaim_gethostname( name, size ) |
5e7ffea3f76a
[gaim-migrate @ 8967]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
7242
diff
changeset
|
122 |
3776
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
123 /* sys/time.h */ |
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
124 extern int wgaim_gettimeofday(struct timeval *p, struct timezone *z); |
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
125 #define gettimeofday( timeval, timezone ) \ |
7242
59ffe137176d
[gaim-migrate @ 7817]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5913
diff
changeset
|
126 wgaim_gettimeofday( timeval, timezone ) |
3776
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
127 |
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
128 /* stdio.h */ |
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
129 #define snprintf _snprintf |
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
130 #define vsnprintf _vsnprintf |
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
131 |
4905
86037d6bf80f
[gaim-migrate @ 5239]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
4714
diff
changeset
|
132 extern int wgaim_rename(const char *oldname, const char *newname); |
86037d6bf80f
[gaim-migrate @ 5239]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
4714
diff
changeset
|
133 #define rename( oldname, newname ) \ |
7242
59ffe137176d
[gaim-migrate @ 7817]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5913
diff
changeset
|
134 wgaim_rename( oldname, newname ) |
10601
e46b51de549a
[gaim-migrate @ 12028]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10589
diff
changeset
|
135 |
e46b51de549a
[gaim-migrate @ 12028]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10589
diff
changeset
|
136 #if GLIB_CHECK_VERSION(2,6,0) |
e46b51de549a
[gaim-migrate @ 12028]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10589
diff
changeset
|
137 #ifdef g_rename |
e46b51de549a
[gaim-migrate @ 12028]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10589
diff
changeset
|
138 # undef g_rename |
10589
0f7452b1f777
[gaim-migrate @ 11994]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10214
diff
changeset
|
139 #endif |
10601
e46b51de549a
[gaim-migrate @ 12028]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10589
diff
changeset
|
140 /* 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*/ |
e46b51de549a
[gaim-migrate @ 12028]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10589
diff
changeset
|
141 #define g_rename(oldname, newname) \ |
e46b51de549a
[gaim-migrate @ 12028]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10589
diff
changeset
|
142 wgaim_rename(oldname, newname) |
e46b51de549a
[gaim-migrate @ 12028]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10589
diff
changeset
|
143 #endif |
e46b51de549a
[gaim-migrate @ 12028]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10589
diff
changeset
|
144 |
4905
86037d6bf80f
[gaim-migrate @ 5239]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
4714
diff
changeset
|
145 |
3776
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
146 /* sys/stat.h */ |
10589
0f7452b1f777
[gaim-migrate @ 11994]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10214
diff
changeset
|
147 |
0f7452b1f777
[gaim-migrate @ 11994]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10214
diff
changeset
|
148 #if !GLIB_CHECK_VERSION(2,6,0) |
3776
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
149 #define mkdir(a,b) _mkdir((a)) |
10589
0f7452b1f777
[gaim-migrate @ 11994]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10214
diff
changeset
|
150 #endif |
4373
dcc6c130c6d9
[gaim-migrate @ 4639]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
4193
diff
changeset
|
151 #define fchmod(a,b) |
3776
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
152 |
5113
bac62d8d386f
[gaim-migrate @ 5476]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5084
diff
changeset
|
153 /* time.h */ |
bac62d8d386f
[gaim-migrate @ 5476]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5084
diff
changeset
|
154 extern struct tm *wgaim_localtime_r(const time_t *time, struct tm *resultp); |
bac62d8d386f
[gaim-migrate @ 5476]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5084
diff
changeset
|
155 #define localtime_r( time, resultp ) \ |
7242
59ffe137176d
[gaim-migrate @ 7817]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5913
diff
changeset
|
156 wgaim_localtime_r( time, resultp ) |
5113
bac62d8d386f
[gaim-migrate @ 5476]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5084
diff
changeset
|
157 |
3776
21d296405cfd
[gaim-migrate @ 3916]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
158 #endif /* _LIBC_INTERFACE_H_ */ |