From: <rl...@us...> - 2006-11-07 20:41:07
|
Revision: 17698 http://svn.sourceforge.net/gaim/?rev=17698&view=rev Author: rlaager Date: 2006-11-07 12:40:22 -0800 (Tue, 07 Nov 2006) Log Message: ----------- Add extern "C" guards to header files which are missing it. This should fix problems similar to SF Bug #1592175. Also, while I was at it, I made the _GaimStringref definition private. It already had a warning to not use it directly, so it should really be safe to make private. Modified Paths: -------------- trunk/libgaim/dnssrv.h trunk/libgaim/mime.h trunk/libgaim/ntlm.h trunk/libgaim/status.h trunk/libgaim/stringref.c trunk/libgaim/stringref.h trunk/libgaim/stun.h trunk/libgaim/xmlnode.h Modified: trunk/libgaim/dnssrv.h =================================================================== --- trunk/libgaim/dnssrv.h 2006-11-07 19:54:02 UTC (rev 17697) +++ trunk/libgaim/dnssrv.h 2006-11-07 20:40:22 UTC (rev 17698) @@ -23,6 +23,10 @@ #ifndef _GAIM_DNSSRV_H #define _GAIM_DNSSRV_H +#ifdef __cplusplus +extern "C" { +#endif + typedef struct _GaimSrvResponse GaimSrvResponse; typedef struct _GaimSrvQueryData GaimSrvQueryData; @@ -53,4 +57,8 @@ */ void gaim_srv_cancel(GaimSrvQueryData *query_data); +#ifdef __cplusplus +} +#endif + #endif /* _GAIM_DNSSRV_H */ Modified: trunk/libgaim/mime.h =================================================================== --- trunk/libgaim/mime.h 2006-11-07 19:54:02 UTC (rev 17697) +++ trunk/libgaim/mime.h 2006-11-07 20:40:22 UTC (rev 17698) @@ -27,6 +27,10 @@ #include <glib.h> #include <glib/glist.h> +#ifdef __cplusplus +extern "C" { +#endif + /** * @file mime.h * @ingroup core @@ -208,4 +212,8 @@ void gaim_mime_part_set_data(GaimMimePart *part, const char *data); +#ifdef __cplusplus +} #endif + +#endif Modified: trunk/libgaim/ntlm.h =================================================================== --- trunk/libgaim/ntlm.h 2006-11-07 19:54:02 UTC (rev 17697) +++ trunk/libgaim/ntlm.h 2006-11-07 20:40:22 UTC (rev 17698) @@ -26,6 +26,10 @@ #ifndef _GAIM_NTLM_H #define _GAIM_NTLM_H +#ifdef __cplusplus +extern "C" { +#endif + /** * Generates the base64 encoded type 1 message needed for NTLM authentication * @@ -61,4 +65,8 @@ */ gchar *gaim_ntlm_gen_type3(const gchar *username, const gchar *passw, const gchar *hostname, const gchar *domain, const guint8 *nonce, guint32 *flags); +#ifdef __cplusplus +} +#endif + #endif /* _GAIM_NTLM_H */ Modified: trunk/libgaim/status.h =================================================================== --- trunk/libgaim/status.h 2006-11-07 19:54:02 UTC (rev 17697) +++ trunk/libgaim/status.h 2006-11-07 20:40:22 UTC (rev 17698) @@ -113,6 +113,10 @@ #include "conversation.h" #include "value.h" +#ifdef __cplusplus +extern "C" { +#endif + /**************************************************************************/ /** @name GaimStatusPrimitive API */ /**************************************************************************/ Modified: trunk/libgaim/stringref.c =================================================================== --- trunk/libgaim/stringref.c 2006-11-07 19:54:02 UTC (rev 17697) +++ trunk/libgaim/stringref.c 2006-11-07 20:40:22 UTC (rev 17698) @@ -32,6 +32,27 @@ #include "debug.h" #include "stringref.h" +/** + * The internal representation of a stringref. + * + * @note For this structure to be useful, the string contained within + * it must be immutable -- for this reason, do _not_ access it + * directly! + */ +struct _GaimStringref { + guint32 ref; /**< The reference count of this string. + * Note that reference counts are only + * 31 bits, and the high-order bit + * indicates whether this string is up + * for GC at the next idle handler... + * But you aren't going to touch this + * anyway, right? */ + char value[1]; /**< The string contained in this ref. + * Notice that it is simply "hanging + * off the end" of the ref ... this + * is to save an allocation. */ +}; + #define REFCOUNT(x) ((x) & 0x7fffffff) static GList *gclist = NULL; Modified: trunk/libgaim/stringref.h =================================================================== --- trunk/libgaim/stringref.h 2006-11-07 19:54:02 UTC (rev 17697) +++ trunk/libgaim/stringref.h 2006-11-07 20:40:22 UTC (rev 17698) @@ -26,27 +26,12 @@ #ifndef _GAIM_STRINGREF_H_ #define _GAIM_STRINGREF_H_ -/** - * The internal representation of a stringref. - * - * @note For this structure to be useful, the string contained within - * it must be immutable -- for this reason, do _not_ access it - * directly! - */ -typedef struct _GaimStringref { - guint32 ref; /**< The reference count of this string. - * Note that reference counts are only - * 31 bits, and the high-order bit - * indicates whether this string is up - * for GC at the next idle handler... - * But you aren't going to touch this - * anyway, right? */ - char value[1]; /**< The string contained in this ref. - * Notice that it is simply "hanging - * off the end" of the ref ... this - * is to save an allocation. */ -} GaimStringref; +#ifdef __cplusplus +extern "C" { +#endif +typedef struct _GaimStringref GaimStringref; + /** * Creates an immutable reference-counted string object. The newly * created object will have a reference count of 1. @@ -143,4 +128,8 @@ */ size_t gaim_stringref_len(const GaimStringref *stringref); +#ifdef __cplusplus +} +#endif + #endif /* _GAIM_STRINGREF_H_ */ Modified: trunk/libgaim/stun.h =================================================================== --- trunk/libgaim/stun.h 2006-11-07 19:54:02 UTC (rev 17697) +++ trunk/libgaim/stun.h 2006-11-07 20:40:22 UTC (rev 17698) @@ -25,6 +25,10 @@ #ifndef _GAIM_STUN_H_ #define _GAIM_STUN_H_ +#ifdef __cplusplus +extern "C" { +#endif + /**************************************************************************/ /** @name STUN API */ /**************************************************************************/ @@ -76,4 +80,8 @@ /*@}*/ +#ifdef __cplusplus +} +#endif + #endif /* _GAIM_STUN_H_ */ Modified: trunk/libgaim/xmlnode.h =================================================================== --- trunk/libgaim/xmlnode.h 2006-11-07 19:54:02 UTC (rev 17697) +++ trunk/libgaim/xmlnode.h 2006-11-07 20:40:22 UTC (rev 17698) @@ -25,6 +25,10 @@ #ifndef _GAIM_XMLNODE_H_ #define _GAIM_XMLNODE_H_ +#ifdef __cplusplus +extern "C" { +#endif + /** * The valid types for an xmlnode */ @@ -224,4 +228,8 @@ */ void xmlnode_free(xmlnode *node); +#ifdef __cplusplus +} +#endif + #endif /* _GAIM_XMLNODE_H_ */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |