guenter                                  Tue, 03 Nov 2009 21:21:34 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=290190

Log:
removed now obsolete NetWare hack since I fixed this
with Novell some longer time ago in their SDK header.

Changed paths:
    U   php/php-src/branches/PHP_5_3/ext/exif/exif.c
    U   php/php-src/branches/PHP_5_3/ext/session/mod_files.c
    U   php/php-src/branches/PHP_5_3/ext/session/session.c
    U   php/php-src/branches/PHP_5_3/ext/standard/file.c
    U   php/php-src/branches/PHP_5_3/ext/standard/filestat.c
    U   php/php-src/branches/PHP_5_3/ext/standard/ftp_fopen_wrapper.c
    U   php/php-src/branches/PHP_5_3/ext/standard/pageinfo.c
    U   php/php-src/trunk/ext/exif/exif.c
    U   php/php-src/trunk/ext/session/mod_files.c
    U   php/php-src/trunk/ext/session/session.c
    U   php/php-src/trunk/ext/standard/file.c
    U   php/php-src/trunk/ext/standard/filestat.c
    U   php/php-src/trunk/ext/standard/ftp_fopen_wrapper.c
    U   php/php-src/trunk/ext/standard/pageinfo.c

Modified: php/php-src/branches/PHP_5_3/ext/exif/exif.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/exif/exif.c	2009-11-03 20:06:56 UTC (rev 290189)
+++ php/php-src/branches/PHP_5_3/ext/exif/exif.c	2009-11-03 21:21:34 UTC (rev 290190)
@@ -3876,11 +3876,7 @@
 			}

 			/* Store file date/time. */
-#ifdef NETWARE
-			ImageInfo->FileDateTime = st.st_mtime.tv_sec;
-#else
 			ImageInfo->FileDateTime = st.st_mtime;
-#endif
 			ImageInfo->FileSize = st.st_size;
 			/*exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_NOTICE, "Opened stream is file: %d", ImageInfo->FileSize);*/
 		}

Modified: php/php-src/branches/PHP_5_3/ext/session/mod_files.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/session/mod_files.c	2009-11-03 20:06:56 UTC (rev 290189)
+++ php/php-src/branches/PHP_5_3/ext/session/mod_files.c	2009-11-03 21:21:34 UTC (rev 290190)
@@ -244,11 +244,7 @@

 				/* check whether its last access was more than maxlifet ago */
 				if (VCWD_STAT(buf, &sbuf) == 0 &&
-#ifdef NETWARE
-						(now - sbuf.st_mtime.tv_sec) > maxlifetime) {
-#else
 						(now - sbuf.st_mtime) > maxlifetime) {
-#endif
 					VCWD_UNLINK(buf);
 					nrdels++;
 				}

Modified: php/php-src/branches/PHP_5_3/ext/session/session.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/session/session.c	2009-11-03 20:06:56 UTC (rev 290189)
+++ php/php-src/branches/PHP_5_3/ext/session/session.c	2009-11-03 21:21:34 UTC (rev 290190)
@@ -61,12 +61,6 @@
    * Helpers *
    *********** */

-#ifdef NETWARE
-# define SESS_SB_MTIME(sb)	((sb).st_mtime.tv_sec)
-#else
-# define SESS_SB_MTIME(sb)	((sb).st_mtime)
-#endif
-
 #define IF_SESSION_VARS() \
 	if (PS(http_session_vars) && PS(http_session_vars)->type == IS_ARRAY)

@@ -1095,7 +1089,7 @@

 #define LAST_MODIFIED "Last-Modified: "
 		memcpy(buf, LAST_MODIFIED, sizeof(LAST_MODIFIED) - 1);
-		strcpy_gmt(buf + sizeof(LAST_MODIFIED) - 1, &SESS_SB_MTIME(sb));
+		strcpy_gmt(buf + sizeof(LAST_MODIFIED) - 1, &sb.st_mtime);
 		ADD_HEADER(buf);
 	}
 }

