]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport of 46010
authorMartin v. Löwis <martin@v.loewis.de>
Tue, 16 May 2006 07:06:33 +0000 (07:06 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Tue, 16 May 2006 07:06:33 +0000 (07:06 +0000)
- Test for sys/statvfs.h before including it, as statvfs is present
  on some OSX installations, but its header file is not.

Misc/NEWS
Modules/posixmodule.c
configure
configure.in
pyconfig.h.in

index 7df1bb0e33c541d0541cf0d22028afacd758884a..392e37f5922daf0001242e2f8e0c928b87c37441 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -60,6 +60,9 @@ Tools/Demos
 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
index cec6b3b06cad70fea3db5bf169338bcbe12c806c..1e6640e42cd708596be8338a1949506b795e09ec 100644 (file)
@@ -6041,7 +6041,7 @@ posix_WSTOPSIG(PyObject *self, PyObject *args)
 #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 @@ posix_fstatvfs(PyObject *self, PyObject *args)
 
         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 @@ static PyMethodDef posix_methods[] = {
         {"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
index fdc65debcc2f304b1c6d9cee141f77437b7c1d4f..8c746719586837f6e91d924e1a12a977ce7fa2d6 100755 (executable)
--- a/configure
+++ b/configure
@@ -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.
 #
@@ -4562,6 +4562,7 @@ done
 
 
 
+
 
 
 for ac_header in curses.h dlfcn.h fcntl.h grp.h langinfo.h \
@@ -4570,8 +4571,8 @@ 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
index b6196e92d41ce679d34e4bed32c5db3e5a5415fe..30284b468627ca6095d35aa0c5adf9a992966bf3 100644 (file)
@@ -990,8 +990,8 @@ 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)
 AC_HEADER_DIRENT
index 34501f4de12722ed5f1a03e9978d683591a9a022..db2543de1c728e98509bd0fb82a80e0699ec6c84 100644 (file)
 /* 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