changeset 10399:d409a1cc4085

Add check whether #include_next also works after #include directives.
author Albert Chin <bug-gnulib@mlists.thewrittenword.com>
date Fri, 05 Sep 2008 00:50:51 +0200
parents c640552acc85
children 817f1418bbde
files ChangeLog m4/include_next.m4
diffstat 2 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-09-04  Albert Chin  <bug-gnulib@mlists.thewrittenword.com>
+            Bruno Haible  <bruno@clisp.org>
+
+	* m4/include_next.m4 (gl_INCLUDE_NEXT): Add check whether #include_next
+	also works after #include directives.
+
 2008-09-04  Ondřej Vašík  <ovasik@redhat.com>
 
 	getdate.y: reject an out-of-range timezone value
--- a/m4/include_next.m4
+++ b/m4/include_next.m4
@@ -1,4 +1,4 @@
-# include_next.m4 serial 7
+# include_next.m4 serial 8
 dnl Copyright (C) 2006-2008 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -28,8 +28,12 @@
     [gl_cv_have_include_next],
     [rm -rf conftestd1 conftestd2
      mkdir conftestd1 conftestd2
+     dnl The include of <stdio.h> is because IBM C 9.0 on AIX 6.1 supports
+     dnl include_next when used as first preprocessor directive in a file,
+     dnl but not when preceded by another include directive.
      cat <<EOF > conftestd1/conftest.h
 #define DEFINED_IN_CONFTESTD1
+#include <stdio.h>
 #include_next <conftest.h>
 #ifdef DEFINED_IN_CONFTESTD2
 int foo;