summaryrefslogtreecommitdiff
path: root/textproc/gsed/patches
diff options
context:
space:
mode:
authorrillig <rillig>2007-12-19 00:11:26 +0000
committerrillig <rillig>2007-12-19 00:11:26 +0000
commit000fcbff5502077d394b445c8314b7b7df331175 (patch)
treec7be142472c2369506af6746492089e6f413ae66 /textproc/gsed/patches
parent1f3ec29b9e19df75350c8e6ac7b1a4985f152af4 (diff)
downloadpkgsrc-000fcbff5502077d394b445c8314b7b7df331175.tar.gz
Fixed the build on Solaris with the Sun C compiler. Like many other
pieces of GNU software, this package makes use of GCC extensions. Another thing is that on Solaris, <stdbool.h> may only be included by the c99 compiler, not any other; therefore we need to define our boolean type ourself.
Diffstat (limited to 'textproc/gsed/patches')
-rw-r--r--textproc/gsed/patches/patch-ae22
-rw-r--r--textproc/gsed/patches/patch-regcomp25
-rw-r--r--textproc/gsed/patches/patch-regexec15
3 files changed, 58 insertions, 4 deletions
diff --git a/textproc/gsed/patches/patch-ae b/textproc/gsed/patches/patch-ae
index c3a1c07785f..990ef087876 100644
--- a/textproc/gsed/patches/patch-ae
+++ b/textproc/gsed/patches/patch-ae
@@ -1,12 +1,26 @@
-$NetBSD: patch-ae,v 1.3 2007/03/08 18:53:58 wiz Exp $
+$NetBSD: patch-ae,v 1.4 2007/12/19 00:11:26 rillig Exp $
---- lib/regex_internal.h.orig 2005-12-06 08:50:56.000000000 +0000
-+++ lib/regex_internal.h
-@@ -410,7 +410,7 @@ static unsigned int re_string_context_at
+--- lib/regex_internal.h.orig 2005-12-06 09:50:56.000000000 +0100
++++ lib/regex_internal.h 2007-12-19 01:00:04.578459000 +0100
+@@ -41,6 +41,10 @@
+ #endif /* HAVE_WCTYPE_H || _LIBC */
+ #if defined HAVE_STDBOOL_H || defined _LIBC
+ # include <stdbool.h>
++#elif defined HAVE__BOOL
++# define bool _Bool
++# define false 0
++# define true 1
+ #endif /* HAVE_STDBOOL_H || _LIBC */
+ #if defined _LIBC
+ # include <bits/libc-lock.h>
+@@ -410,7 +414,10 @@ static unsigned int re_string_context_at
#define re_string_skip_bytes(pstr,idx) ((pstr)->cur_idx += (idx))
#define re_string_set_index(pstr,idx) ((pstr)->cur_idx = (idx))
-#include <alloca.h>
++#if defined(__sun)
++# include <alloca.h>
++#endif
+#include <stdlib.h>
#ifndef _LIBC
diff --git a/textproc/gsed/patches/patch-regcomp b/textproc/gsed/patches/patch-regcomp
new file mode 100644
index 00000000000..b99a1e95266
--- /dev/null
+++ b/textproc/gsed/patches/patch-regcomp
@@ -0,0 +1,25 @@
+$NetBSD: patch-regcomp,v 1.1 2007/12/19 00:11:26 rillig Exp $
+
+The [ from ... to ] designator is gcc-specific.
+
+--- lib/regcomp.c.orig 2005-12-06 09:46:51.000000000 +0100
++++ lib/regcomp.c 2007-12-19 00:52:02.864945000 +0100
+@@ -558,7 +558,17 @@ weak_alias (__regerror, regerror)
+ static const bitset_t utf8_sb_map =
+ {
+ /* Set the first 128 bits. */
+- [0 ... 0x80 / BITSET_WORD_BITS - 1] = BITSET_WORD_MAX
++#if BITSET_WORD_MAX == 0xffffffffULL
++ [0] = BITSET_WORD_MAX,
++ [1] = BITSET_WORD_MAX,
++ [2] = BITSET_WORD_MAX,
++ [3] = BITSET_WORD_MAX
++#elif BITSET_WORD_BITS == 0xffffffffffffffffULL
++ [0] = BITSET_WORD_MAX,
++ [1] = BITSET_WORD_MAX
++#else
++#error "Unknown value for BITSET_WORD_MAX"
++#endif
+ };
+ #endif
+
diff --git a/textproc/gsed/patches/patch-regexec b/textproc/gsed/patches/patch-regexec
new file mode 100644
index 00000000000..e63bf86e001
--- /dev/null
+++ b/textproc/gsed/patches/patch-regexec
@@ -0,0 +1,15 @@
+$NetBSD: patch-regexec,v 1.1 2007/12/19 00:11:26 rillig Exp $
+
+gcc extensions tend to confuse other compilers.
+
+--- lib/regexec.c.orig 2005-12-06 09:46:56.000000000 +0100
++++ lib/regexec.c 2007-12-19 00:55:31.130195000 +0100
+@@ -2894,7 +2894,7 @@ check_arrival (re_match_context_t *mctx,
+ sizeof (re_dfastate_t *) * (path->alloc - old_alloc));
+ }
+
+- str_idx = path->next_idx ?: top_str;
++ str_idx = path->next_idx ? path->next_idx : top_str;
+
+ /* Temporary modify MCTX. */
+ backup_state_log = mctx->state_log;