]> granicus.if.org Git - php/commitdiff
Remove ugly netware hacks from the code
authorSascha Schumann <sas@php.net>
Fri, 24 Jan 2003 23:57:32 +0000 (23:57 +0000)
committerSascha Schumann <sas@php.net>
Fri, 24 Jan 2003 23:57:32 +0000 (23:57 +0000)
ext/session/mod_files.c
ext/session/session.c

index d760156dca10ea35e5dad9721cfe896ef7e19721..d70d425470f6cb2c0a3d6fe6576d8923dd1ee678 100644 (file)
@@ -174,11 +174,7 @@ static int ps_files_cleanup_dir(const char *dirname, int maxlifetime TSRMLS_DC)
        DIR *dir;
        char dentry[sizeof(struct dirent) + MAXPATHLEN];
        struct dirent *entry = (struct dirent *) &dentry;
-#if defined(NETWARE) && defined(CLIB_STAT_PATCH)
-       struct stat_libc sbuf;
-#else
        struct stat sbuf;
-#endif
        char buf[MAXPATHLEN];
        time_t now;
        int nrdels = 0;
@@ -212,11 +208,7 @@ static int ps_files_cleanup_dir(const char *dirname, int maxlifetime TSRMLS_DC)
                                buf[dirname_len + entry_len + 1] = '\0';
                                /* check whether its last access was more than maxlifet ago */
                                if (VCWD_STAT(buf, &sbuf) == 0 && 
-#if defined(NETWARE) && defined(CLIB_STAT_PATCH)
-                                               (now - (sbuf.st_mtime).tv_sec) > maxlifetime) {
-#else
                                                (now - sbuf.st_mtime) > maxlifetime) {
-#endif
                                        VCWD_UNLINK(buf);
                                        nrdels++;
                                }
@@ -273,11 +265,7 @@ PS_CLOSE_FUNC(files)
 PS_READ_FUNC(files)
 {
        long n;
-#if defined(NETWARE) && defined(CLIB_STAT_PATCH)
-       struct stat_libc sbuf;
-#else
        struct stat sbuf;
-#endif
        PS_FILES_DATA;
 
        ps_files_open(data, key TSRMLS_CC);
index c7c5c835f55618028af47f455ae4a4feff46de51..0b9dcf7eb4a218424b9409fe6d522328107abf01 100644 (file)
@@ -828,11 +828,7 @@ static void strcpy_gmt(char *ubuf, time_t *when)
 static void last_modified(TSRMLS_D)
 {
        const char *path;
-#if defined(NETWARE) && defined(CLIB_STAT_PATCH)
-       struct stat_libc sb;
-#else
        struct stat sb;
-#endif
        char buf[MAX_STR + 1];
        
        path = SG(request_info).path_translated;
@@ -843,11 +839,7 @@ static void last_modified(TSRMLS_D)
 
 #define LAST_MODIFIED "Last-Modified: "
                memcpy(buf, LAST_MODIFIED, sizeof(LAST_MODIFIED) - 1);
-#ifdef NETWARE
-               strcpy_gmt(buf + sizeof(LAST_MODIFIED) - 1, &((sb.st_mtime).tv_sec));
-#else
                strcpy_gmt(buf + sizeof(LAST_MODIFIED) - 1, &sb.st_mtime);
-#endif
                ADD_COOKIE(buf);
        }
 }