new patch (GNU/kFreeBSD port)
Robert Millan
rmh at aybabtu.com
Mon Feb 6 08:09:56 CST 2006
Here we go again. This should complete the GNU/kFreeBSD port.
2006-02-06 Robert Millan <robertmh at gnu.org>
* configure.ac: Check for sys/mount.h, sys/statfs.h and sys/vfs.h
precense/usability instead of checking for statfs.
* configure: Regenerate.
* include/config.h.in: Regenerate.
* dlls/ntdll/file.c: For sys/mount.h, sys/statfs.h and sys/vfs.h,
always include them if present.
* libs/port/fstatvfs.c: Ditto.
* libs/port/statvfs.c: Ditto.
* tools/winapi/winapi_check: Don't bother with STATFS_DEFINED_BY_*
since these macros no longer exist.
--
Robert Millan
-------------- next part --------------
2006-02-06 Robert Millan <robertmh at gnu.org>
* configure.ac: Check for sys/mount.h, sys/statfs.h and sys/vfs.h
precense/usability instead of checking for statfs.
* configure: Regenerate.
* include/config.h.in: Regenerate.
* dlls/ntdll/file.c: For sys/mount.h, sys/statfs.h and sys/vfs.h,
always include them if present.
* libs/port/fstatvfs.c: Ditto.
* libs/port/statvfs.c: Ditto.
* tools/winapi/winapi_check: Don't bother with STATFS_DEFINED_BY_*
since these macros no longer exist.
Index: configure.ac
===================================================================
RCS file: /home/wine/wine/configure.ac,v
retrieving revision 1.427
diff -u -r1.427 configure.ac
--- configure.ac 5 Feb 2006 12:59:20 -0000 1.427
+++ configure.ac 6 Feb 2006 13:56:20 -0000
@@ -247,6 +247,7 @@
sys/lwp.h \
sys/mman.h \
sys/modem.h \
+ sys/mount.h \
sys/msg.h \
sys/mtio.h \
sys/param.h \
@@ -259,6 +260,7 @@
sys/socket.h \
sys/sockio.h \
sys/soundcard.h \
+ sys/statfs.h \
sys/statvfs.h \
sys/strtio.h \
sys/syscall.h \
@@ -268,6 +270,7 @@
sys/uio.h \
sys/un.h \
sys/vm86.h \
+ sys/vfs.h \
sys/wait.h \
syscall.h \
termios.h \
@@ -1312,76 +1315,6 @@
fi
fi
-dnl **** statfs checks ****
-
-if test "$ac_cv_header_sys_vfs_h" = "yes"
-then
- AC_CACHE_CHECK( [whether sys/vfs.h defines statfs],
- wine_cv_sys_vfs_has_statfs,
- AC_TRY_COMPILE([
- #include <sys/types.h>
- #ifdef HAVE_SYS_PARAM_H
- # include <sys/param.h>
- #endif
- #include <sys/vfs.h>
- ],[
- struct statfs stfs;
-
- memset(&stfs,0,sizeof(stfs));
- ],wine_cv_sys_vfs_has_statfs=yes,wine_cv_sys_vfs_has_statfs=no
- )
- )
- if test "$wine_cv_sys_vfs_has_statfs" = "yes"
- then
- AC_DEFINE(STATFS_DEFINED_BY_SYS_VFS, 1,
- [Define if the struct statfs is defined by <sys/vfs.h>])
- fi
-fi
-
-if test "$ac_cv_header_sys_statfs_h" = "yes"
-then
- AC_CACHE_CHECK( [whether sys/statfs.h defines statfs],
- wine_cv_sys_statfs_has_statfs,
- AC_TRY_COMPILE([
- #include <sys/types.h>
- #ifdef HAVE_SYS_PARAM_H
- # include <sys/param.h>
- #endif
- #include <sys/statfs.h>
- ],[
- struct statfs stfs;
- ],wine_cv_sys_statfs_has_statfs=yes,wine_cv_sys_statfs_has_statfs=no
- )
- )
- if test "$wine_cv_sys_statfs_has_statfs" = "yes"
- then
- AC_DEFINE(STATFS_DEFINED_BY_SYS_STATFS, 1,
- [Define if the struct statfs is defined by <sys/statfs.h>])
- fi
-fi
-
-if test "$ac_cv_header_sys_mount_h" = "yes"
-then
- AC_CACHE_CHECK( [whether sys/mount.h defines statfs],
- wine_cv_sys_mount_has_statfs,
- AC_TRY_COMPILE([
- #include <sys/types.h>
- #ifdef HAVE_SYS_PARAM_H
- # include <sys/param.h>
- #endif
- #include <sys/mount.h>
- ],[
- struct statfs stfs;
- ],wine_cv_sys_mount_has_statfs=yes,wine_cv_sys_mount_has_statfs=no
- )
- )
- if test "$wine_cv_sys_mount_has_statfs" = "yes"
- then
- AC_DEFINE(STATFS_DEFINED_BY_SYS_MOUNT, 1,
- [Define if the struct statfs is defined by <sys/mount.h>])
- fi
-fi
-
dnl **** FIXME: what about mixed cases, where we need two of them? ***
dnl Check for statfs members
@@ -1390,16 +1323,14 @@
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif
-#ifdef STATFS_DEFINED_BY_SYS_MOUNT
+#ifdef HAVE_SYS_MOUNT_H
# include <sys/mount.h>
-#else
-# ifdef STATFS_DEFINED_BY_SYS_VFS
-# include <sys/vfs.h>
-# else
-# ifdef STATFS_DEFINED_BY_SYS_STATFS
-# include <sys/statfs.h>
-# endif
-# endif
+#endif
+#ifdef HAVE_SYS_VFS_H
+# include <sys/vfs.h>
+#endif
+#ifdef HAVE_SYS_STATFS_H
+# include <sys/statfs.h>
#endif])
AC_CHECK_MEMBERS([struct statvfs.f_blocks],,,
Index: dlls/ntdll/file.c
===================================================================
RCS file: /home/wine/wine/dlls/ntdll/file.c,v
retrieving revision 1.118
diff -u -r1.118 file.c
--- dlls/ntdll/file.c 5 Feb 2006 12:58:21 -0000 1.118
+++ dlls/ntdll/file.c 6 Feb 2006 13:56:25 -0000
@@ -45,16 +45,14 @@
#ifdef HAVE_UTIME_H
# include <utime.h>
#endif
-#ifdef STATFS_DEFINED_BY_SYS_VFS
+#ifdef HAVE_SYS_VFS_H
# include <sys/vfs.h>
-#else
-# ifdef STATFS_DEFINED_BY_SYS_MOUNT
-# include <sys/mount.h>
-# else
-# ifdef STATFS_DEFINED_BY_SYS_STATFS
-# include <sys/statfs.h>
-# endif
-# endif
+#endif
+#ifdef HAVE_SYS_MOUNT_H
+# include <sys/mount.h>
+#endif
+#ifdef HAVE_SYS_STATFS_H
+# include <sys/statfs.h>
#endif
#ifdef HAVE_IOKIT_IOKITLIB_H
Index: libs/port/fstatvfs.c
===================================================================
RCS file: /home/wine/wine/libs/port/fstatvfs.c,v
retrieving revision 1.1
diff -u -r1.1 fstatvfs.c
--- libs/port/fstatvfs.c 6 Apr 2004 03:33:25 -0000 1.1
+++ libs/port/fstatvfs.c 6 Feb 2006 13:56:26 -0000
@@ -29,16 +29,14 @@
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif
-#ifdef STATFS_DEFINED_BY_SYS_VFS
+#ifdef HAVE_SYS_VFS_H
# include <sys/vfs.h>
-#else
-# ifdef STATFS_DEFINED_BY_SYS_MOUNT
-# include <sys/mount.h>
-# else
-# ifdef STATFS_DEFINED_BY_SYS_STATFS
-# include <sys/statfs.h>
-# endif
-# endif
+#endif
+#ifdef HAVE_SYS_MOUNT_H
+# include <sys/mount.h>
+#endif
+#ifdef HAVE_SYS_STATFS_H
+# include <sys/statfs.h>
#endif
int fstatvfs( int fd, struct statvfs *buf )
Index: libs/port/statvfs.c
===================================================================
RCS file: /home/wine/wine/libs/port/statvfs.c,v
retrieving revision 1.3
diff -u -r1.3 statvfs.c
--- libs/port/statvfs.c 10 Mar 2004 01:55:12 -0000 1.3
+++ libs/port/statvfs.c 6 Feb 2006 13:56:26 -0000
@@ -29,16 +29,14 @@
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif
-#ifdef STATFS_DEFINED_BY_SYS_VFS
+#ifdef HAVE_SYS_VFS_H
# include <sys/vfs.h>
-#else
-# ifdef STATFS_DEFINED_BY_SYS_MOUNT
-# include <sys/mount.h>
-# else
-# ifdef STATFS_DEFINED_BY_SYS_STATFS
-# include <sys/statfs.h>
-# endif
-# endif
+#endif
+#ifdef HAVE_SYS_MOUNT_H
+# include <sys/mount.h>
+#endif
+#ifdef HAVE_SYS_STATFS_H
+# include <sys/statfs.h>
#endif
int statvfs( const char *path, struct statvfs *buf )
Index: tools/winapi/winapi_check
===================================================================
RCS file: /home/wine/wine/tools/winapi/winapi_check,v
retrieving revision 1.10
diff -u -r1.10 winapi_check
--- tools/winapi/winapi_check 3 Dec 2005 18:34:13 -0000 1.10
+++ tools/winapi/winapi_check 6 Feb 2006 13:56:27 -0000
@@ -581,8 +581,7 @@
} elsif($macro =~ /^HAVE_(.*?)_H$/) {
my $name = $1;
if($header !~ /^alloca\.h$/ &&
- $file_dir !~ /tests$/ &&
- !$preprocessor->is_def("STATFS_DEFINED_BY_$name"))
+ $file_dir !~ /tests$/)
{
$output->write("$file: #$directive $argument: is a conditional include, " .
"but is not protected\n");
More information about the wine-patches
mailing list