Modified: php/php-src/branches/PHP_5_3/ext/standard/file.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/file.c	2009-11-03 20:06:56 UTC (rev 290189)
+++ php/php-src/branches/PHP_5_3/ext/standard/file.c	2009-11-03 21:21:34 UTC (rev 290190)
@@ -50,16 +50,6 @@
 # include "win32/param.h"
 # include "win32/winutil.h"
 # include "win32/fnmatch.h"
-#elif defined(NETWARE)
-# include <sys/param.h>
-# include <sys/select.h>
-# ifdef USE_WINSOCK
-#  include <novsock2.h>
-# else
-#  include <sys/socket.h>
-#  include <netinet/in.h>
-#  include <netdb.h>
-# endif
 #else
 # if HAVE_SYS_PARAM_H
 #  include <sys/param.h>
@@ -1636,16 +1626,9 @@
 	MAKE_LONG_ZVAL_INCREF(stat_rdev, -1);
 #endif
 	MAKE_LONG_ZVAL_INCREF(stat_size, stat_ssb.sb.st_size);
-#ifdef NETWARE
-	MAKE_LONG_ZVAL_INCREF(stat_atime, stat_ssb.sb.st_atime.tv_sec);
-	MAKE_LONG_ZVAL_INCREF(stat_mtime, stat_ssb.sb.st_mtime.tv_sec);
-	MAKE_LONG_ZVAL_INCREF(stat_ctime, stat_ssb.sb.st_ctime.tv_sec);
-#else
 	MAKE_LONG_ZVAL_INCREF(stat_atime, stat_ssb.sb.st_atime);
 	MAKE_LONG_ZVAL_INCREF(stat_mtime, stat_ssb.sb.st_mtime);
 	MAKE_LONG_ZVAL_INCREF(stat_ctime, stat_ssb.sb.st_ctime);
-#endif
-
 #ifdef HAVE_ST_BLKSIZE
 	MAKE_LONG_ZVAL_INCREF(stat_blksize, stat_ssb.sb.st_blksize);
 #else

Modified: php/php-src/branches/PHP_5_3/ext/standard/filestat.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/filestat.c	2009-11-03 20:06:56 UTC (rev 290189)
+++ php/php-src/branches/PHP_5_3/ext/standard/filestat.c	2009-11-03 21:21:34 UTC (rev 290190)
@@ -386,7 +386,7 @@
 }
 /* }}} */

-#if !defined(WINDOWS)
+#if !defined(WINDOWS) && !defined(NETWARE)
 static void php_do_chgrp(INTERNAL_FUNCTION_PARAMETERS, int do_lchgrp) /* {{{ */
 {
 	char *filename;
@@ -487,7 +487,7 @@
 /* }}} */
 #endif /* !NETWARE */

-#if !defined(WINDOWS)
+#if !defined(WINDOWS) && !defined(NETWARE)
 static void php_do_chown(INTERNAL_FUNCTION_PARAMETERS, int do_lchown) /* {{{ */
 {
 	char *filename;
@@ -899,23 +899,11 @@
 	case FS_GROUP:
 		RETURN_LONG((long)ssb.sb.st_gid);
 	case FS_ATIME:
-#ifdef NETWARE
-		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)ssb.sb.st_mtime.tv_sec);
-#else
 		RETURN_LONG((long)ssb.sb.st_mtime);
-#endif
 	case FS_CTIME:
-#ifdef NETWARE
-		RETURN_LONG((long)ssb.sb.st_ctime.tv_sec);
-#else
 		RETURN_LONG((long)ssb.sb.st_ctime);
