8c7adeb14e
Bump revision.
39 lines
1.2 KiB
Text
39 lines
1.2 KiB
Text
$NetBSD: patch-aj,v 1.2 2006/01/12 19:49:15 joerg Exp $
|
|
|
|
--- glib.h.orig 2001-02-27 03:44:38.000000000 +0000
|
|
+++ glib.h
|
|
@@ -119,8 +119,12 @@ extern "C" {
|
|
* defined then the current definition is correct.
|
|
*/
|
|
#ifndef NULL
|
|
+#ifdef __cplusplus
|
|
+#define NULL (0L)
|
|
+#else
|
|
#define NULL ((void*) 0)
|
|
#endif
|
|
+#endif
|
|
|
|
#ifndef FALSE
|
|
#define FALSE (0)
|
|
@@ -271,14 +275,18 @@ extern "C" {
|
|
|
|
/* Wrap the gcc __PRETTY_FUNCTION__ and __FUNCTION__ variables with
|
|
* macros, so we can refer to them as strings unconditionally.
|
|
+ *
|
|
+ * NB: GLib requires that these expand to string literals so that
|
|
+ * they're concatenable. Therefore, they're only useful for GCC < 3.0
|
|
+ * because since GCC 3.0 these macros expand to const pointers.
|
|
*/
|
|
-#ifdef __GNUC__
|
|
+#if defined(__GNUC__) && (__GNUC__ < 3)
|
|
#define G_GNUC_FUNCTION __FUNCTION__
|
|
#define G_GNUC_PRETTY_FUNCTION __PRETTY_FUNCTION__
|
|
-#else /* !__GNUC__ */
|
|
+#else /* !(__GNUC__ < 3) */
|
|
#define G_GNUC_FUNCTION ""
|
|
#define G_GNUC_PRETTY_FUNCTION ""
|
|
-#endif /* !__GNUC__ */
|
|
+#endif /* !(__GNUC__ < 3) */
|
|
|
|
/* we try to provide a usefull equivalent for ATEXIT if it is
|
|
* not defined, but use is actually abandoned. people should
|