[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: -Wredundant-decls

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2000-12-20 20:53:52 CET

> This is an interesting idea. The problem I see here is that there
> may be=20 a different combination of headers on each platform. For
> instance, HP-UX=20 10.20 warns about "getopt" if you include both
> <stdio.h> and <stdlib.h>,=20 and "errno" is declared in both
> <errno.h> and <sys/errno.h>.

You'd specify the actual headers which you tend to use. The test
compile would include all of them, in the order specified. As for
headers which might not exist on the system... well, you could do an
implicit check for that and discard headers which don't exist. As for
headers which might not be being used (e.g. if the program can compile
with or without X11R6), the configure.in script can cope with that
easily enough.

(Why would anyone ever want to include <sys/errno.h> in userland
Received on Sat Oct 21 14:36:17 2006

This is an archived mail posted to the Subversion Dev mailing list.