]> granicus.if.org Git - php/commitdiff
ext/standard/file.h NetWare LibC has fnmatch and realpath implemented.
authorAnantha Kesari H Y <hyanantha@php.net>
Fri, 15 Jul 2005 09:29:19 +0000 (09:29 +0000)
committerAnantha Kesari H Y <hyanantha@php.net>
Fri, 15 Jul 2005 09:29:19 +0000 (09:29 +0000)
ext/standard/filestat.c Removing redundant CLIB_STAT_PATCH and fixing some NetWare specific stat structure.
ext/standard/link.c Removing redundant CLIB_STAT_PATCH.
ext/standard/pageinfo.c Removing redundant CLIB_STAT_PATCH and fixing some NetWare specific stat structure.
ext/standard/syslog.c Except LOG_SYSLOG NetWare LibC has other macros defined.

-- Kamesh

ext/standard/file.h
ext/standard/filestat.c
ext/standard/link.c
ext/standard/pageinfo.c
ext/standard/syslog.c

index e5c23e6a241274199b206430c1e4e08f08948437..eadd18edb38f36347ac9dd9b01cff490da2303fb 100644 (file)
@@ -59,7 +59,7 @@ PHP_FUNCTION(get_meta_tags);
 PHP_FUNCTION(flock);
 PHP_FUNCTION(fd_set);
 PHP_FUNCTION(fd_isset);
-#if (!defined(__BEOS__) && !defined(NETWARE) && HAVE_REALPATH) || defined(ZTS)
+#if (!defined(__BEOS__) && HAVE_REALPATH) || defined(ZTS)
 PHP_FUNCTION(realpath);
 PHP_FUNCTION(fnmatch);
 #endif
index 70aab7402b29d06aa9863bd2e771114513ac3e3c..5e31f69a7da3111427cf40359a8cb05a5463f730 100644 (file)
@@ -464,11 +464,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;
@@ -550,11 +546,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",
@@ -644,19 +636,19 @@ PHPAPI void php_stat(const char *filename, php_stat_len filename_length, int typ
                RETURN_LONG((long)ssb.sb.st_gid);
        case FS_ATIME:
 #ifdef NETWARE
-               RETURN_LONG((long)((stat_sb->st_atime).tv_sec));
+               RETURN_LONG((long)ssb.sb.st_atime.tv_sec);
 #else
                RETURN_LONG((long)ssb.sb.st_atime);
 #endif
        case FS_MTIME:
 #ifdef NETWARE
-               RETURN_LONG((long)((stat_sb->st_mtime).tv_sec));
+               RETURN_LONG((long)ssb.sb.st_mtime.tv_sec);
 #else
                RETURN_LONG((long)ssb.sb.st_mtime);
 #endif
        case FS_CTIME:
 #ifdef NETWARE
-               RETURN_LONG((long)((stat_sb->st_ctime).tv_sec));
+               RETURN_LONG((long)ssb.sb.st_ctime.tv_sec);
 #else
                RETURN_LONG((long)ssb.sb.st_ctime);
 #endif
index 5000a808b5be0d39f0493ab1c8feb269d83422ee..87b5531ea901ec86e4debd9d207d62cf7d1843b9 100644 (file)
@@ -89,11 +89,7 @@ PHP_FUNCTION(readlink)
 PHP_FUNCTION(linkinfo)
 {
        zval **filename;
-#if defined(NETWARE) && defined(CLIB_STAT_PATCH)
-       struct stat_libc sb;
-#else
        struct stat sb;
-#endif
        int ret;
 
        if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &filename) == FAILURE) {
index cfa0e94de862d649917638a89f4beccbf8b64640..d8783ffe99063b3d62d19b2b213d5da402472569 100644 (file)
  */
 PHPAPI void php_statpage(TSRMLS_D)
 {
-#if defined(NETWARE) && defined(CLIB_STAT_PATCH)
-       struct stat_libc *pstat;
-#else
        struct stat *pstat;
-#endif
 
        pstat = sapi_get_stat(TSRMLS_C);
 
@@ -73,7 +69,7 @@ PHPAPI void php_statpage(TSRMLS_D)
                        BG(page_gid)   = pstat->st_gid;
                        BG(page_inode) = pstat->st_ino;
 #ifdef NETWARE
-                       BG(page_mtime) = (pstat->st_mtime).tv_nsec;
+                       BG(page_mtime) = (pstat->st_mtime).tv_sec;
 #else
                        BG(page_mtime) = pstat->st_mtime;
 #endif
index 9710ea4d60228526e276e9d90097bad3dbe5d489..9af2efee2c01d9f05ae13253e348e7bc843d2ae8 100644 (file)
@@ -75,7 +75,7 @@ PHP_MINIT_FUNCTION(syslog)
        /* AIX doesn't have LOG_AUTHPRIV */
        REGISTER_LONG_CONSTANT("LOG_AUTHPRIV", LOG_AUTHPRIV, CONST_CS | CONST_PERSISTENT);
 #endif
-#if !defined(PHP_WIN32) && !defined(NETWARE)
+#ifndef PHP_WIN32
        REGISTER_LONG_CONSTANT("LOG_LOCAL0", LOG_LOCAL0, CONST_CS | CONST_PERSISTENT);
        REGISTER_LONG_CONSTANT("LOG_LOCAL1", LOG_LOCAL1, CONST_CS | CONST_PERSISTENT);
        REGISTER_LONG_CONSTANT("LOG_LOCAL2", LOG_LOCAL2, CONST_CS | CONST_PERSISTENT);
@@ -144,7 +144,9 @@ static void start_syslog(TSRMLS_D)
        SET_VAR_LONG("LOG_MAIL", LOG_MAIL); /* log to email */
        SET_VAR_LONG("LOG_DAEMON", LOG_DAEMON); /* other system daemons */
        SET_VAR_LONG("LOG_AUTH", LOG_AUTH);
+#ifndef NETWARE
        SET_VAR_LONG("LOG_SYSLOG", LOG_SYSLOG);
+#endif
        SET_VAR_LONG("LOG_LPR", LOG_LPR);
 #ifdef LOG_NEWS
        /* No LOG_NEWS on HP-UX */