summaryrefslogtreecommitdiff
path: root/lang/gawk/patches
diff options
context:
space:
mode:
authortron <tron@pkgsrc.org>2013-12-26 19:19:31 +0000
committertron <tron@pkgsrc.org>2013-12-26 19:19:31 +0000
commitbe37dc4f4fd73bf574b8c29bf66967a9cef2298f (patch)
treeafb6201e5d62aea7b4a99469c692eda23af9259d /lang/gawk/patches
parent79d862f2a7733873c5220e7961998d903f5389e8 (diff)
downloadpkgsrc-be37dc4f4fd73bf574b8c29bf66967a9cef2298f.tar.gz
Fix build under Solaris, in particular with the SunStudio compiler.
Diffstat (limited to 'lang/gawk/patches')
-rw-r--r--lang/gawk/patches/patch-awk.h18
-rw-r--r--lang/gawk/patches/patch-extension_filefuncs.c19
2 files changed, 37 insertions, 0 deletions
diff --git a/lang/gawk/patches/patch-awk.h b/lang/gawk/patches/patch-awk.h
new file mode 100644
index 00000000000..3db0683e8b0
--- /dev/null
+++ b/lang/gawk/patches/patch-awk.h
@@ -0,0 +1,18 @@
+$NetBSD: patch-awk.h,v 1.1 2013/12/26 19:19:32 tron Exp $
+
+Fix build problem with SunStudio compiler under Solaris. Patch taken
+from here:
+
+http://lists.gnu.org/archive/html/bug-gawk/2011-07/msg00008.html
+
+--- awk.h.orig 2013-04-07 18:54:28.000000000 +0100
++++ awk.h 2013-12-26 19:03:34.000000000 +0000
+@@ -69,7 +69,7 @@
+ #endif /* LOCALEDIR */
+ #endif
+
+-#if !defined(__STDC__) || __STDC__ < 1
++#if !defined(__STDC__) || __STDC__ < 1 && !defined(__EXTENSIONS__)
+ #error "gawk no longer supports non-C89 environments (no __STDC__ or __STDC__ < 1)"
+ #endif
+
diff --git a/lang/gawk/patches/patch-extension_filefuncs.c b/lang/gawk/patches/patch-extension_filefuncs.c
new file mode 100644
index 00000000000..b1077d09631
--- /dev/null
+++ b/lang/gawk/patches/patch-extension_filefuncs.c
@@ -0,0 +1,19 @@
+$NetBSD: patch-extension_filefuncs.c,v 1.1 2013/12/26 19:19:32 tron Exp $
+
+Fix build problem under Solaris. The more elegant fix is available here:
+
+http://lists.gnu.org/archive/html/bug-gawk/2013-06/msg00010.html
+
+--- extension/filefuncs.c.orig 2013-05-02 20:51:30.000000000 +0100
++++ extension/filefuncs.c 2013-12-26 19:12:54.000000000 +0000
+@@ -75,6 +75,10 @@
+ #define minor(s) (0)
+ #endif
+
++#ifdef __sun
++#include <sys/mkdev.h>
++#endif
++
+ static const gawk_api_t *api; /* for convenience macros to work */
+ static awk_ext_id_t *ext_id;
+ static awk_bool_t init_filefuncs(void);