cvs: php4(PHP_4_0_6) / configure.in /ext/standard filestat.c

From: Date: Tue, 22 May 2001 03:00:27 +0000
Subject: cvs: php4(PHP_4_0_6) / configure.in /ext/standard filestat.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-5923@lists.php.net to get a copy of this message
jon Mon May 21 20:00:27 2001 EDT Modified files: (Branch: PHP_4_0_6) /php4 configure.in /php4/ext/standard filestat.c Log: FreeBSD defines statfs(2) in <sys/mount.h>. Teach PHP to look for it there. Index: php4/configure.in diff -u php4/configure.in:1.244.2.2 php4/configure.in:1.244.2.3 --- php4/configure.in:1.244.2.2 Sat May 19 15:23:13 2001 +++ php4/configure.in Mon May 21 20:00:26 2001 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.244.2.2 2001/05/19 22:23:13 sniper Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.244.2.3 2001/05/22 03:00:26 jon Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -303,6 +303,7 @@ sysexits.h \ sys/file.h \ sys/mman.h \ +sys/mount.h \ sys/resource.h \ sys/select.h \ sys/socket.h \ Index: php4/ext/standard/filestat.c diff -u php4/ext/standard/filestat.c:1.63 php4/ext/standard/filestat.c:1.63.2.1 --- php4/ext/standard/filestat.c:1.63 Thu May 10 18:47:46 2001 +++ php4/ext/standard/filestat.c Mon May 21 20:00:26 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: filestat.c,v 1.63 2001/05/11 01:47:46 jason Exp $ */ +/* $Id: filestat.c,v 1.63.2.1 2001/05/22 03:00:26 jon Exp $ */ #include "php.h" #include "safe_mode.h" @@ -43,6 +43,8 @@ # include <sys/statvfs.h> #elif defined(HAVE_SYS_STATFS_H) && defined(HAVE_STATFS) # include <sys/statfs.h> +#elif defined(HAVE_SYS_MOUNT_H) && defined(HAVE_STATFS) +# include <sys/mount.h> #endif #if HAVE_PWD_H @@ -151,7 +153,7 @@ #else /* not - WINDOWS */ #if defined(HAVE_SYS_STATVFS_H) && defined(HAVE_STATVFS) struct statvfs buf; -#elif defined(HAVE_SYS_STATFS_H) && defined(HAVE_STATFS) +#elif (defined(HAVE_SYS_STATFS_H) || defined(HAVE_SYS_MOUNT_H)) && defined(HAVE_STATFS) struct statfs buf; #endif double bytesfree = 0; @@ -214,7 +216,7 @@ } else { bytesfree = (((double)buf.f_bavail) * ((double)buf.f_bsize)); } -#elif defined(HAVE_SYS_STATFS_H) && defined(HAVE_STATFS) +#elif (defined(HAVE_SYS_STATFS_H) || defined(HAVE_SYS_MOUNT_H)) && defined(HAVE_STATFS) if (statfs((*path)->value.str.val,&buf)) RETURN_FALSE; bytesfree = (((double)buf.f_bsize) * ((double)buf.f_bavail)); #endif

« previous php.cvs (#5923) next »