hyanantha Wed Sep 29 05:47:16 2004 EDT Modified files: /php-src/ext/standard filestat.c Log: removed redundant NEW_LIBC and CLIB_STAT_PATCH checks for NETWARE http://cvs.php.net/diff.php/php-src/ext/standard/filestat.c?r1=1.131&r2=1.132&ty=u Index: php-src/ext/standard/filestat.c diff -u php-src/ext/standard/filestat.c:1.131 php-src/ext/standard/filestat.c:1.132 --- php-src/ext/standard/filestat.c:1.131 Thu Sep 2 05:39:55 2004 +++ php-src/ext/standard/filestat.c Wed Sep 29 05:47:15 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: filestat.c,v 1.131 2004/09/02 09:39:55 stas Exp $ */ +/* $Id: filestat.c,v 1.132 2004/09/29 09:47:15 hyanantha Exp $ */ #include "php.h" #include "safe_mode.h" @@ -462,11 +462,7 @@ { pval **filename, **filetime, **fileatime; int ret; -#if defined(NETWARE) && defined(CLIB_STAT_PATCH) - struct stat_libc sb; -#else struct stat sb; -#endif FILE *file; struct utimbuf newtimebuf; struct utimbuf *newtime = NULL; @@ -548,11 +544,7 @@ { zval *stat_dev, *stat_ino, *stat_mode, *stat_nlink, *stat_uid, *stat_gid, *stat_rdev, *stat_size, *stat_atime, *stat_mtime, *stat_ctime, *stat_blksize, *stat_blocks; -#if defined(NETWARE) && defined(CLIB_STAT_PATCH) - struct stat_libc *stat_sb; -#else struct stat *stat_sb; -#endif php_stream_statbuf ssb; int flags = 0, rmask=S_IROTH, wmask=S_IWOTH, xmask=S_IXOTH; /* access rights defaults to other */ char *stat_sb_names[13]={"dev", "ino", "mode", "nlink", "uid", "gid", "rdev", @@ -635,30 +627,26 @@ case FS_INODE: RETURN_LONG((long)ssb.sb.st_ino); case FS_SIZE: -#if defined(NETWARE) && defined(NEW_LIBC) - RETURN_LONG((long)(stat_sb->st_size)); -#else RETURN_LONG((long)ssb.sb.st_size); -#endif case FS_OWNER: RETURN_LONG((long)ssb.sb.st_uid); case FS_GROUP: RETURN_LONG((long)ssb.sb.st_gid); case FS_ATIME: -#if defined(NETWARE) && defined(NEW_LIBC) - RETURN_LONG((long)((stat_sb->st_atime).tv_sec)); +#ifdef NETWARE + RETURN_LONG((long)ssb.sb.st_atime.tv_sec); #else RETURN_LONG((long)ssb.sb.st_atime); #endif case FS_MTIME: -#if defined(NETWARE) && defined(NEW_LIBC) - RETURN_LONG((long)((stat_sb->st_mtime).tv_sec)); +#ifdef NETWARE + RETURN_LONG((long)ssb.sb.st_mtime.tv_sec); #else RETURN_LONG((long)ssb.sb.st_mtime); #endif case FS_CTIME: -#if defined(NETWARE) && defined(NEW_LIBC) - RETURN_LONG((long)((stat_sb->st_ctime).tv_sec)); +#ifdef NETWARE + RETURN_LONG((long)ssb.sb.st_ctime.tv_sec); #else RETURN_LONG((long)ssb.sb.st_ctime); #endif @@ -709,7 +697,7 @@ MAKE_LONG_ZVAL_INCREF(stat_rdev, -1); #endif MAKE_LONG_ZVAL_INCREF(stat_size, stat_sb->st_size); -#if defined(NETWARE) && defined(NEW_LIBC) +#ifdef NETWARE MAKE_LONG_ZVAL_INCREF(stat_atime, (stat_sb->st_atime).tv_sec); MAKE_LONG_ZVAL_INCREF(stat_mtime, (stat_sb->st_mtime).tv_sec); MAKE_LONG_ZVAL_INCREF(stat_ctime, (stat_sb->st_ctime).tv_sec);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php