-#endif
 	case FS_TYPE:
 		if (S_ISLNK(ssb.sb.st_mode)) {
 			RETURN_STRING("link", 1);
@@ -963,15 +951,9 @@
 		MAKE_LONG_ZVAL_INCREF(stat_rdev, -1);
 #endif
 		MAKE_LONG_ZVAL_INCREF(stat_size, stat_sb->st_size);
-#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);
-#else
 		MAKE_LONG_ZVAL_INCREF(stat_atime, stat_sb->st_atime);
 		MAKE_LONG_ZVAL_INCREF(stat_mtime, stat_sb->st_mtime);
 		MAKE_LONG_ZVAL_INCREF(stat_ctime, stat_sb->st_ctime);
-#endif
 #ifdef HAVE_ST_BLKSIZE
 		MAKE_LONG_ZVAL_INCREF(stat_blksize, stat_sb->st_blksize);
 #else

Modified: php/php-src/branches/PHP_5_3/ext/standard/ftp_fopen_wrapper.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/ftp_fopen_wrapper.c	2009-11-03 20:06:56 UTC (rev 290189)
+++ php/php-src/branches/PHP_5_3/ext/standard/ftp_fopen_wrapper.c	2009-11-03 21:21:34 UTC (rev 290190)
@@ -834,32 +834,19 @@
 		tm.tm_sec += stamp - mktime(gmt);
 		tm.tm_isdst = gmt->tm_isdst;

-#ifdef NETWARE
-		ssb->sb.st_mtime.tv_sec = mktime(&tm);
-#else
 		ssb->sb.st_mtime = mktime(&tm);
-#endif
 	} else {
 		/* error or unsupported command */
 mdtm_error:
-#ifdef NETWARE
-		ssb->sb.st_mtime.tv_sec = -1;
-#else
 		ssb->sb.st_mtime = -1;
-#endif
 	}

 	ssb->sb.st_ino = 0;						/* Unknown values */
 	ssb->sb.st_dev = 0;
 	ssb->sb.st_uid = 0;
 	ssb->sb.st_gid = 0;
-#ifdef NETWARE
-	ssb->sb.st_atime.tv_sec = -1;
-	ssb->sb.st_ctime.tv_sec = -1;
-#else
 	ssb->sb.st_atime = -1;
 	ssb->sb.st_ctime = -1;
-#endif

 	ssb->sb.st_nlink = 1;
 	ssb->sb.st_rdev = -1;

Modified: php/php-src/branches/PHP_5_3/ext/standard/pageinfo.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/pageinfo.c	2009-11-03 20:06:56 UTC (rev 290189)
+++ php/php-src/branches/PHP_5_3/ext/standard/pageinfo.c	2009-11-03 21:21:34 UTC (rev 290190)
@@ -68,11 +68,7 @@
 			BG(page_uid)   = pstat->st_uid;
 			BG(page_gid)   = pstat->st_gid;
 			BG(page_inode) = pstat->st_ino;
-#ifdef NETWARE
-			BG(page_mtime) = (pstat->st_mtime).tv_sec;
-#else
 			BG(page_mtime) = pstat->st_mtime;
-#endif
 		} else { /* handler for situations where there is no source file, ex. php -r */
 			BG(page_uid) = getuid();
 			BG(page_gid) = getgid();

Modified: php/php-src/trunk/ext/exif/exif.c
===================================================================
--- php/php-src/trunk/ext/exif/exif.c	2009-11-03 20:06:56 UTC (rev 290189)
+++ php/php-src/trunk/ext/exif/exif.c	2009-11-03 21:21:34 UTC (rev 290190)
@@ -3854,11 +3854,7 @@
 			}

 			/* Store file date/time. */
-#ifdef NETWARE
-			ImageInfo->FileDateTime = st.st_mtime.tv_sec;
-#else
 			ImageInfo->FileDateTime = st.st_mtime;
-#endif
 			ImageInfo->FileSize = st.st_size;
 			/*exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_NOTICE, "Opened stream is file: %d", ImageInfo->FileSize);*/
 		}

Modified: php/php-src/trunk/ext/session/mod_files.c
===================================================================
--- php/php-src/trunk/ext/session/mod_files.c	2009-11-03 20:06:56 UTC (rev 290189)
+++ php/php-src/trunk/ext/session/mod_files.c	2009-11-03 21:21:34 UTC (rev 290190)
@@ -263,11 +263,7 @@

 				/* check whether its last access was more than maxlifet ago */
 				if (VCWD_STAT(buf, &sbuf) == 0 &&
-#ifdef NETWARE
-						(now - sbuf.st_mtime.tv_sec) > maxlifetime) {
-#else
 						(now - sbuf.st_mtime) > maxlifetime) {
-#endif
 					VCWD_UNLINK(buf);
 					nrdels++;
 				}

Modified: php/php-src/trunk/ext/session/session.c
===================================================================
--- php/php-src/trunk/ext/session/session.c	2009-11-03 20:06:56 UTC (rev 290189)
+++ php/php-src/trunk/ext/session/session.c	2009-11-03 21:21:34 UTC (rev 290190)
@@ -66,12 +66,6 @@
    * Helpers *
    *********** */

-#ifdef NETWARE
-# define SESS_SB_MTIME(sb)	((sb).st_mtime.tv_sec)
-#else
-# define SESS_SB_MTIME(sb)	((sb).st_mtime)
-#endif
-
 #define IF_SESSION_VARS() \
 	if (PS(http_session_vars) && PS(http_session_vars)->type == IS_ARRAY)

@@ -1016,7 +1010,7 @@

 #define LAST_MODIFIED "Last-Modified: "
 		memcpy(buf, LAST_MODIFIED, sizeof(LAST_MODIFIED) - 1);
-		strcpy_gmt(buf + sizeof(LAST_MODIFIED) - 1, &SESS_SB_MTIME(sb));
+		strcpy_gmt(buf + sizeof(LAST_MODIFIED) - 1, &sb.st_mtime);
 		ADD_HEADER(buf);
 	}
 }

Modified: php/php-src/trunk/ext/standard/file.c
===================================================================
--- php/php-src/trunk/ext/standard/file.c	2009-11-03 20:06:56 UTC (rev 290189)
+++ php/php-src/trunk/ext/standard/file.c	2009-11-03 21:21:34 UTC (rev 290190)
@@ -50,16 +50,6 @@
 # include "win32/param.h"
 # include "win32/winutil.h"
 # include "win32/fnmatch.h"
-#elif defined(NETWARE)
-# include <sys/param.h>
-# include <sys/select.h>
-# ifdef USE_WINSOCK
-#  include <novsock2.h>
-# else
-#  include <sys/socket.h>
-#  include <netinet/in.h>
-#  include <netdb.h>
-# endif
 #else
 # if HAVE_SYS_PARAM_H
 #  include <sys/param.h>
@@ -1811,16 +1801,9 @@
 	MAKE_LONG_ZVAL_INCREF(stat_rdev, -1);
 #endif
 	MAKE_LONG_ZVAL_INCREF(stat_size, stat_ssb.sb.st_size);
-#ifdef NETWARE
-	MAKE_LONG_ZVAL_INCREF(stat_atime, stat_ssb.sb.st_atime.tv_sec);
-	MAKE_LONG_ZVAL_INCREF(stat_mtime, stat_ssb.sb.st_mtime.tv_sec);
-	MAKE_LONG_ZVAL_INCREF(stat_ctime, stat_ssb.sb.st_ctime.tv_sec);
-#else
 	MAKE_LONG_ZVAL_INCREF(stat_atime, stat_ssb.sb.st_atime);
 	MAKE_LONG_ZVAL_INCREF(stat_mtime, stat_ssb.sb.st_mtime);
 	MAKE_LONG_ZVAL_INCREF(stat_ctime, stat_ssb.sb.st_ctime);
-#endif
-
 #ifdef HAVE_ST_BLKSIZE
 	MAKE_LONG_ZVAL_INCREF(stat_blksize, stat_ssb.sb.st_blksize);
 #else

Modified: php/php-src/trunk/ext/standard/filestat.c
===================================================================
--- php/php-src/trunk/ext/standard/filestat.c	2009-11-03 20:06:56 UTC (rev 290189)
+++ php/php-src/trunk/ext/standard/filestat.c	2009-11-03 21:21:34 UTC (rev 290190)
@@ -417,7 +417,7 @@
 }
 /* }}} */

