summaryrefslogtreecommitdiff
path: root/textproc/gsed/patches/patch-ae
blob: 990ef0878765a28a24af21544f7ddcd052843423 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
$NetBSD: patch-ae,v 1.4 2007/12/19 00:11:26 rillig Exp $

--- 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
 # if HAVE_ALLOCA