summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/regcustom.h14
-rw-r--r--generic/regex.h3
-rw-r--r--generic/regguts.h12
3 files changed, 18 insertions, 11 deletions
diff --git a/generic/regcustom.h b/generic/regcustom.h
index 1c970ea..57a2d47 100644
--- a/generic/regcustom.h
+++ b/generic/regcustom.h
@@ -30,16 +30,16 @@
* Headers if any.
*/
-#include "regex.h"
+#include "tclInt.h"
/*
* Overrides for regguts.h definitions, if any.
*/
#define FUNCPTR(name, args) (*name)args
-#define MALLOC(n) VS(attemptckalloc(n))
+#define MALLOC(n) ckalloc(n)
#define FREE(p) ckfree(VS(p))
-#define REALLOC(p,n) VS(attemptckrealloc(VS(p),n))
+#define REALLOC(p,n) ckrealloc(VS(p),n)
/*
* Do not insert extras between the "begin" and "end" lines - this chunk is
@@ -155,9 +155,7 @@ typedef int celt; /* Type to hold chr, or NOCELT */
#endif
/*
- * Local Variables:
- * mode: c
- * c-basic-offset: 4
- * fill-column: 78
- * End:
+ * And pick up the standard header.
*/
+
+#include "regex.h"
diff --git a/generic/regex.h b/generic/regex.h
index 04a0d76..b5b11bd 100644
--- a/generic/regex.h
+++ b/generic/regex.h
@@ -1,8 +1,5 @@
#ifndef _REGEX_H_
#define _REGEX_H_ /* never again */
-
-#include "tclInt.h"
-
/*
* regular expressions
*
diff --git a/generic/regguts.h b/generic/regguts.h
index cd14df5..4bc4813 100644
--- a/generic/regguts.h
+++ b/generic/regguts.h
@@ -39,6 +39,15 @@
* Things that regcustom.h might override.
*/
+/* standard header files (NULL is a reasonable indicator for them) */
+#ifndef NULL
+#include <stdio.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <limits.h>
+#include <string.h>
+#endif
+
/* assertions */
#ifndef assert
#ifndef REG_DEBUG
@@ -92,6 +101,9 @@
#endif
/* want size of a char in bits, and max value in bounded quantifiers */
+#ifndef CHAR_BIT
+#include <limits.h>
+#endif
#ifndef _POSIX2_RE_DUP_MAX
#define _POSIX2_RE_DUP_MAX 255 /* normally from <limits.h> */
#endif