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.
This commit is contained in:
parent
8102d31ba4
commit
2a39415477
4 changed files with 62 additions and 6 deletions
|
@ -1,8 +1,10 @@
|
|||
$NetBSD: distinfo,v 1.13 2007/04/10 19:44:27 joerg Exp $
|
||||
$NetBSD: distinfo,v 1.14 2007/12/19 00:11:26 rillig Exp $
|
||||
|
||||
SHA1 (sed-4.1.5.tar.gz) = 8e575e8a44568392d5b6e089eab5da5cdbd45885
|
||||
RMD160 (sed-4.1.5.tar.gz) = 49b12e99a55c6d2e78ad236f0205e63e46444173
|
||||
Size (sed-4.1.5.tar.gz) = 799584 bytes
|
||||
SHA1 (patch-aa) = fa00264254c527a08bce1b60090fc05ebe2fbd37
|
||||
SHA1 (patch-ad) = 95e210098db1ba9d28623acfa1e4d838e5d94cfa
|
||||
SHA1 (patch-ae) = 2091cccb70a8017d8e6fd356874681b51f366890
|
||||
SHA1 (patch-ae) = 5246cbee7e25923bfe7f4896404e286d5721c135
|
||||
SHA1 (patch-regcomp) = 633f4ed4216cf6538c166b7cd5c3df1950c8fdea
|
||||
SHA1 (patch-regexec) = 26a97fa3b6c161ebe6fa6b80251d1bb11f2877f0
|
||||
|
|
|
@ -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
|
||||
|
|
25
textproc/gsed/patches/patch-regcomp
Normal file
25
textproc/gsed/patches/patch-regcomp
Normal file
|
@ -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
|
||||
|
15
textproc/gsed/patches/patch-regexec
Normal file
15
textproc/gsed/patches/patch-regexec
Normal file
|
@ -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;
|
Loading…
Reference in a new issue