diff options
Diffstat (limited to 'net-p2p/gtk-gnutella/files/patch-gcc2.diff')
-rw-r--r-- | net-p2p/gtk-gnutella/files/patch-gcc2.diff | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/net-p2p/gtk-gnutella/files/patch-gcc2.diff b/net-p2p/gtk-gnutella/files/patch-gcc2.diff new file mode 100644 index 000000000000..634145556cb7 --- /dev/null +++ b/net-p2p/gtk-gnutella/files/patch-gcc2.diff @@ -0,0 +1,52 @@ +--- src/core/rx_inflate.h.orig Tue Nov 22 22:47:05 2005 ++++ src/core/rx_inflate.h Sat Nov 26 18:15:09 2005 +@@ -46,7 +46,7 @@ + struct rx_inflate_cb { + void (*add_rx_inflated)(gpointer owner, gint amount); + void (*inflate_error)(gpointer owner, +- const gchar *reason, ...) G_GNUC_PRINTF(2, 3); ++ const gchar *reason, ...) PRINTF_FUNC_PTR(2, 3); + }; + + /** +--- src/core/rx_chunk.h.orig Tue Nov 22 22:47:05 2005 ++++ src/core/rx_chunk.h Sat Nov 26 18:15:09 2005 +@@ -45,7 +45,7 @@ + */ + struct rx_chunk_cb { + void (*chunk_error)(gpointer owner, +- const gchar *reason, ...) G_GNUC_PRINTF(2, 3); ++ const gchar *reason, ...) PRINTF_FUNC_PTR(2, 3); + void (*chunk_end)(gpointer owner); + }; + +--- src/core/rx_link.h.orig Tue Nov 22 22:47:05 2005 ++++ src/core/rx_link.h Sat Nov 26 18:15:09 2005 +@@ -46,7 +46,7 @@ + struct rx_link_cb { + void (*add_rx_given)(gpointer owner, gint amount); + void (*read_error)(gpointer owner, +- const gchar *reason, ...) G_GNUC_PRINTF(2, 3); ++ const gchar *reason, ...) PRINTF_FUNC_PTR(2, 3); + void (*got_eof)(gpointer owner); + }; + +--- src/common.h.orig Tue Nov 22 22:47:03 2005 ++++ src/common.h Sat Nov 26 18:15:08 2005 +@@ -366,6 +366,16 @@ + #define NON_NULL_PARAM(x) __attribute__((nonnull x)) + #else /* GCC < 3.3 */ + #define NON_NULL_PARAM(x) ++#endif ++ ++/** ++ * This is the same G_GNUC_FORMAT() but for function pointers. Older versions ++ * of GCC do not allow function attributes for function pointers. ++ */ ++#if HAVE_GCC(3, 0) ++#define PRINTF_FUNC_PTR(x, y) __attribute__((format(printf, (x), (y)))) ++#else /* GCC < 3.0 */ ++#define PRINTF_FUNC_PTR(x, y) + #endif + + /* Functions using this attribute cause a warning if the returned |