public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* glob.h syntax errors
@ 2004-09-16 23:30 Andreas Schwab
  2004-09-16 23:43 ` Roland McGrath
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Schwab @ 2004-09-16 23:30 UTC (permalink / raw)
  To: libc-hacker

When <glob.h> is included as the first header it produces lots of syntax
errors:

$ echo '#include <glob.h>' | gcc -c -xc - -o /dev/null
In file included from <stdin>:1:
/usr/include/glob.h:177: error: parse error before "__THROW"
/usr/include/glob.h:180: error: parse error before "__THROW"
$ echo '#include <glob.h>' | gcc -c -xc - -o /dev/null -D_LARGEFILE64_SOURCE
In file included from <stdin>:1:
/usr/include/glob.h:177: error: parse error before "__THROW"
/usr/include/glob.h:180: error: parse error before "__THROW"
/usr/include/glob.h:193: error: parse error before "__THROW"
/usr/include/glob.h:195: error: parse error before "__THROW"
$ echo '#include <glob.h>' | gcc -c -xc - -o /dev/null -D_FILE_OFFSET_BITS=64
In file included from <stdin>:1:
/usr/include/glob.h:182: error: parse error before '(' token
/usr/include/glob.h:184: error: `__REDIRECT_NTH' declared as function returning a function
/usr/include/glob.h:185: error: `glob_t' redeclared as different kind of symbol
/usr/include/glob.h:129: error: previous declaration of `glob_t'
/usr/include/glob.h:185: error: parse error before '*' token
/usr/include/glob.h:187: error: parse error before '(' token
/usr/include/glob.h:187: error: conflicting types for `__REDIRECT_NTH'
/usr/include/glob.h:184: error: previous declaration of `__REDIRECT_NTH'
/usr/include/glob.h:187: error: parse error before ')' token

Shouldn't it include <sys/cdefs.h>?

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-09-16 23:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-16 23:30 glob.h syntax errors Andreas Schwab
2004-09-16 23:43 ` Roland McGrath

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).