summaryrefslogtreecommitdiff
path: root/net/amule/patches/patch-ab
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2005-04-13 18:12:55 +0000
committerrillig <rillig@pkgsrc.org>2005-04-13 18:12:55 +0000
commit03198c6fd5508888a4d219a9f6bf7dbe6329e707 (patch)
treedd084a779c35674b5c4bbe160689fd8ef61f89ac /net/amule/patches/patch-ab
parent78366a3c7da30abca619612a0305ec70834c2b62 (diff)
downloadpkgsrc-03198c6fd5508888a4d219a9f6bf7dbe6329e707.tar.gz
Corrected the patch to apply to sys.h.in, not to sys.h. Also provided a
better comment that describes why the patch is needed. Approved by jlam.
Diffstat (limited to 'net/amule/patches/patch-ab')
-rw-r--r--net/amule/patches/patch-ab38
1 files changed, 25 insertions, 13 deletions
diff --git a/net/amule/patches/patch-ab b/net/amule/patches/patch-ab
index 11652261fc4..e2cb47b88a1 100644
--- a/net/amule/patches/patch-ab
+++ b/net/amule/patches/patch-ab
@@ -1,21 +1,33 @@
-$NetBSD: patch-ab,v 1.3 2005/03/16 19:06:10 rillig Exp $
+$NetBSD: patch-ab,v 1.4 2005/04/13 18:12:55 rillig Exp $
-The C++ standard library headers sometimes include <_G_config.h>, which
-undefines the NULL macro and includes <stddef.h> afterwards. But if the
-<stddef.h> header had been included once before, the GNU C preprocessor
-doesn't include it a second time.
+The C++ standard library headers shipped with gcc-2.95 sometimes include
+<_G_config.h>, which undefines the NULL macro and then includes
+<stddef.h> afterwards. Currently the situation is:
---- src/sys.h.orig Sun Jun 13 17:37:06 2004
-+++ src/sys.h Wed Mar 16 19:40:44 2005
-@@ -23,6 +23,11 @@
- #ifndef SYS_H
- #define SYS_H
+ #include <stddef.h> /* defines NULL */
+ #include <_G_config.h> /* undefines NULL */
+ # include <stddef.h> /* is skipped (guarded) */
+ => NULL is undefined.
+
+So we need to include <_G_config.h> at the very beginning. Then the
+sequence is:
+
+ #include <_G_config.h> /* undefines NULL */
+ # include <stddef.h> /* defines NULL */
+ #include <_G_config.h> /* is skipped (guarded) */
+ => NULL is defined.
+
+--- src/sys.h.in.orig Sun Jun 13 16:50:10 2004
++++ src/sys.h.in Tue Apr 12 11:53:19 2005
+@@ -40,6 +40,11 @@
+ #define _THREAD_SAFE
+ #endif
+/* This is needed to have a NULL macro */
+#if defined(__NetBSD__) && defined(__GNUC__) && ((__GNUC__) < 3)
+# include <stl_config.h>
+#endif
+
- //
- // The build system forgets to add the correct CXXFLAGS (like for
- // example -pthread for g++). Therefore define this here instead.
+ #ifndef __linux__
+ #include <sys/types.h>
+ #endif