hyanantha Tue Jul 26 05:33:00 2005 EDT
Modified files: (Branch: PHP_4_4)
/php-src/ext/standard basic_functions.c file.c filestat.c fsock.c
mail.c pack.c pageinfo.c rand.c
ftp_fopen_wrapper.c http_fopen_wrapper.c
Log:
ext/standard/basic_functions.c
Removed Redundant inclusion headers for NetWare. NetWare LibC SDK has netdb.h.
ext/standard/file.c
NetWare LibC sys/types.h does not include sys/select.h implicitly as it is
the case with Linux LibC. So including explicitly.
NetWare LibC SDK has pwd.h
NetWare specific stat structure issues.
ext/standard/filestat.c
NetWare LibC SDK has pwd.h
removing redundant CLIB_STAT_PATCH and NEW_LIBC checks
ext/standard/fsock.c
Removed the redundant NEW_LIBC checks
ext/standard/mail.c
netware/pipe.h not needed to be included anymore for NetWare
Removed the netware/sysexits.h and defined the 2 relevant macros inside the
NetWare section
ext/standard/pack.c
NetWare LibC SDK has pwd.h
ext/standard/pageinfo.c
NetWare LibC SDK has pwd.h.
Removing redunant NEW_LIBC checks.
ext/standard/rand.c
NetWare LibC SDK has pwd.h.
ext/standard/ftp_fopen_wrapper.c
Removing redundant inclusion of headers. NetWare LibC SDK has sys/param.h
ext/standard/http_fopen_wrapper.c
Removing redundant inclusion of headers. NetWare LibC SDK has sys/param.h
--Kamesh
http://cvs.php.net/diff.php/php-src/ext/standard/basic_functions.c?r1=1.543.2.51&r2=1.543.2.51.2.1&ty=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.543.2.51
php-src/ext/standard/basic_functions.c:1.543.2.51.2.1
--- php-src/ext/standard/basic_functions.c:1.543.2.51 Mon May 16 04:55:31 2005
+++ php-src/ext/standard/basic_functions.c Tue Jul 26 05:32:57 2005
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: basic_functions.c,v 1.543.2.51 2005/05/16 08:55:31 tony2001 Exp $ */
+/* $Id: basic_functions.c,v 1.543.2.51.2.1 2005/07/26 09:32:57 hyanantha Exp $
*/
#include "php.h"
#include "php_streams.h"
@@ -42,18 +42,7 @@
#include <time.h>
#include <stdio.h>
-#ifndef NETWARE
#include <netdb.h>
-#else
-/*#include "netware/env.h"*/ /* Temporary */
-#ifdef NEW_LIBC /* Same headers hold good for Winsock and Berkeley sockets */
-#include <netinet/in.h>
-/*#include <arpa/inet.h>*/
-#include <netdb.h>
-#else
-#include <sys/socket.h>
-#endif
-#endif
#if HAVE_ARPA_INET_H
# include <arpa/inet.h>
http://cvs.php.net/diff.php/php-src/ext/standard/file.c?r1=1.279.2.70.2.1&r2=1.279.2.70.2.2&ty=u
Index: php-src/ext/standard/file.c
diff -u php-src/ext/standard/file.c:1.279.2.70.2.1
php-src/ext/standard/file.c:1.279.2.70.2.2
--- php-src/ext/standard/file.c:1.279.2.70.2.1 Wed Jul 20 15:26:31 2005
+++ php-src/ext/standard/file.c Tue Jul 26 05:32:57 2005
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: file.c,v 1.279.2.70.2.1 2005/07/20 19:26:31 iliaa Exp $ */
+/* $Id: file.c,v 1.279.2.70.2.2 2005/07/26 09:32:57 hyanantha Exp $ */
/* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
@@ -49,12 +49,11 @@
#define O_RDONLY _O_RDONLY
#include "win32/param.h"
#include "win32/winutil.h"
-#elif defined(NETWARE) && !defined(NEW_LIBC)
-/*#include <ws2nlm.h>*/
-#include <sys/socket.h>
-#include "netware/param.h"
#else
#include <sys/param.h>
+#if HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
#if defined(NETWARE) && defined(USE_WINSOCK)
#include <novsock2.h>
#else
@@ -73,8 +72,6 @@
#if HAVE_PWD_H
#ifdef PHP_WIN32
#include "win32/pwd.h"
-#elif defined(NETWARE)
-#include "netware/pwd.h"
#else
#include <pwd.h>
#endif
@@ -2061,9 +2058,15 @@
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
http://cvs.php.net/diff.php/php-src/ext/standard/filestat.c?r1=1.112.2.11&r2=1.112.2.11.2.1&ty=u
Index: php-src/ext/standard/filestat.c
diff -u php-src/ext/standard/filestat.c:1.112.2.11
php-src/ext/standard/filestat.c:1.112.2.11.2.1
--- php-src/ext/standard/filestat.c:1.112.2.11 Thu Sep 2 05:38:56 2004
+++ php-src/ext/standard/filestat.c Tue Jul 26 05:32:58 2005
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: filestat.c,v 1.112.2.11 2004/09/02 09:38:56 stas Exp $ */
+/* $Id: filestat.c,v 1.112.2.11.2.1 2005/07/26 09:32:58 hyanantha Exp $ */
#include "php.h"
#include "safe_mode.h"
@@ -58,8 +58,6 @@
#if HAVE_PWD_H
# ifdef PHP_WIN32
# include "win32/pwd.h"
-# elif defined(NETWARE)
-# include "netware/pwd.h"
# else
# include <pwd.h>
# endif
@@ -330,8 +328,12 @@
}
#elif (defined(HAVE_SYS_STATFS_H) || defined(HAVE_SYS_MOUNT_H)) &&
defined(HAVE_STATFS)
if (statfs(Z_STRVAL_PP(path), &buf)) RETURN_FALSE;
+#ifdef NETWARE
+ bytesfree = (((double)buf.f_bsize) * ((double)buf.f_bfree));
+#else
bytesfree = (((double)buf.f_bsize) * ((double)buf.f_bavail));
#endif
+#endif
#endif /* WINDOWS */
RETURN_DOUBLE(bytesfree);
@@ -479,11 +481,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;
@@ -560,11 +558,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
int 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",
"size", "atime", "mtime", "ctime", "blksize",
"blocks"};
@@ -683,19 +677,19 @@
case FS_GROUP:
RETURN_LONG((long)BG(sb).st_gid);
case FS_ATIME:
-#if defined(NETWARE) && defined(NEW_LIBC)
+#ifdef NETWARE
RETURN_LONG((long)(BG(sb).st_atime).tv_nsec);
#else
RETURN_LONG((long)BG(sb).st_atime);
#endif
case FS_MTIME:
-#if defined(NETWARE) && defined(NEW_LIBC)
+#ifdef NETWARE
RETURN_LONG((long)(BG(sb).st_mtime).tv_nsec);
#else
RETURN_LONG((long)BG(sb).st_mtime);
#endif
case FS_CTIME:
-#if defined(NETWARE) && defined(NEW_LIBC)
+#ifdef NETWARE
RETURN_LONG((long)(BG(sb).st_ctime).tv_nsec);
#else
RETURN_LONG((long)BG(sb).st_ctime);
@@ -774,7 +768,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_nsec);
MAKE_LONG_ZVAL_INCREF(stat_mtime, (stat_sb->st_mtime).tv_nsec);
MAKE_LONG_ZVAL_INCREF(stat_ctime, (stat_sb->st_ctime).tv_nsec);
http://cvs.php.net/diff.php/php-src/ext/standard/fsock.c?r1=1.106.2.13&r2=1.106.2.13.4.1&ty=u
Index: php-src/ext/standard/fsock.c
diff -u php-src/ext/standard/fsock.c:1.106.2.13
php-src/ext/standard/fsock.c:1.106.2.13.4.1
--- php-src/ext/standard/fsock.c:1.106.2.13 Wed Jan 21 22:25:37 2004
+++ php-src/ext/standard/fsock.c Tue Jul 26 05:32:58 2005
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: fsock.c,v 1.106.2.13 2004/01/22 03:25:37 sniper Exp $ */
+/* $Id: fsock.c,v 1.106.2.13.4.1 2005/07/26 09:32:58 hyanantha Exp $ */
/* converted to PHP Streams and moved much code to main/network.c [wez] */
@@ -48,17 +48,12 @@
#ifdef PHP_WIN32
#include <winsock.h>
#elif defined(NETWARE)
-#ifdef NEW_LIBC
#ifdef USE_WINSOCK
#include <novsock2.h>
#else
#include <netinet/in.h>
#include <netdb.h>
-/*#include <sys/socket.h>*/
#include <sys/select.h>
-/*#else
-#include <sys/socket.h>*/
-#endif
#endif
#else
#include <netinet/in.h>
http://cvs.php.net/diff.php/php-src/ext/standard/mail.c?r1=1.66.2.12&r2=1.66.2.12.4.1&ty=u
Index: php-src/ext/standard/mail.c
diff -u php-src/ext/standard/mail.c:1.66.2.12
php-src/ext/standard/mail.c:1.66.2.12.4.1
--- php-src/ext/standard/mail.c:1.66.2.12 Thu Jan 8 20:35:58 2004
+++ php-src/ext/standard/mail.c Tue Jul 26 05:32:58 2005
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mail.c,v 1.66.2.12 2004/01/09 01:35:58 iliaa Exp $ */
+/* $Id: mail.c,v 1.66.2.12.4.1 2005/07/26 09:32:58 hyanantha Exp $ */
#include <stdlib.h>
#include <ctype.h>
@@ -42,8 +42,8 @@
#endif
#ifdef NETWARE
-#include "netware/pipe.h" /* For popen(), pclose() */
-#include "netware/sysexits.h" /* For exit status codes like EX_OK */
+#define EX_OK 0 /* successful termination */
+#define EX_TEMPFAIL 75 /* temp failure; user is invited to retry */
#endif
#define SKIP_LONG_HEADER_SEP(str, pos)
\
http://cvs.php.net/diff.php/php-src/ext/standard/pack.c?r1=1.40.2.7.2.1&r2=1.40.2.7.2.2&ty=u
Index: php-src/ext/standard/pack.c
diff -u php-src/ext/standard/pack.c:1.40.2.7.2.1
php-src/ext/standard/pack.c:1.40.2.7.2.2
--- php-src/ext/standard/pack.c:1.40.2.7.2.1 Sat Jul 23 07:06:52 2005
+++ php-src/ext/standard/pack.c Tue Jul 26 05:32:58 2005
@@ -15,7 +15,7 @@
| Author: Chris Schneider <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
*/
-/* $Id: pack.c,v 1.40.2.7.2.1 2005/07/23 11:06:52 hyanantha Exp $ */
+/* $Id: pack.c,v 1.40.2.7.2.2 2005/07/26 09:32:58 hyanantha Exp $ */
#include "php.h"
@@ -47,8 +47,6 @@
#if HAVE_PWD_H
#ifdef PHP_WIN32
#include "win32/pwd.h"
-#elif defined(NETWARE)
-#include "netware/pwd.h"
#else
#include <pwd.h>
#endif
http://cvs.php.net/diff.php/php-src/ext/standard/pageinfo.c?r1=1.34.2.1&r2=1.34.2.1.8.1&ty=u
Index: php-src/ext/standard/pageinfo.c
diff -u php-src/ext/standard/pageinfo.c:1.34.2.1
php-src/ext/standard/pageinfo.c:1.34.2.1.8.1
--- php-src/ext/standard/pageinfo.c:1.34.2.1 Tue Dec 31 11:35:32 2002
+++ php-src/ext/standard/pageinfo.c Tue Jul 26 05:32:58 2005
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pageinfo.c,v 1.34.2.1 2002/12/31 16:35:32 sebastian Exp $ */
+/* $Id: pageinfo.c,v 1.34.2.1.8.1 2005/07/26 09:32:58 hyanantha Exp $ */
#include "php.h"
#include "pageinfo.h"
@@ -27,11 +27,6 @@
#if HAVE_PWD_H
#ifdef PHP_WIN32
#include "win32/pwd.h"
-#elif defined(NETWARE)
-#ifdef ZTS
-extern int basic_globals_id;
-#endif
-#include "netware/pwd.h"
#else
#include <pwd.h>
#endif
@@ -77,7 +72,7 @@
BG(page_uid) = pstat->st_uid;
BG(page_gid) = pstat->st_gid;
BG(page_inode) = pstat->st_ino;
-#if defined(NETWARE) && defined(NEW_LIBC)
+#ifdef NETWARE
BG(page_mtime) = (pstat->st_mtime).tv_nsec;
#else
BG(page_mtime) = pstat->st_mtime;
http://cvs.php.net/diff.php/php-src/ext/standard/rand.c?r1=1.60.2.3&r2=1.60.2.3.4.1&ty=u
Index: php-src/ext/standard/rand.c
diff -u php-src/ext/standard/rand.c:1.60.2.3
php-src/ext/standard/rand.c:1.60.2.3.4.1
--- php-src/ext/standard/rand.c:1.60.2.3 Sun Jan 18 22:16:04 2004
+++ php-src/ext/standard/rand.c Tue Jul 26 05:32:58 2005
@@ -20,7 +20,7 @@
| Based on code from: Shawn Cokus <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
*/
-/* $Id: rand.c,v 1.60.2.3 2004/01/19 03:16:04 sniper Exp $ */
+/* $Id: rand.c,v 1.60.2.3.4.1 2005/07/26 09:32:58 hyanantha Exp $ */
#include <stdlib.h>
@@ -31,10 +31,6 @@
# include <windows.h>
#endif
-#if defined(NETWARE) && !defined(NEW_LIBC) /* For getpid() used below */
-#include "netware/pwd.h"
-#endif
-
#include "php.h"
#include "php_math.h"
#include "php_rand.h"
http://cvs.php.net/diff.php/php-src/ext/standard/ftp_fopen_wrapper.c?r1=1.38.2.8.2.1&r2=1.38.2.8.2.2&ty=u
Index: php-src/ext/standard/ftp_fopen_wrapper.c
diff -u php-src/ext/standard/ftp_fopen_wrapper.c:1.38.2.8.2.1
php-src/ext/standard/ftp_fopen_wrapper.c:1.38.2.8.2.2
--- php-src/ext/standard/ftp_fopen_wrapper.c:1.38.2.8.2.1 Mon Jun 27
04:27:23 2005
+++ php-src/ext/standard/ftp_fopen_wrapper.c Tue Jul 26 05:32:58 2005
@@ -17,7 +17,7 @@
| Hartmut Holzgraefe <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
*/
-/* $Id: ftp_fopen_wrapper.c,v 1.38.2.8.2.1 2005/06/27 08:27:23 sesser Exp $ */
+/* $Id: ftp_fopen_wrapper.c,v 1.38.2.8.2.2 2005/07/26 09:32:58 hyanantha Exp $
*/
#include "php.h"
#include "php_globals.h"
@@ -35,14 +35,6 @@
#include <winsock.h>
#define O_RDONLY _O_RDONLY
#include "win32/param.h"
-#elif defined(NETWARE)
-/*#include <ws2nlm.h>*/
-/*#include <sys/socket.h>*/
-#ifdef NEW_LIBC
-#include <sys/param.h>
-#else
-#include "netware/param.h"
-#endif
#else
#include <sys/param.h>
#endif
@@ -57,7 +49,6 @@
#ifdef PHP_WIN32
#include <winsock.h>
#elif defined(NETWARE) && defined(USE_WINSOCK)
-/*#include <ws2nlm.h>*/
#include <novsock2.h>
#else
#include <netinet/in.h>
http://cvs.php.net/diff.php/php-src/ext/standard/http_fopen_wrapper.c?r1=1.53.2.20.2.1&r2=1.53.2.20.2.2&ty=u
Index: php-src/ext/standard/http_fopen_wrapper.c
diff -u php-src/ext/standard/http_fopen_wrapper.c:1.53.2.20.2.1
php-src/ext/standard/http_fopen_wrapper.c:1.53.2.20.2.2
--- php-src/ext/standard/http_fopen_wrapper.c:1.53.2.20.2.1 Mon Jun 6
08:42:50 2005
+++ php-src/ext/standard/http_fopen_wrapper.c Tue Jul 26 05:32:58 2005
@@ -18,7 +18,7 @@
| Wez Furlong <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
*/
-/* $Id: http_fopen_wrapper.c,v 1.53.2.20.2.1 2005/06/06 12:42:50 derick Exp $
*/
+/* $Id: http_fopen_wrapper.c,v 1.53.2.20.2.2 2005/07/26 09:32:58 hyanantha Exp
$ */
#include "php.h"
#include "php_globals.h"
@@ -39,14 +39,6 @@
#include <winsock.h>
#define O_RDONLY _O_RDONLY
#include "win32/param.h"
-#elif defined(NETWARE)
-/*#include <ws2nlm.h>*/
-/*#include <sys/socket.h>*/
-#ifdef NEW_LIBC
-#include <sys/param.h>
-#else
-#include "netware/param.h"
-#endif
#else
#include <sys/param.h>
#endif
@@ -61,7 +53,6 @@
#ifdef PHP_WIN32
#include <winsock.h>
#elif defined(NETWARE) && defined(USE_WINSOCK)
-/*#include <ws2nlm.h>*/
#include <novsock2.h>
#else
#include <netinet/in.h>
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php