Silly warnings from python-SunOS-5.8-sun4d-fafner

Guido van Rossum <[email protected]> Fri, 19 Jul 2002 12:17:34 -0400
Newsgroups gmane.comp.python.snake-farm.user
Message-ID <[email protected]>
This version of Solaris (python-SunOS-5.8-sun4d-fafner) seems to have
a problem, or perhaps it's GCC.  We get endless warnings (once per
file compiled!):

In file included from ../python/dist/src/Include/stringobject.h:10,
                 from ../python/dist/src/Include/Python.h:94,
                 from ../python/dist/src/Modules/python.c:3:
/sw/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/include/stdarg.h:170: warning: redefinition of `va_list'
/usr/include/stdio.h:120: warning: `va_list' previously declared here

Again, it seems the standard headers contain an internal conflict.  is
there any way we could silence this, so we'll be able to see more
interesting warnings through the noise?

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.)

Any suggestion for how to fix this?  I'm guessing fdatasync() exists
in the library (else configure wouldn't have defined HAVE_FDATASYNC),
but it's not in the header files.  Can someone verify that it's really
not in any header file?  Then we should extend the section

#ifdef __hpux
extern int fdatasync(int); /* On HP-UX, in libc but not in unistd.h */
#endif

with a similar test for __sun.

Or, if it's in some header file but there's a magical symbol needed to
enable it, what's the symbol, and how can we get it defined?

Or perhaps configure should only #define HAVE_FDATASYNC if there's a
declaration for it?

Or perhaps we should rewrite the code to inline posix_fildes(), and
turn the problem into a warning?

--Guido van Rossum (home page: http://www.python.org/~guido/)