]> granicus.if.org Git - php/commitdiff
removed redundant NEW_LIBC and CLIB_STAT_PATCH checks for NETWARE
authorAnantha Kesari H Y <hyanantha@php.net>
Wed, 29 Sep 2004 09:47:15 +0000 (09:47 +0000)
committerAnantha Kesari H Y <hyanantha@php.net>
Wed, 29 Sep 2004 09:47:15 +0000 (09:47 +0000)
ext/standard/filestat.c

index 3e9f8b735edb3917d29617417555a57e370e320a..c77e3dc68db2c3d220fdfa10dec02aae53a6b7a9 100644 (file)
@@ -462,11 +462,7 @@ PHP_FUNCTION(touch)
 {
        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 @@ PHPAPI void php_stat(const char *filename, php_stat_len filename_length, int typ
 {
        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 @@ PHPAPI void php_stat(const char *filename, php_stat_len filename_length, int typ
        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 @@ PHPAPI void php_stat(const char *filename, php_stat_len filename_length, int typ
                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);