+2010-03-20 Bruno Haible <bruno@clisp.org>
+
+ Ensure no #include statements inside extern "C" { ... }.
+ * lib/obstack.h: Shrink extern "C" { ... } region so that it does not
+ contain #include statements.
+ * lib/time.in.h: Likewise.
+
2010-03-20 Bruno Haible <bruno@clisp.org>
Make _GL_WARN_ON_USE usable in C++ and C mode in the same compilation.
#ifndef _OBSTACK_H
#define _OBSTACK_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#endif
\f
/* We need the type of a pointer subtraction. If __PTRDIFF_TYPE__ is
defined, as with GNU C, use that; that way we don't pollute the
#include <string.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct _obstack_chunk /* Lives at front of each chunk. */
{
char *limit; /* 1 past end of this chunk */
/* The definition of _GL_WARN_ON_USE is copied here. */
-# ifdef __cplusplus
-extern "C" {
-# endif
-
/* Some systems don't define struct timespec (e.g., AIX 4.1, Ultrix 4.3).
Or they define it with the wrong member names or define it in <sys/time.h>
(e.g., FreeBSD circa 1997). */
# if @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
# include <sys/time.h>
# else
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
# undef timespec
# define timespec rpl_timespec
struct timespec
time_t tv_sec;
long int tv_nsec;
};
-# endif
-# endif
-# ifdef __cplusplus
+# ifdef __cplusplus
}
+# endif
+
+# endif
# endif
/* Sleep for at least RQTP seconds unless interrupted, If interrupted,