-#if !defined(WINDOWS)
+#if !defined(WINDOWS) && !defined(NETWARE)
 static void php_do_chgrp(INTERNAL_FUNCTION_PARAMETERS, int do_lchgrp) /* {{{ */
 {
 	char *filename;
@@ -538,7 +538,7 @@
 /* }}} */
 #endif /* !NETWARE */

-#if !defined(WINDOWS)
+#if !defined(WINDOWS) && !defined(NETWARE)
 static void php_do_chown(INTERNAL_FUNCTION_PARAMETERS, int do_lchown) /* {{{ */
 {
 	char *filename;
@@ -985,23 +985,11 @@
 	case FS_GROUP:
 		RETURN_LONG((long)ssb.sb.st_gid);
 	case FS_ATIME:
-#ifdef NETWARE
-		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)ssb.sb.st_mtime.tv_sec);
-#else
 		RETURN_LONG((long)ssb.sb.st_mtime);
-#endif
 	case FS_CTIME:
-#ifdef NETWARE
-		RETURN_LONG((long)ssb.sb.st_ctime.tv_sec);
-#else
 		RETURN_LONG((long)ssb.sb.st_ctime);
-#endif
 	case FS_TYPE:
 		if (S_ISLNK(ssb.sb.st_mode)) {
 			RETURN_ASCII_STRING("link", 1);
@@ -1049,15 +1037,9 @@
 		MAKE_LONG_ZVAL_INCREF(stat_rdev, -1);
 #endif
 		MAKE_LONG_ZVAL_INCREF(stat_size, stat_sb->st_size);
-#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);
-#else
 		MAKE_LONG_ZVAL_INCREF(stat_atime, stat_sb->st_atime);
 		MAKE_LONG_ZVAL_INCREF(stat_mtime, stat_sb->st_mtime);
 		MAKE_LONG_ZVAL_INCREF(stat_ctime, stat_sb->st_ctime);
-#endif
 #ifdef HAVE_ST_BLKSIZE
 		MAKE_LONG_ZVAL_INCREF(stat_blksize, stat_sb->st_blksize);
 #else

Modified: php/php-src/trunk/ext/standard/ftp_fopen_wrapper.c
===================================================================
--- php/php-src/trunk/ext/standard/ftp_fopen_wrapper.c	2009-11-03 20:06:56 UTC (rev 290189)
+++ php/php-src/trunk/ext/standard/ftp_fopen_wrapper.c	2009-11-03 21:21:34 UTC (rev 290190)
@@ -835,32 +835,19 @@
 		tm.tm_sec += stamp - mktime(gmt);
 		tm.tm_isdst = gmt->tm_isdst;

-#ifdef NETWARE
-		ssb->sb.st_mtime.tv_sec = mktime(&tm);
-#else
 		ssb->sb.st_mtime = mktime(&tm);
-#endif
 	} else {
 		/* error or unsupported command */
 mdtm_error:
-#ifdef NETWARE
-		ssb->sb.st_mtime.tv_sec = -1;
-#else
 		ssb->sb.st_mtime = -1;
-#endif
 	}

 	ssb->sb.st_ino = 0;						/* Unknown values */
 	ssb->sb.st_dev = 0;
 	ssb->sb.st_uid = 0;
 	ssb->sb.st_gid = 0;
-#ifdef NETWARE
-	ssb->sb.st_atime.tv_sec = -1;
-	ssb->sb.st_ctime.tv_sec = -1;
-#else
 	ssb->sb.st_atime = -1;
 	ssb->sb.st_ctime = -1;
-#endif

 	ssb->sb.st_nlink = 1;
 	ssb->sb.st_rdev = -1;

Modified: php/php-src/trunk/ext/standard/pageinfo.c
===================================================================
--- php/php-src/trunk/ext/standard/pageinfo.c	2009-11-03 20:06:56 UTC (rev 290189)
+++ php/php-src/trunk/ext/standard/pageinfo.c	2009-11-03 21:21:34 UTC (rev 290190)
@@ -68,11 +68,7 @@
 			BG(page_uid)   = pstat->st_uid;
 			BG(page_gid)   = pstat->st_gid;
 			BG(page_inode) = pstat->st_ino;
-#ifdef NETWARE
-			BG(page_mtime) = (pstat->st_mtime).tv_sec;
-#else
 			BG(page_mtime) = pstat->st_mtime;
-#endif
 		} else { /* handler for situations where there is no source file, ex. php -r */
 			BG(page_uid) = getuid();
 			BG(page_gid) = getgid();
-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to