openbsd-ports/devel/glib/patches/patch-glib_h

42 lines
875 B
Plaintext
Raw Normal View History

$OpenBSD: patch-glib_h,v 1.4 2007/12/11 10:57:25 jakemsr Exp $
2001-03-11 22:55:05 -05:00
--- glib.h.orig Mon Feb 26 22:44:38 2001
2001-10-01 21:33:57 -04:00
+++ glib.h Thu Sep 20 00:13:09 2001
2000-08-27 18:17:40 -04:00
@@ -27,6 +27,8 @@
#ifndef __G_LIB_H__
#define __G_LIB_H__
+#include <sys/param.h>
+
/* system specific config file glibconfig.h provides definitions for
* the extrema of many of the standard types. These are:
*
2001-10-01 21:33:57 -04:00
@@ -119,8 +121,12 @@ extern "C" {
2001-03-11 22:55:05 -05:00
* defined then the current definition is correct.
*/
#ifndef NULL
+#ifdef __cplusplus
+#define NULL (0)
+#else
#define NULL ((void*) 0)
#endif
+#endif
#ifndef FALSE
#define FALSE (0)
2001-10-01 21:33:57 -04:00
@@ -130,11 +136,13 @@ extern "C" {
2000-08-27 18:17:40 -04:00
#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))