comparison libpurple/plugins/debug_example.c @ 20101:3a5f152e7ed0

This fixes compilation issues where old glib and either an old gcc or a non-gcc compiler is used. I have opted to put the same preprocessor directives in each plugin over including additional headers to fix this for the purposes of staying as close as possible to the version I have in the how-to documentss on the wiki. Fixes #3142 and bugs reported via the mailing list, IRC channel, and XMPP conference.
author John Bailey <rekkanoryo@rekkanoryo.org>
date Mon, 17 Sep 2007 04:50:24 +0000
parents bdffee131b80
children 3cc856ca2338
comparison
equal deleted inserted replaced
20099:ac6bf49cd5ba 20101:3a5f152e7ed0
24 # include <config.h> 24 # include <config.h>
25 #endif 25 #endif
26 26
27 /* We're including glib.h again for the gboolean type. */ 27 /* We're including glib.h again for the gboolean type. */
28 #include <glib.h> 28 #include <glib.h>
29
30 /* This will prevent compiler errors in some instances and is better explained in the
31 * how-to documents on the wiki */
32 #ifndef G_GNUC_NULL_TERMINATED
33 # if __GNUC__ >= 4
34 # define G_GNUC_NULL_TERMINATED __attribute__((__sentinel__))
35 # else
36 # define G_GNUC_NULL_TERMINATED
37 # endif
38 #endif
29 39
30 /* This is the required definition of PURPLE_PLUGINS as required for a plugin, 40 /* This is the required definition of PURPLE_PLUGINS as required for a plugin,
31 * but we protect it with an #ifndef because config.h may define it for us 41 * but we protect it with an #ifndef because config.h may define it for us
32 * already and this would cause an unneeded compiler warning. */ 42 * already and this would cause an unneeded compiler warning. */
33 #ifndef PURPLE_PLUGINS 43 #ifndef PURPLE_PLUGINS