openbsd-ports/devel/glib2/patches/patch-glib_gmacros_h
ajacoutot cf5a80bff3 *** HEADS UP!
Major update to glib2-2.26.0.
This starts a flood commit of several big updates (gtk+2 and GNOME 2.32).

Please note that there will be some WANTLIB/DEPENDS breakage probably,
this went into several bulks but it's impossible to catch everything.
Any gtk+2/glib2 related build failures, please talk to me or jasper@

The ports tree is expected to be in a unconsistent state for a couple of
days to give us time to fix everything we didn't spot or any runtime
issue with the latest GNOME.
We do this now so that we have packages with all the latest major bumped
libraries at p2k10.

Thanks to landry@ and his zomg!cluster for the bulks and reports.

ok jasper@
2010-09-30 07:17:19 +00:00

42 lines
1.2 KiB
Plaintext

$OpenBSD: patch-glib_gmacros_h,v 1.13 2010/09/30 07:17:19 ajacoutot Exp $
--- glib/gmacros.h.orig Mon Aug 9 15:34:46 2010
+++ glib/gmacros.h Mon Sep 27 14:42:36 2010
@@ -38,6 +38,7 @@
/* We include stddef.h to get the system's definition of NULL
*/
#include <stddef.h>
+#include <sys/param.h>
/* Here we provide G_GNUC_EXTENSION as an alias for __extension__,
* where this is valid. This allows for warningless compilation of
@@ -86,8 +87,13 @@
__attribute__((__noreturn__))
#define G_GNUC_CONST \
__attribute__((__const__))
+/* __attribute__((unused)) works with gcc3.3 but not g++3.3 */
+#if __GNUC__ == 3 && __GNUC_MINOR__ == 3 && !defined(__cplusplus)
#define G_GNUC_UNUSED \
__attribute__((__unused__))
+#else
+#define G_GNUC_UNUSED
+#endif
#define G_GNUC_NO_INSTRUMENT \
__attribute__((__no_instrument_function__))
#else /* !__GNUC__ */
@@ -194,11 +200,13 @@
#define TRUE (!FALSE)
#endif
-#undef MAX
+#ifndef MAX
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
+#endif
-#undef MIN
+#ifndef MIN
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
+#endif
#undef ABS
#define ABS(a) (((a) < 0) ? -(a) : (a))