Mercurial > pidgin.yaz
comparison libpurple/win32/libc_interface.h @ 22528:322b92e28005
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.
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Mon, 24 Mar 2008 16:11:21 +0000 |
parents | 6e0c99e134c2 |
children | 5e6ab03225cc |
comparison
equal
deleted
inserted
replaced
22527:217fffe3f46f | 22528:322b92e28005 |
---|---|
26 #include <ws2tcpip.h> | 26 #include <ws2tcpip.h> |
27 #include <io.h> | 27 #include <io.h> |
28 #include <errno.h> | 28 #include <errno.h> |
29 #include "libc_internal.h" | 29 #include "libc_internal.h" |
30 #include <glib.h> | 30 #include <glib.h> |
31 | |
32 #ifdef __cplusplus | |
33 extern "C" { | |
34 #endif /* __cplusplus */ | |
31 | 35 |
32 #ifdef _MSC_VER | 36 #ifdef _MSC_VER |
33 #define S_IRUSR S_IREAD | 37 #define S_IRUSR S_IREAD |
34 #define S_IWUSR S_IWRITE | 38 #define S_IWUSR S_IWRITE |
35 #define S_IXUSR S_IEXEC | 39 #define S_IXUSR S_IEXEC |
96 /* string.h */ | 100 /* string.h */ |
97 #define hstrerror( herror ) \ | 101 #define hstrerror( herror ) \ |
98 wpurple_strerror( errno ) | 102 wpurple_strerror( errno ) |
99 #define strerror( errornum ) \ | 103 #define strerror( errornum ) \ |
100 wpurple_strerror( errornum ) | 104 wpurple_strerror( errornum ) |
105 #define g_strerror( errornum ) \ | |
106 wpurple_strerror( errornum ) | |
101 | 107 |
102 /* unistd.h */ | 108 /* unistd.h */ |
103 #define read( fd, buf, buflen ) \ | 109 #define read( fd, buf, buflen ) \ |
104 wpurple_read( fd, buf, buflen ) | 110 wpurple_read( fd, buf, buflen ) |
105 | 111 |
151 wpurple_localtime_r( time, resultp ) | 157 wpurple_localtime_r( time, resultp ) |
152 | 158 |
153 /* helper for purple_utf8_strftime() by way of purple_internal_strftime() in src/util.c */ | 159 /* helper for purple_utf8_strftime() by way of purple_internal_strftime() in src/util.c */ |
154 const char *wpurple_get_timezone_abbreviation(const struct tm *tm); | 160 const char *wpurple_get_timezone_abbreviation(const struct tm *tm); |
155 | 161 |
162 #ifdef __cplusplus | |
163 } | |
164 #endif /* __cplusplus */ | |
165 | |
156 #endif /* _LIBC_INTERFACE_H_ */ | 166 #endif /* _LIBC_INTERFACE_H_ */ |