pidgin: c3252113: Add extern "C" wrappers to win32 headers...

datallah at pidgin.im datallah at pidgin.im
Mon Mar 24 12:15:49 EDT 2008


-----------------------------------------------------------------
Revision: c3252113cd55d8a16b458b2c5b495428dd75fc90
Ancestor: 4076ab075803f1be812f973fd8b7d6e9d3ebaf27
Author: datallah at pidgin.im
Date: 2008-03-24T16:11:21
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/c3252113cd55d8a16b458b2c5b495428dd75fc90

Modified files:
        libpurple/win32/libc_interface.h
        libpurple/win32/libc_internal.h libpurple/win32/win32dep.h
        pidgin/win32/untar.h pidgin/win32/wspell.h

ChangeLog: 

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.

-------------- next part --------------
============================================================
--- libpurple/win32/libc_interface.h	762a8c1c3cfaf60c7716302b6d33f157c5c1d7fa
+++ libpurple/win32/libc_interface.h	2b2f99e1a619627967e2df96b6c5fb4c8a1d6292
@@ -29,6 +29,10 @@
 #include "libc_internal.h"
 #include <glib.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
 #ifdef _MSC_VER
 #define S_IRUSR S_IREAD
 #define S_IWUSR S_IWRITE
@@ -98,6 +102,8 @@ wpurple_strerror( errornum )
 wpurple_strerror( errno )
 #define strerror( errornum ) \
 wpurple_strerror( errornum )
+#define g_strerror( errornum ) \
+wpurple_strerror( errornum )
 
 /* unistd.h */
 #define read( fd, buf, buflen ) \
@@ -153,4 +159,8 @@ const char *wpurple_get_timezone_abbrevi
 /* helper for purple_utf8_strftime() by way of purple_internal_strftime() in src/util.c */
 const char *wpurple_get_timezone_abbreviation(const struct tm *tm);
 
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
 #endif /* _LIBC_INTERFACE_H_ */
============================================================
--- libpurple/win32/libc_internal.h	d769d5100b0f14e8cf8339560e8d66a15737476d
+++ libpurple/win32/libc_internal.h	2f56f759231007aa1ca8a3088b8b4b7aef0ac65d
@@ -25,6 +25,10 @@
 #include <glib.h>
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
 /* sys/socket.h */
 int wpurple_socket(int namespace, int style, int protocol);
 int wpurple_connect(int socket, struct sockaddr *addr, u_long length);
@@ -137,4 +141,8 @@ int wpurple_rename(const char *oldname, 
 /* stdio.h */
 int wpurple_rename(const char *oldname, const char *newname);
 
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
 #endif /* _LIBC_INTERNAL_ */
============================================================
--- libpurple/win32/win32dep.h	637b5714741a148e9bd04fbe86b9f2cc9255550b
+++ libpurple/win32/win32dep.h	8e66c33d321e2ce2181c62b77ac8e0376f487c81
@@ -28,10 +28,12 @@
 #include "wpurpleerror.h"
 #include "libc_interface.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
 /* rpcndr.h defines small as char, causing problems, so we need to undefine it */
-#ifdef _WIN32
 #undef small
-#endif
 
 /*
  *  PROTOS
@@ -50,7 +52,7 @@ gboolean wpurple_check_for_proxy_changes
 gboolean wpurple_check_for_proxy_changes(void);
 
 /* Determine Purple paths */
-char *wpurple_get_special_folder(int folder_type); /* needs to be g_free'd */
+gchar *wpurple_get_special_folder(int folder_type); /* needs to be g_free'd */
 const char *wpurple_install_dir(void);
 const char *wpurple_lib_dir(void);
 const char *wpurple_locale_dir(void);
@@ -73,5 +75,9 @@ long wpurple_get_tz_offset(void);
 #define LIBDIR wpurple_lib_dir()
 #define LOCALEDIR wpurple_locale_dir()
 
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
 #endif /* _WIN32DEP_H_ */
 
============================================================
--- pidgin/win32/untar.h	7be50921bdc4d52c9f1ccd53a1b6054ed6f82ec9
+++ pidgin/win32/untar.h	3995c86f3e70c4d2bacd1ec80a6a9ea1de95c97a
@@ -8,6 +8,10 @@
 #ifndef _UNTAR_H_
 #define _UNTAR_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
 typedef enum _untar_opt {
 	UNTAR_LISTING =      (1 << 0),
 	UNTAR_QUIET =        (1 << 1),
@@ -19,4 +23,8 @@ int untar(const char *filename, const ch
 
 int untar(const char *filename, const char *destdir, untar_opt options);
 
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
 #endif
============================================================
--- pidgin/win32/wspell.h	cfe5eab78fe4742cae7440c3352b26989015fad5
+++ pidgin/win32/wspell.h	91ee0ff2cd770b6153054224459ceab4e6337098
@@ -24,6 +24,10 @@
 #define _WSPELL_H_
 #include <gtkspell/gtkspell.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
 void winpidgin_spell_init(void);
 
 extern GtkSpell* (*wpidginspell_new_attach)(GtkTextView*, const gchar*, GError**);
@@ -46,4 +50,8 @@ wpidginspell_recheck_all( spell )
 #define gtkspell_recheck_all( spell ) \
 wpidginspell_recheck_all( spell )
 
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
 #endif /* _WSPELL_H_ */


More information about the Commits mailing list