I am currently building something on Solaris 8 that uses sys/mnttab.h
I tried building this and got the following make errors:
In file included from check_fs_type.c:10:
/usr/include/sys/mnttab.h:62: parse error before `*'
/usr/include/sys/mnttab.h:63: parse error before `*'
/usr/include/sys/mnttab.h:64: parse error before `*'
/usr/include/sys/mnttab.h:65: parse error before `*'
Looking at the file shows the following:
#ifdef __STDC__
extern void resetmnttab(FILE *);
extern int getmntent(FILE *, struct mnttab *);
extern int getextmntent(FILE *, struct extmnttab *, size_t);
extern int getmntany(FILE *, struct mnttab *, struct mnttab *);
extern char *hasmntopt(struct mnttab *, char *);
extern char *mntopt(char **);
#else
extern void resetmnttab();
extern int getmntent();
extern int getextmntent();
extern int getmntany();
extern char *hasmntopt();
extern char *mntopt();
#endif
Seeing this, I added a line to my config.h saying
#undef __STDC__
now the application builds (and appears to run) ok, but there are
LOADS of warnings. Basically, every file that includes config.h
produces the following warning at compile time :
In file included from config_opts.c:8:
config.h:19: warning: undefining `__STDC__'
What is the right way to
a) detect, preferably with autoconf as to whether this should be
defined or not
and
b) disable this without causing warnings to spew forth.
TIA,
--
- Wayne Pascoe
| There are no stupid questions,
http://www.penguinpowered.org.uk |