[Python-checkins] r46011 - in python/branches/release24-maint: Misc/NEWS Modules/posixmodule.c configure configure.in pyconfig.h.in

martin.v.loewis python-checkins at python.org
Tue May 16 09:06:35 CEST 2006


Author: martin.v.loewis
Date: Tue May 16 09:06:33 2006
New Revision: 46011

Modified:
   python/branches/release24-maint/Misc/NEWS
   python/branches/release24-maint/Modules/posixmodule.c
   python/branches/release24-maint/configure
   python/branches/release24-maint/configure.in
   python/branches/release24-maint/pyconfig.h.in
Log:
Backport of 46010
- Test for sys/statvfs.h before including it, as statvfs is present
  on some OSX installations, but its header file is not.


Modified: python/branches/release24-maint/Misc/NEWS
==============================================================================
--- python/branches/release24-maint/Misc/NEWS	(original)
+++ python/branches/release24-maint/Misc/NEWS	Tue May 16 09:06:33 2006
@@ -60,6 +60,9 @@
 Build
 -----
 
+- Test for sys/statvfs.h before including it, as statvfs is present
+  on some OSX installation, but its header file is not.
+
 - Fix test_long failure on Tru64 with gcc by using -mieee gcc option.
 
 Documentation

Modified: python/branches/release24-maint/Modules/posixmodule.c
==============================================================================
--- python/branches/release24-maint/Modules/posixmodule.c	(original)
+++ python/branches/release24-maint/Modules/posixmodule.c	Tue May 16 09:06:33 2006
@@ -6041,7 +6041,7 @@
 #endif /* HAVE_SYS_WAIT_H */
 
 
-#if defined(HAVE_FSTATVFS)
+#if defined(HAVE_FSTATVFS) && defined(HAVE_SYS_STATVFS_H)
 #ifdef _SCO_DS
 /* SCO OpenServer 5.0 and later requires _SVID3 before it reveals the
    needed definitions in sys/statvfs.h */
@@ -6108,10 +6108,10 @@
 
         return _pystatvfs_fromstructstatvfs(st);
 }
-#endif /* HAVE_FSTATVFS */
+#endif /* HAVE_FSTATVFS && HAVE_SYS_STATVFS_H */
 
 
-#if defined(HAVE_STATVFS)
+#if defined(HAVE_STATVFS) && defined(HAVE_SYS_STATVFS_H)
 #include <sys/statvfs.h>
 
 PyDoc_STRVAR(posix_statvfs__doc__,
@@ -7593,10 +7593,10 @@
         {"WSTOPSIG",	posix_WSTOPSIG, METH_VARARGS, posix_WSTOPSIG__doc__},
 #endif /* WSTOPSIG */
 #endif /* HAVE_SYS_WAIT_H */
-#ifdef HAVE_FSTATVFS
+#if defined(HAVE_FSTATVFS) && defined(HAVE_SYS_STATVFS_H)
 	{"fstatvfs",	posix_fstatvfs, METH_VARARGS, posix_fstatvfs__doc__},
 #endif
-#ifdef HAVE_STATVFS
+#if defined(HAVE_STATVFS) && defined(HAVE_SYS_STATVFS_H)
 	{"statvfs",	posix_statvfs, METH_VARARGS, posix_statvfs__doc__},
 #endif
 #ifdef HAVE_TMPFILE

Modified: python/branches/release24-maint/configure
==============================================================================
--- python/branches/release24-maint/configure	(original)
+++ python/branches/release24-maint/configure	Tue May 16 09:06:33 2006
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 43537 .
+# From configure.in Revision: 43618 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.59 for python 2.4.
 #
@@ -4564,14 +4564,15 @@
 
 
 
+
 for ac_header in curses.h dlfcn.h fcntl.h grp.h langinfo.h \
 libintl.h ncurses.h poll.h pthread.h \
 stropts.h termios.h thread.h \
 unistd.h utime.h \
 sys/audioio.h sys/bsdtty.h sys/file.h sys/loadavg.h sys/lock.h sys/mkdev.h \
 sys/modem.h \
-sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
-sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
+sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/time.h \
+sys/times.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
 sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
 bluetooth/bluetooth.h
 do

Modified: python/branches/release24-maint/configure.in
==============================================================================
--- python/branches/release24-maint/configure.in	(original)
+++ python/branches/release24-maint/configure.in	Tue May 16 09:06:33 2006
@@ -990,8 +990,8 @@
 unistd.h utime.h \
 sys/audioio.h sys/bsdtty.h sys/file.h sys/loadavg.h sys/lock.h sys/mkdev.h \
 sys/modem.h \
-sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
-sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
+sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/time.h \
+sys/times.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
 sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
 bluetooth/bluetooth.h)
 AC_HEADER_DIRENT

Modified: python/branches/release24-maint/pyconfig.h.in
==============================================================================
--- python/branches/release24-maint/pyconfig.h.in	(original)
+++ python/branches/release24-maint/pyconfig.h.in	Tue May 16 09:06:33 2006
@@ -543,6 +543,9 @@
 /* Define to 1 if you have the <sys/socket.h> header file. */
 #undef HAVE_SYS_SOCKET_H
 
+/* Define to 1 if you have the <sys/statvfs.h> header file. */
+#undef HAVE_SYS_STATVFS_H
+
 /* Define to 1 if you have the <sys/stat.h> header file. */
 #undef HAVE_SYS_STAT_H
 


More information about the Python-checkins mailing list