mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
A new file added and some old files modified for NetWare.
This commit is contained in:
parent
a1402eebf1
commit
3e2f1526bc
5 changed files with 160 additions and 28 deletions
|
@ -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
|
||||
|
||||
|
|
101
main/internal_functions_nw.c
Normal file
101
main/internal_functions_nw.c
Normal file
|
@ -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
|
||||
*/
|
11
main/php.h
11
main/php.h
|
@ -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);
|
||||
|
|
|
@ -20,7 +20,11 @@
|
|||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#ifdef NETWARE
|
||||
#include "config.nw.h"
|
||||
#else
|
||||
#include "php_config.h"
|
||||
#endif
|
||||
|
||||
#if PHP_BROKEN_SPRINTF
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue