Re: Silly warnings from python-SunOS-5.8-sun4d-fafner
Anders Qvist <[email protected]> Mon, 22 Jul 2002 12:29:08 +0200
| Newsgroups | gmane.comp.python.snake-farm.user |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Jul 19, 2002 at 03:49:21PM -0400, Guido van Rossum wrote: [snip] > > > Also, the AIX-2-000000042E00-hal builds fail (and have been failing > > > for weeks) with an error in posixmodule.c: > > > > > > ../python/dist/src/Modules/posixmodule.c: In function `posix_fdatasync': > > > ../python/dist/src/Modules/posixmodule.c:902: `fdatasync' undeclared (first use > > > this function) > > > ../python/dist/src/Modules/posixmodule.c:902: (Each undeclared identifier is rep > > > orted only once > > > ../python/dist/src/Modules/posixmodule.c:902: for each function it appears in.) > > > > > [...] > > This is in /usr/include/unistd.h: > > > > extern int fdatasync(int); > > extern int finfo(const char *, int, void *, int); > > extern int ffinfo(int, int, void *, int); > > > > #endif /* ndef _KERNEL */ > > > > #endif /* _NO_PROTO */ > > > > #define _AES_OS_VERSION 1 /* OSF, AES version */ > > > > #endif /* _ALL_SOURCE */ > > > > #endif /* _H_UNISTD */ > > > > Included to the end of file as it shows the defs required/not allowed. > > Full file attached. > > > > Can I find out which unistd.h it looks in (there doesn't seem to be > > any other on the machine, but one never knows)? > > This looks (also from looking at the full file) that either _NO_PROTO > is defined, or _ALL_SOURCE is not defined (I don't think _KERNEL would > be defined :-). I doubt that _NO_PROTO is defined, because then we'd > get tons of warnings on account of -Wrequire-prototypes. Could you > see if it doesn't define _ALL_SOURCE, and what the story behind that > is? No such luck: #error _ALL_SOURCE defined #error _NO_PROTO not defined #error _KERNEL not defined #error _H_UNISTD defined The file also has its atime updated by a make command, so it's likely to be used. #ifdef _AIX extern int fdatasync(int); #endif ... solves the problem, but isn't very beautiful. -- Anders "Quest" Qvist "We've all heard that a million monkeys banging on a million typewriters will eventually reproduce the entire works of Shakespeare. Now, thanks to the Internet, we know this is not true." -- Robert Wilensky