[EMAIL PROTECTED] (Bob Proulx) writes: > This occurs on HP-UX 11.23 hppa using the native ANSI C compiler. > Curiously the HP-UX 11.23 ia64 native ANSI C compiler did not > complain. > > source='xstrtoimax.c' object='xstrtoimax.o' libtool=no \ > DEPDIR=.deps depmode=hp /bin/sh ../build-aux/depcomp \ > cc -DHAVE_CONFIG_H -DLIBDIR=\"/usr/local/lib\" -I. -I. -I.. -I.. > -I. -Ae -O -c xstrtoimax.c > cpp: "./stdint.h", line 46: error 4034: Bad syntax for #include directive. > make[3]: *** [xstrtoimax.o] Error 1 > > Here is the resulting code. > > #if 1 > # if defined __sgi && ! defined __c99 > /* Bypass IRIX's <stdint.h> if in C89 mode, since it merely annoys users > with "This header file is to be used only for c99 mode compilations" > diagnostics. */ > # define __STDINT_H__ > # endif > /* Other systems may have an incomplete or buggy <stdint.h>. > Include it before <inttypes.h>, since any "#include <stdint.h>" > in <inttypes.h> would reinclude us, skipping our contents because > _GL_STDINT_H is defined. */ > # include <///usr/include/stdint.h> > #endif > > I don't think it is valid to use <> with an absolute path.
The C Standard doesn't disallow it, though it does say that the behavior of "" and <> are both implementation-defined. > However if I change it to use "" inclusion it works. OK, thanks, then we might as well try using "" everywhere. I'm more comfortable with "///..." anyway; the <///...> gave me the willies, since a compiler might think it was a C99 comment. If "" doesn't work someplace else, then we'll need another compile-time test. I installed this into gnulib and coreutils: 2006-07-09 Paul Eggert <[EMAIL PROTECTED]> * absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <> around the absolute name, to work around a problem with the HP-UX 11.23 native C compiler, reported by Bob Proulx. --- absolute-header.m4.~1.1.~ 2006-07-04 00:27:33.000000000 -0700 +++ absolute-header.m4 2006-07-09 21:11:45.000000000 -0700 @@ -1,4 +1,4 @@ -# absolute-header.m4 serial 4 +# absolute-header.m4 serial 5 dnl Copyright (C) 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -36,7 +36,7 @@ sed -n '\#/]m4_quote(m4_defn([gl_HEADER_ AS_VAR_POPDEF([ac_header_exists])dnl ])dnl AC_DEFINE_UNQUOTED(AS_TR_CPP([ABSOLUTE_]m4_quote(m4_defn([gl_HEADER_NAME]))), - [<AS_VAR_GET(gl_absolute_header)>], + ["AS_VAR_GET(gl_absolute_header)"], [Define this to an absolute name of <]m4_quote(m4_defn([gl_HEADER_NAME]))[>.]) AS_VAR_POPDEF([gl_absolute_header])dnl ])dnl