openbsd-ports/devel/glib2/patches/patch-glib_gmacros_h

28 lines
704 B
Plaintext
Raw Normal View History

$OpenBSD: patch-glib_gmacros_h,v 1.5 2005/11/13 06:22:03 marcm Exp $
--- glib/gmacros.h.orig Mon Mar 7 21:41:42 2005
+++ glib/gmacros.h Tue Aug 23 21:22:07 2005
@@ -34,6 +34,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
@@ -156,11 +157,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))