]> granicus.if.org Git - php/commitdiff
A new file added and some old files modified for NetWare.
authorAnantha Kesari H Y <hyanantha@php.net>
Fri, 3 Jan 2003 12:48:14 +0000 (12:48 +0000)
committerAnantha Kesari H Y <hyanantha@php.net>
Fri, 3 Jan 2003 12:48:14 +0000 (12:48 +0000)
main/config.nw.h
main/internal_functions_nw.c [new file with mode: 0644]
main/php.h
main/php_sprintf.c
main/user_streams.c

index b2c15b56b0b6a7b3e66dd35c3644a5843706c757..c05fefc2011486e8bfe9081c236f198615b7cb2b 100644 (file)
@@ -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 @@ Need to carefully look into each constant and either define or undef it w.r.t. N
 /* 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 @@ Need to carefully look into each constant and either define or undef it w.r.t. N
 
 #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 @@ Need to carefully look into each constant and either define or undef it w.r.t. N
 #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 @@ Need to carefully look into each constant and either define or undef it w.r.t. N
 /* 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 @@ Need to carefully look into each constant and either define or undef it w.r.t. N
 #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 @@ Need to carefully look into each constant and either define or undef it w.r.t. N
 #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 @@ Need to carefully look into each constant and either define or undef it w.r.t. N
 
 #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
@@ -272,3 +284,13 @@ Need to carefully look into each constant and either define or undef it w.r.t. N
 #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
+
diff --git a/main/internal_functions_nw.c b/main/internal_functions_nw.c
new file mode 100644 (file)
index 0000000..e133fc4
--- /dev/null
@@ -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          |
+   | license@php.net so we can mail you a copy immediately.               |
+   +----------------------------------------------------------------------+
+   | Authors: Andi Gutmans <andi@zend.com>                                |
+   |          Zeev Suraski <zeev@zend.com>                                |
+   | 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 40ecc32e55e040c014bf700a4de33c89c8a47640..6cd191453a4d994d7f1f5b1e8ea857fd5bed9392 100644 (file)
@@ -244,18 +244,17 @@ extern pval *data;
 #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 26f1de7a1688075b278b4750701d8b1a793eddba..cb226b28db82a30659434e9baee70a6680443e65 100644 (file)
 
 #include <stdio.h>
 #include <stdarg.h>
+#ifdef NETWARE
+#include "config.nw.h"
+#else
 #include "php_config.h"
+#endif
 
 #if PHP_BROKEN_SPRINTF
 
index 1de2293401dd531fd1d6093caf528d7edbee0374..849d6dd561c2c970e5def57c134f6a659bda6f5b 100644 (file)
@@ -646,9 +646,15 @@ static int statbuf_from_array(zval *array, php_stream_statbuf *ssb TSRMLS_DC)
        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