Merge commit '5b7632331e7551ac202bbaba37c572b96a791c6e'
[bpt/guile.git] / libguile / c-tokenize.lex
index dc72257..03fe989 100644 (file)
@@ -1,3 +1,14 @@
+%top{
+/* Include <config.h> before anything else because Gnulib headers such
+   as <stdio.h> rely on it.
+
+   However, when cross-compiling, don't include <config.h> because it
+   contains information about the host, not about the build.  */
+#ifndef CROSS_COMPILING
+# include <config.h>
+#endif
+}
+
 %option noyywrap
 %option nounput
 %pointer
@@ -14,7 +25,6 @@ FLOQUAL               (f|F|l|L)
 INTQUAL                (l|L|ll|LL|lL|Ll|u|U)
 
 %{
-    
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>