aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2013-01-18 12:13:31 +0200
committerArnold D. Robbins <arnold@skeeve.com>2013-01-18 12:13:31 +0200
commit2d1a7927d6d83e406597e12bca21311eb99343e4 (patch)
treee3bfbe83a120e5c92db30ffb3815d60d2309e866
parent555c01ad237512c6b2f328cb7788eb95490358e8 (diff)
downloadegawk-2d1a7927d6d83e406597e12bca21311eb99343e4.tar.gz
egawk-2d1a7927d6d83e406597e12bca21311eb99343e4.tar.bz2
egawk-2d1a7927d6d83e406597e12bca21311eb99343e4.zip
Fix order of include problem in dfa.c/dfa.h.
-rw-r--r--ChangeLog9
-rw-r--r--dfa.c5
-rw-r--r--dfa.h3
3 files changed, 15 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index c0074c3e..55ce091f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2013-01-18 Arnold D. Robbins <arnold@skeeve.com>
+
+ Fix a problem with include ordering to get ptrdiff_t definition,
+ showed up on Debian Lenny. Reported by Manuel Collado.
+ Fix brought over from grep.
+
+ * dfa.h: Include regex.h and stddef.h directly.
+ * dfa.c: Adjust includes.
+
2013-01-05 Arnold D. Robbins <arnold@skeeve.com>
* regex_internal.h (struct re_dfa_t): Restore ifdefs around
diff --git a/dfa.c b/dfa.c
index fa05181c..a7f69386 100644
--- a/dfa.c
+++ b/dfa.c
@@ -21,6 +21,9 @@
Modified July, 1988 by Arthur David Olson to assist BMG speedups */
#include <config.h>
+
+#include "dfa.h"
+
#include <assert.h>
#include <ctype.h>
#include <stdio.h>
@@ -79,8 +82,6 @@
# include <langinfo.h>
#endif
-#include "regex.h"
-#include "dfa.h"
#include "xalloc.h"
#ifdef GAWK
diff --git a/dfa.h b/dfa.h
index 96dd4b86..7d29ce2e 100644
--- a/dfa.h
+++ b/dfa.h
@@ -18,6 +18,9 @@
/* Written June, 1988 by Mike Haertel */
+#include <regex.h>
+#include <stddef.h>
+
/* Element of a list of strings, at least one of which is known to
appear in any R.E. matching the DFA. */
struct dfamust