hyanantha Fri Jan 3 07:48:15 2003 EDT
Modified files:
/php4/main internal_functions_nw.c config.nw.h php.h php_sprintf.c
user_streams.c
Log:
A new file added and some old files modified for NetWare.
Index: php4/main/internal_functions_nw.c
diff -u /dev/null php4/main/internal_functions_nw.c:1.2
--- /dev/null Fri Jan 3 07:48:14 2003
+++ php4/main/internal_functions_nw.c Fri Jan 3 07:48:14 2003
@@ -0,0 +1,101 @@
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 4 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1997-2003 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 2.02 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available at through the world-wide-web at |
+ | http://www.php.net/license/2_02.txt. |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | [EMAIL PROTECTED] so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Andi Gutmans <[EMAIL PROTECTED]> |
+ | Zeev Suraski <[EMAIL PROTECTED]> |
+ | Modified for NetWare: Novell, Inc. |
+ +----------------------------------------------------------------------+
+ */
+
+
+/* {{{ includes
+ */
+#include "php.h"
+#include "php_main.h"
+#include "zend_modules.h"
+#include "internal_functions_registry.h"
+#include "zend_compile.h"
+#include <stdarg.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "ext/bcmath/php_bcmath.h"
+#include "ext/gd/php_gd.h"
+#include "ext/standard/dl.h"
+#include "ext/standard/file.h"
+#include "ext/standard/fsock.h"
+#include "ext/standard/head.h"
+#include "ext/standard/pack.h"
+#include "ext/standard/php_browscap.h"
+/*#include "ext/standard/php_crypt.h"*/
+#include "ext/standard/php_dir.h"
+#include "ext/standard/php_filestat.h"
+#include "ext/standard/php_mail.h"
+/*#include "ext/standard/php_ext_syslog.h"*/
+#include "ext/standard/php_standard.h"
+#include "ext/standard/php_lcg.h"
+#include "ext/standard/php_array.h"
+#include "ext/standard/php_assert.h"
+#include "ext/calendar/php_calendar.h"
+/*#include "ext/com/php_COM.h"
+#include "ext/com/php_VARIANT.h"*/
+#include "ext/ftp/php_ftp.h"
+#include "ext/standard/reg.h"
+#include "ext/pcre/php_pcre.h"
+/*#include "ext/odbc/php_odbc.h"*/ /* Commented out for now */
+#include "ext/session/php_session.h"
+/*#include "ext/xml/php_xml.h"
+#include "ext/wddx/php_wddx.h"
+#include "ext/mysql/php_mysql.h"*/ /* Commented out for now */
+/* }}} */
+
+/* {{{ php_builtin_extensions[]
+ */
+zend_module_entry *php_builtin_extensions[] = {
+ phpext_standard_ptr,
+#if WITH_BCMATH
+ phpext_bcmath_ptr,
+#endif
+ phpext_calendar_ptr,
+/* COM_module_ptr,*/
+ phpext_ftp_ptr,
+#if defined(MBSTR_ENC_TRANS)
+ phpext_mbstring_ptr,
+#endif
+/* phpext_mysql_ptr,*/ /* Commented out for now */
+/* phpext_odbc_ptr, */ /* Commented out for now */
+ phpext_pcre_ptr,
+ phpext_session_ptr,
+/* phpext_xml_ptr,
+ phpext_wddx_ptr */ /* Commented out for now */
+};
+/* }}} */
+
+#define EXTCOUNT (sizeof(php_builtin_extensions)/sizeof(zend_module_entry *))
+
+
+int php_startup_internal_extensions(void)
+{
+ return php_startup_extensions(php_builtin_extensions, EXTCOUNT);
+}
+
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: sw=4 ts=4 fdm=marker
+ * vim<600: sw=4 ts=4
+ */
Index: php4/main/config.nw.h
diff -u php4/main/config.nw.h:1.1 php4/main/config.nw.h:1.2
--- php4/main/config.nw.h:1.1 Fri May 31 00:49:45 2002
+++ php4/main/config.nw.h Fri Jan 3 07:48:13 2003
@@ -1,13 +1,6 @@
/* config.nw.h. Configure file for NetWare platform */
-/****
-
-Need to carefully look into each constant and either define or undef it w.r.t.
NetWare.
-
-****/
-
-
/* Define if PHP to setup it's own SIGCHLD handler (not needed on NetWare) */
#define PHP_SIGCHILD 0
@@ -28,6 +21,17 @@
/* set to enable FTP support */
#define HAVE_FTP 1
+/* set to enable SNMP */
+/*#define HAVE_SNMP 1*/
+
+/* defines for PostgreSQL extension */
+#define HAVE_PGSQL 1
+#define PHP_PGSQL_PRIVATE 1
+#define HAVE_PGSQL_WITH_MULTIBYTE_SUPPORT 1
+#define HAVE_PQCLIENTENCODING 1
+#define HAVE_PQCMDTUPLES 1
+#define HAVE_PQOIDVALUE 1
+
/* set to enable bundled PCRE library */
#define HAVE_BUNDLED_PCRE 1
@@ -55,11 +59,6 @@
#define PHP_SAFE_MODE 0
#define MAGIC_QUOTES 0
-/* This is the default configuration file to read */
-#define CONFIGURATION_FILE_PATH "php.ini"
-#define USE_CONFIG_FILE 1
-
-#define PHP_INCLUDE_PATH NULL
/* Undefine if you want stricter XML/SGML compliance by default */
@@ -111,8 +110,13 @@
#define HAVE_UODBC 1
#define HAVE_LIBDL 1
#define HAVE_SENDMAIL 1
+
+/* Define if you have the gettimeofday function. */
#define HAVE_GETTIMEOFDAY 1
+
+/* Define if you have the putenv function. */
#define HAVE_PUTENV 1
+
#define HAVE_LIMITS_H 1
#define HAVE_TZSET 1
@@ -163,20 +167,14 @@
/* Define if you have the getlogin function. */
/* #define HAVE_GETLOGIN 1 */
-/* Define if you have the gettimeofday function. */
-#define HAVE_GETTIMEOFDAY 1
-
/* Define if you have the memcpy function. */
#define HAVE_MEMCPY 1
/* Define if you have the memmove function. */
#define HAVE_MEMMOVE 1
-/* Define if you have the putenv function. */
-/* #define HAVE_PUTENV 1 */ /* Why are such things defined in more than one place ?
*/
-
/* Define if you have the regcomp function. */
-/* #define HAVE_REGCOMP 1 */
+#define HAVE_REGCOMP 1
/* Define if you have the setlocale function. */
/* #define HAVE_SETLOCALE 1 */ /* LibC doesn't seem to be supporting fully --
hence commenting for now */
@@ -212,7 +210,7 @@
#define HAVE_UTIME 1
/* Define if you have the <dirent.h> header file. */
-#define HAVE_DIRENT_H
+#define HAVE_DIRENT_H 1
/* Define if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
@@ -230,7 +228,11 @@
#undef HAVE_SYS_FILE_H
/* Define if you have the <sys/socket.h> header file. */
+#ifdef USE_WINSOCK
+#undef HAVE_SYS_SOCKET_H
+#else
#define HAVE_SYS_SOCKET_H 1 /* Added '1' for '#if' to work */
+#endif
/* Define if you have the <sys/wait.h> header file. */
#undef HAVE_SYS_WAIT_H
@@ -255,14 +257,24 @@
#define HAVE_STRFTIME 1
+/* Defined since unsetenv function is defined in LibC.
+ * This is used to destroy env values in the function php_putenv_destructor.
+ * If we do not use unsetenv, then the environment variables are directlt manipulated.
+ * This will then result in LibC not being able to do the maintenance
+ * that is required for NetWare.
+ */
+#define HAVE_UNSETENV 1
+
/* Default directory for loading extensions. */
#define PHP_EXTENSION_DIR "sys:/php/ext"
#define SIZEOF_INT 4
-/* Define directory constants for php and pear */
+/* Define directory constants for PHP and PEAR */
+
+/* This is the default configuration file to read */
+#define CONFIGURATION_FILE_PATH "php.ini"
-/* Venkat (20/12/01) */
#define APACHE_MODULE_DIR "sys:/apache/modules"
#define PHP_BINDIR "sys:/php"
#define PHP_LIBDIR PHP_BINDIR
@@ -271,4 +283,14 @@
#define PHP_LOCALSTATEDIR PHP_BINDIR
#define PHP_CONFIG_FILE_PATH "sys:/php"
#define PEAR_INSTALLDIR "sys:/php/pear"
+
+#define PHP_CONFIG_FILE_SCAN_DIR NULL
+#define PHP_EXTENSION_DIR "sys:/php/ext"
+
+#define PHP_INCLUDE_PATH NULL
+
+#define PHP_PREFIX "sys:/php"
+#define PHP_SHLIB_SUFFIX "nlm"
+
+#define USE_CONFIG_FILE 1
Index: php4/main/php.h
diff -u php4/main/php.h:1.179 php4/main/php.h:1.180
--- php4/main/php.h:1.179 Tue Dec 31 10:58:53 2002
+++ php4/main/php.h Fri Jan 3 07:48:14 2003
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php.h,v 1.179 2002/12/31 15:58:53 sebastian Exp $ */
+/* $Id: php.h,v 1.180 2003/01/03 12:48:14 hyanantha Exp $ */
#ifndef PHP_H
#define PHP_H
@@ -244,18 +244,17 @@
#if !defined(PHP_WIN32)
#ifdef NETWARE
#ifdef NEW_LIBC
-/*#undef environ*/ /* For now, so that our 'environ' implementation is used */
#define php_sleep sleep
-#else
+#else /* NEW_LIBC */
#define php_sleep delay /* sleep() and usleep() are not available */
#define usleep delay
-#endif
+#endif /* NEW_LIBC */
extern char **environ;
-#else
+#else /* NETWARE */
extern char **environ;
#define php_sleep sleep
-#endif
-#endif
+#endif /* NETWARE */
+#endif /* !defined(PHP_WIN32) */
#ifdef PHP_PWRITE_64
ssize_t pwrite(int, void *, size_t, off64_t);
Index: php4/main/php_sprintf.c
diff -u php4/main/php_sprintf.c:1.13 php4/main/php_sprintf.c:1.14
--- php4/main/php_sprintf.c:1.13 Tue Dec 31 10:58:54 2002
+++ php4/main/php_sprintf.c Fri Jan 3 07:48:14 2003
@@ -16,11 +16,15 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_sprintf.c,v 1.13 2002/12/31 15:58:54 sebastian Exp $ */
+/* $Id: php_sprintf.c,v 1.14 2003/01/03 12:48:14 hyanantha Exp $ */
#include <stdio.h>
#include <stdarg.h>
+#ifdef NETWARE
+#include "config.nw.h"
+#else
#include "php_config.h"
+#endif
#if PHP_BROKEN_SPRINTF
Index: php4/main/user_streams.c
diff -u php4/main/user_streams.c:1.30 php4/main/user_streams.c:1.31
--- php4/main/user_streams.c:1.30 Tue Dec 31 10:58:54 2002
+++ php4/main/user_streams.c Fri Jan 3 07:48:14 2003
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: user_streams.c,v 1.30 2002/12/31 15:58:54 sebastian Exp $ */
+/* $Id: user_streams.c,v 1.31 2003/01/03 12:48:14 hyanantha Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -646,9 +646,15 @@
STAT_PROP_ENTRY(rdev);
#endif
STAT_PROP_ENTRY(size);
+#if defined(NETWARE) && defined(CLIB_STAT_PATCH)
+ STAT_PROP_ENTRY(atime.tv_sec);
+ STAT_PROP_ENTRY(mtime.tv_sec);
+ STAT_PROP_ENTRY(ctime.tv_sec);
+#else
STAT_PROP_ENTRY(atime);
STAT_PROP_ENTRY(mtime);
STAT_PROP_ENTRY(ctime);
+#endif
#ifdef HAVE_ST_BLKSIZE
STAT_PROP_ENTRY(blksize);
#endif
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php