[PHP-CVS] cvs: php4 /ext/standard basic_functions.c file.c file.h

2003-01-03 Thread Sara Golemon
pollita Fri Jan  3 03:02:38 2003 EDT

  Modified files:  
/php4/ext/standard  file.c file.h basic_functions.c 
  Log:
  Added stream_get_wrappers()
  
  
Index: php4/ext/standard/file.c
diff -u php4/ext/standard/file.c:1.284 php4/ext/standard/file.c:1.285
--- php4/ext/standard/file.c:1.284  Tue Dec 31 11:07:38 2002
+++ php4/ext/standard/file.cFri Jan  3 03:02:35 2003
@@ -21,7 +21,7 @@
+--+
  */
 
-/* $Id: file.c,v 1.284 2002/12/31 16:07:38 sebastian Exp $ */
+/* $Id: file.c,v 1.285 2003/01/03 08:02:35 pollita Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -621,6 +621,31 @@
add_assoc_bool(return_value, "timed_out", 0);
add_assoc_bool(return_value, "blocked", 1);
add_assoc_bool(return_value, "eof", php_stream_eof(stream));
+   }
+
+}
+/* }}} */
+
+/* {{{ proto array stream_get_wrappers()
+Retrieves list of registered stream wrappers */
+PHP_FUNCTION(stream_get_wrappers)
+{
+   HashTable *url_stream_wrappers_hash;
+   char *stream_protocol;
+   int stream_protocol_len = 0;
+
+   if (ZEND_NUM_ARGS() != 0) {
+   WRONG_PARAM_COUNT;
+   }
+
+   if (url_stream_wrappers_hash = php_stream_get_url_stream_wrappers_hash()) {
+   array_init(return_value);
+   for(zend_hash_internal_pointer_reset(url_stream_wrappers_hash);
+   zend_hash_get_current_key_ex(url_stream_wrappers_hash, 
+&stream_protocol, &stream_protocol_len, NULL, 0, NULL) == HASH_KEY_IS_STRING;
+   zend_hash_move_forward(url_stream_wrappers_hash)) 
+   add_next_index_string(return_value,stream_protocol,1);
+   } else {
+   RETURN_FALSE;
}
 
 }
Index: php4/ext/standard/file.h
diff -u php4/ext/standard/file.h:1.72 php4/ext/standard/file.h:1.73
--- php4/ext/standard/file.h:1.72   Tue Dec 31 11:07:39 2002
+++ php4/ext/standard/file.hFri Jan  3 03:02:36 2003
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: file.h,v 1.72 2002/12/31 16:07:39 sebastian Exp $ */
+/* $Id: file.h,v 1.73 2003/01/03 08:02:36 pollita Exp $ */
 
 /* Synced with php 3.0 revision 1.30 1999-06-16 [ssb] */
 
@@ -59,6 +59,7 @@
 PHP_FUNCTION(stream_select);
 PHP_FUNCTION(stream_set_timeout);
 PHP_FUNCTION(stream_set_write_buffer);
+PHP_FUNCTION(stream_get_wrappers);
 PHP_FUNCTION(get_meta_tags);
 PHP_FUNCTION(flock);
 PHP_FUNCTION(fd_set);
Index: php4/ext/standard/basic_functions.c
diff -u php4/ext/standard/basic_functions.c:1.552 
php4/ext/standard/basic_functions.c:1.553
--- php4/ext/standard/basic_functions.c:1.552   Wed Jan  1 06:04:43 2003
+++ php4/ext/standard/basic_functions.c Fri Jan  3 03:02:36 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.552 2003/01/01 11:04:43 wez Exp $ */
+/* $Id: basic_functions.c,v 1.553 2003/01/03 08:02:36 pollita Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -670,6 +670,7 @@
 
PHP_FE(stream_get_meta_data,   
 NULL)
PHP_FE(stream_register_wrapper,
 NULL)
+   PHP_FE(stream_get_wrappers,
+ NULL)
 
 #if HAVE_SYS_TIME_H || defined(PHP_WIN32)
PHP_FE(stream_set_timeout, 
 NULL)



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /netware buildlib.bat

2003-01-03 Thread Anantha Kesari H Y
hyanantha   Fri Jan  3 03:34:34 2003 EDT

  Modified files:  
/php4/netware   buildlib.bat 
  Log:
  Modified for NetWare.
  
  
Index: php4/netware/buildlib.bat
diff -u php4/netware/buildlib.bat:1.1 php4/netware/buildlib.bat:1.2
--- php4/netware/buildlib.bat:1.1   Wed Sep  4 08:13:27 2002
+++ php4/netware/buildlib.bat   Fri Jan  3 03:34:34 2003
@@ -5,6 +5,8 @@
 if "%1" == "clean" make -f netware\phplib.mak clean
 if "%1" == "/?" goto USAGE
 
+call netware\BisonExtStandard
+
 REM Build command
 make -f netware\phplib.mak
 goto EXIT



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-CVS] Not able to check-in files - Need help!

2003-01-03 Thread Ananth Kesari
Hi,

I downloaded the latest cvs version 1.11.4 and even with this, I have
the same problem. I could easily commit changes to TSRM and Zend areas.
But when I am trying to commit changes made into the NetWare directory,
I get this error message:

D:\cvs-4.3\php4\netware>cvs commit apachecore.imp
assertion "key != NULL" failed: file "hash.c", line 312
cvs [server aborted]: received abort signal
cvs commit: saving log message in
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\cvs7

Let me explain in detai:
What I am trying to do is to commit changes made into 34 files in
NetWare directory. Out of this 23 are new files.
When I commit the already existing file, it goes through fine. But when
I commit a new file that I just now added, then I get this error. Even
when I try to commit in the directory level, stiil the error comes due
to the presence of the just now added (but yet to be committed) new
files.

Please help.

Thanks,
Ananth.

>>> "Edin Kadribasic" <[EMAIL PROTECTED]> 12/20/02 04:17PM >>>
It seems that you found a bug in the cvs version you're using. Try
upgrading to a newever one. If you need them checked in quickly you
can mail them to me.

Edin

- Original Message -
From: "Ananth Kesari" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 20, 2002 7:31 AM
Subject: [PHP-CVS] Not able to check-in files - Need help!


> Hi,
>
> I am checking in some additional files and some modifications
related
> to NetWare. I could do so for a couple of files. Now I changed
quite a
> few files (about 10) in the NetWare directory and I am doing a cvs
> commit for the netware directory. This checked in about 2 files
and now
> it is giving the following error:
>
> D:\cvs-4.3\php4\netware>cvs commit
> cvs commit: Examining .
> cvs commit: Examining sys
> ? sysexits.h
> assertion "key != NULL" failed: file
> "/usr/src/gnu/usr.bin/cvs/cvs/../../../../c
> ontrib/cvs/src/hash.c", line 312
> cvs [server aborted]: received abort signal
> cvs commit: saving log message in
> C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\18
>
> I am not able to check-in now. Can someone help?
>
> Thanks,
> Ananth.
>
>
> --
> PHP CVS Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php 
>
>
>


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php 


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4(PHP_4_3) / NEWS

2003-01-03 Thread Derick Rethans
derick  Fri Jan  3 04:19:50 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php4   NEWS 
  Log:
  Bugfixing news
  
Index: php4/NEWS
diff -u php4/NEWS:1.1247.2.40 php4/NEWS:1.1247.2.41
--- php4/NEWS:1.1247.2.40   Thu Jan  2 19:05:07 2003
+++ php4/NEWS   Fri Jan  3 04:19:49 2003
@@ -7,6 +7,8 @@
   . Disallow linkage of Berkeley db submodules against libraries with
 different major version.
   . Disallow configuring of more than one Berkeley db handler. 
+- Fixed bug #21169 (Compile Failure, and lots of warnings on UnixWare).
+  (Derick)
 - Fixed bug #21338 (html_entity_decode() crashed when "" is passed). (Ilia)
 - Fixed bug #21229 (missing 3rd argument to php_module_startup). (Ilia)
 - Fixed bug #21267 (opening URLs that result in redirection to a relative



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 / README.PARAMETER_PARSING_API

2003-01-03 Thread Derick Rethans
derick  Fri Jan  3 05:39:22 2003 EDT

  Modified files:  
/php4   README.PARAMETER_PARSING_API 
  Log:
  - Whitespace
  
  
Index: php4/README.PARAMETER_PARSING_API
diff -u php4/README.PARAMETER_PARSING_API:1.6 php4/README.PARAMETER_PARSING_API:1.7
--- php4/README.PARAMETER_PARSING_API:1.6   Wed Oct 23 17:32:39 2002
+++ php4/README.PARAMETER_PARSING_API   Fri Jan  3 05:39:22 2003
@@ -42,14 +42,14 @@
  z - the actual zval
 
  The following characters also have a meaning in the specifier string:
- | - indicates that the remaining parameters are optional, they
-should be initialized to default values by the extension since they
-will not be touched by the parsing function if they are not
-passed to it.
-/ - use SEPARATE_ZVAL_IF_NOT_REF() on the parameter it follows
-! - the parameter it follows can be of specified type or NULL (only applies
-to 'a', 'o', 'O', 'r', and 'z'). If NULL is passed, the results
-pointer is set to NULL as well.
+   | - indicates that the remaining parameters are optional, they
+   should be initialized to default values by the extension since they
+   will not be touched by the parsing function if they are not
+   passed to it.
+   / - use SEPARATE_ZVAL_IF_NOT_REF() on the parameter it follows
+   ! - the parameter it follows can be of specified type or NULL (only applies
+   to 'a', 'o', 'O', 'r', and 'z'). If NULL is passed, the results
+   pointer is set to NULL as well.
 
 Examples
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/standard credits_ext.h /scripts credits

2003-01-03 Thread Derick Rethans
derick  Fri Jan  3 05:48:38 2003 EDT

  Modified files:  
/php4/ext/standard  credits_ext.h 
/php4/scripts   credits 
  Log:
  - Remove double "Win32 COM" functions line
  
  
Index: php4/ext/standard/credits_ext.h
diff -u php4/ext/standard/credits_ext.h:1.15 php4/ext/standard/credits_ext.h:1.16
--- php4/ext/standard/credits_ext.h:1.15Thu Dec 26 18:45:05 2002
+++ php4/ext/standard/credits_ext.h Fri Jan  3 05:48:38 2003
@@ -54,9 +54,9 @@
 CREDIT_LINE("msession", "Mark L. Woodward");
 CREDIT_LINE("mSQL", "Zeev Suraski");
 CREDIT_LINE("MS SQL", "Frank M. Kromann");
-CREDIT_LINE("Multibyte (Japanese) String Functions", "Tsukada Takuya, Rui Hirokawa");
+CREDIT_LINE("Multibyte String Functions", "Tsukada Takuya, Rui Hirokawa");
 CREDIT_LINE("MySQL", "Zeev Suraski, Zak Greant, Georg Richter");
-CREDIT_LINE("ncurses", "Ilia Alshanetsky, Hartmut Holzgraefe, Georg Richter");
+CREDIT_LINE("ncurses", "Ilia Alshanetsky, Wez Furlong, Hartmut Holzgraefe, Georg 
+Richter");
 CREDIT_LINE("OCI8", "Stig Bakken, Thies C. Arntzen, Andy Sautins, David Benson");
 CREDIT_LINE("ODBC", "Stig Bakken, Andreas Karajannis, Frank M. Kromann, Daniel R. 
Kalowsky");
 CREDIT_LINE("OpenSSL", "Stig Venaas, Wez Furlong, Sascha Kettler");
Index: php4/scripts/credits
diff -u php4/scripts/credits:1.5 php4/scripts/credits:1.6
--- php4/scripts/credits:1.5Wed Mar 13 13:39:42 2002
+++ php4/scripts/creditsFri Jan  3 05:48:38 2003
@@ -22,5 +22,5 @@
 END
   # Do not process skeleton #
   files=`find "$what" -name CREDITS | grep -v "$what"/skeleton/CREDITS`
-  awk "$awkprog" $files | sort -f  >> $file
+  awk "$awkprog" $files | sort -f | uniq >> $file
 done



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/standard credits_sapi.h

2003-01-03 Thread Derick Rethans
derick  Fri Jan  3 05:52:23 2003 EDT

  Modified files:  
/php4/ext/standard  credits_sapi.h 
  Log:
  - Update this one as well
  
  
Index: php4/ext/standard/credits_sapi.h
diff -u php4/ext/standard/credits_sapi.h:1.11 php4/ext/standard/credits_sapi.h:1.12
--- php4/ext/standard/credits_sapi.h:1.11   Wed Nov 20 07:53:40 2002
+++ php4/ext/standard/credits_sapi.hFri Jan  3 05:52:23 2003
@@ -12,18 +12,19 @@
 
 CREDIT_LINE("ActiveScript", "Wez Furlong");
 CREDIT_LINE("AOLserver", "Sascha Schumann");
+CREDIT_LINE("Apache 1.3 (apache_hooks)", "Rasmus Lerdorf, Zeev Suraski, Stig Bakken, 
+David Sklar, George Schlossnagle, Lukas Schroeder");
 CREDIT_LINE("Apache 1.3", "Rasmus Lerdorf, Zeev Suraski, Stig Bakken, David Sklar");
 CREDIT_LINE("Apache 2.0", "Sascha Schumann, Aaron Bannert");
 CREDIT_LINE("Caudium / Roxen", "David Hedbor");
 CREDIT_LINE("CGI / FastCGI", "Rasmus Lerdorf, Stig Bakken, Shane Caraveo");
 CREDIT_LINE("CLI", "Edin Kadribasic, Marcus Boerger");
 CREDIT_LINE("Embed", "Edin Kadribasic");
-CREDIT_LINE("fastcgi", "Ben Mansell");
 CREDIT_LINE("ISAPI", "Andi Gutmans, Zeev Suraski");
 CREDIT_LINE("Java Servlet", "Sam Ruby");
 CREDIT_LINE("NSAPI", "Jayakumar Muthukumarasamy");
 CREDIT_LINE("phttpd", "Thies C. Arntzen");
 CREDIT_LINE("pi3web", "Holger Zimmermann");
+CREDIT_LINE("Sendmail Milter", "Harald Radi");
 CREDIT_LINE("thttpd", "Sascha Schumann");
 CREDIT_LINE("tux", "Sascha Schumann");
 CREDIT_LINE("WebJames", "Alex Waugh");



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /netware sendmail_nw.h

2003-01-03 Thread Anantha Kesari H Y
hyanantha   Fri Jan  3 06:12:40 2003 EDT

  Added files: 
/php4/netware   sendmail_nw.h 
  Log:
  New file added for NetWare.
  
  

Index: php4/netware/sendmail_nw.h
+++ php4/netware/sendmail_nw.h

#ifdef USE_WINSOCK
/*#include */
#include 
#else
#include  /* For struct sockaddr, 'PF_INET' and 'AF_INET' */
#include  /* For struct sockaddr_in */
#include   /* For struct hostent */
/*#include */
#endif  /* USE_WINSOCK */

typedef int SOCKET; /* Borrowed from winsock\novsock2.h */
typedef struct sockaddr_in SOCKADDR_IN;
typedef struct sockaddr * LPSOCKADDR;
typedef struct hostent * LPHOSTENT;

#define INVALID_SOCKET  (SOCKET)(~0)/* Borrowed from winsock\novsock2.h */



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /netware common.mif

2003-01-03 Thread Anantha Kesari H Y
hyanantha   Fri Jan  3 06:36:24 2003 EDT

  Modified files:  
/php4/netware   common.mif 
  Log:
  File modified for NetWare.
  
  
Index: php4/netware/common.mif
diff -u php4/netware/common.mif:1.3 php4/netware/common.mif:1.4
--- php4/netware/common.mif:1.3 Fri May 31 00:42:02 2002
+++ php4/netware/common.mif Fri Jan  3 06:36:24 2003
@@ -1,36 +1,47 @@
 #
-# common include file for PHP build
-# include this in every make file
+# Common include file for PHP build.
+# Include this in every make file.
 #
 
+
 # Set following directories based on your setting
 
 # Path to CodeWarrior installation
 CW_PATH = P:/APPS/SCRIPT/SW/CW71-4
 
-# NWSDK directories
+# LibC directory
 ifndef SDK_DIR
-SDK_DIR = R:/script/common/libc
+SDK_DIR = P:/APPS/script/sw/libc
 endif
 
 # MPK related directory
 ifndef MPK_DIR
 MPK_DIR = p:/apps/script/mpk
+XDCTOOL = mpkxdc
+MPKTOOL = $(MPK_DIR)/$(XDCTOOL)
+XDCFLAGS = -n
 endif
 
-#ifndef CLIB_DIR
-#CLIB_DIR = p:/apps/ndk0601/nwsdk
-#endif
-
 # Winsock stuff
 WINSOCK_DIR = P:/APPS/script/sw/Winsock2
 
 # LDAP stuff
 LDAP_DIR = P:/APPS/script/sw/cldapsdk
 
+# XML-EXPAT stuff
+EXPAT_DIR = P:/APPS/script/sw/expat
+
+
+# Web Server defaults to Apache 1.3.x
+ifndef APACHE_VER
+APACHE_VER = 1.3
+endif
+
 # Apache directory
-ifndef APACHE_DIR
+ifeq '$(APACHE_VER)' '1.3'
 APACHE_DIR = P:/APPS/script/sw/Apache1.3.xSource
+else
+APACHE_DIR = P:/APPS/script/sw/Apache2Source
 endif
 
 
@@ -46,7 +57,6 @@
 ifndef BUILD
 BUILD = release
 endif
-#BUILD = debug
 
 OBJ_DIR = $(BUILD)
 FINAL_DIR = $(BUILD)
@@ -57,8 +67,16 @@
 endif
 
 ifndef COPYRIGHT
-#COPYRIGHT = "Copyright (c) 1997-2002 The PHP Group. All Rights Reserved."
-COPYRIGHT = "Copyright (c) 1999\, 2000 The PHP Group. All rights reserved."
+COPYRIGHT = "Copyright (C) 2002-2003  Novell\, Inc. All Rights Reserved."
+endif
+
+
+# Compile flags
+ifeq '$(APACHE_VER)' '1.3'
+C_FLAGS  = -align 1
+C_FLAGS += -DCLIB_STAT_PATCH
+else
+C_FLAGS  = -align 4
 endif
 
 # Link flags
@@ -70,4 +88,3 @@
 LD_FLAGS += -copy $(COPYRIGHT)
 LD_FLAGS += -screenname Default
 LD_FLAGS += -threadname $(MODULE_NAME)__p
-



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /netware geterrnoptr.c

2003-01-03 Thread Anantha Kesari H Y
hyanantha   Fri Jan  3 06:36:58 2003 EDT

  Modified files:  
/php4/netware   geterrnoptr.c 
  Log:
  New file added for NetWare.
  
  
Index: php4/netware/geterrnoptr.c
diff -u /dev/null php4/netware/geterrnoptr.c:1.2
--- /dev/null   Fri Jan  3 06:36:58 2003
+++ php4/netware/geterrnoptr.c  Fri Jan  3 06:36:57 2003
@@ -0,0 +1,9 @@
+/* Moved into a separate source file -- can be eliminated later */
+
+#include 
+
+int *__get_errno_ptr(void)
+{   
+return ___errno();
+}
+



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /netware libpq-fe.h libpq-fs.h

2003-01-03 Thread Anantha Kesari H Y
hyanantha   Fri Jan  3 06:40:52 2003 EDT

  Modified files:  
/php4/netware   libpq-fe.h libpq-fs.h 
  Log:
  New files added for NetWare.
  
  
Index: php4/netware/libpq-fe.h
diff -u /dev/null php4/netware/libpq-fe.h:1.2
--- /dev/null   Fri Jan  3 06:40:52 2003
+++ php4/netware/libpq-fe.h Fri Jan  3 06:40:52 2003
@@ -0,0 +1,378 @@
+/*-
+ *
+ * libpq-fe.h
+ *   This file contains definitions for structures and
+ *   externs for functions used by frontend postgres applications.
+ *
+ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * $Id: libpq-fe.h,v 1.2 2003/01/03 11:40:52 hyanantha Exp $
+ *
+ *-
+ */
+
+#ifndef LIBPQ_FE_H
+#define LIBPQ_FE_H
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#include 
+
+/*
+ * postgres_ext.h defines the backend's externally visible types,
+ * such as Oid.
+ */
+#include "postgres_ext.h"
+
+/* SSL type is needed here only to declare PQgetssl() */
+#ifdef USE_SSL
+#include 
+#endif
+
+/* Application-visible enum types */
+
+typedef enum
+{
+   /*
+* Although you may decide to change this list in some way, values
+* which become unused should never be removed, nor should constants
+* be redefined - that would break compatibility with existing code.
+*/
+   CONNECTION_OK,
+   CONNECTION_BAD,
+   /* Non-blocking mode only below here */
+
+   /*
+* The existence of these should never be relied upon - they should
+* only be used for user feedback or similar purposes.
+*/
+   CONNECTION_STARTED, /* Waiting for connection to be made.  
+*/
+   CONNECTION_MADE,/* Connection OK; waiting to send. 
+*/
+   CONNECTION_AWAITING_RESPONSE,   /* Waiting for a response from the
+* 
+postmaster.*/
+   CONNECTION_AUTH_OK, /* Received authentication; waiting for
+* backend startup. */
+   CONNECTION_SETENV   /* Negotiating environment.*/
+} ConnStatusType;
+
+typedef enum
+{
+   PGRES_POLLING_FAILED = 0,
+   PGRES_POLLING_READING,  /* These two indicate that one may*/
+   PGRES_POLLING_WRITING,  /* use select before polling again.   */
+   PGRES_POLLING_OK,
+   PGRES_POLLING_ACTIVE/* Can call poll function immediately. */
+} PostgresPollingStatusType;
+
+typedef enum
+{
+   PGRES_EMPTY_QUERY = 0,
+   PGRES_COMMAND_OK,   /* a query command that doesn't return
+* anything was 
+executed properly by the
+* backend */
+   PGRES_TUPLES_OK,/* a query command that returns tuples 
+was
+* executed properly 
+by the backend,
+* PGresult contains 
+the result tuples */
+   PGRES_COPY_OUT, /* Copy Out data transfer in progress 
+*/
+   PGRES_COPY_IN,  /* Copy In data transfer in progress */
+   PGRES_BAD_RESPONSE, /* an unexpected response was recv'd 
+from
+* the backend */
+   PGRES_NONFATAL_ERROR,
+   PGRES_FATAL_ERROR
+} ExecStatusType;
+
+/* PGconn encapsulates a connection to the backend.
+ * The contents of this struct are not supposed to be known to applications.
+ */
+typedef struct pg_conn PGconn;
+
+/* PGresult encapsulates the result of a query (or more precisely, of a single
+ * SQL command --- a query string given to PQsendQuery can contain multiple
+ * commands and thus return multiple PGresult objects).
+ * The contents of this struct are not supposed to be known to applications.
+ */
+typedef struct pg_result PGresult;
+
+/* PGnotify represents the occurrence of a NOTIFY message.
+ * Ideally this would be an opaque typedef, but it's so simple that it's
+ * unlikely to change.
+ * NOTE: in Postgres 6.4 and later, the be_pid is the notifying backend's,
+ * whereas in earlier versions it was always your own backend's PID.
+ */
+typedef struct pgNotify
+{
+   charrelname[NAMEDATALEN];   /* name of relation containing
+* 
+data */
+   int be_pid; /* process id of backend */
+} PGnotify;
+
+/* PQnoticeProcess

[PHP-CVS] cvs: php4 /netware ZendEngine2.mak grp.h libpq.imp mktemp.c param.h php-nw.bat php4apache.mak php4apache2filter.mak php4cli.mak phplib.imp phplib.mak phptest.ncf pipe.c pipe.h postgres_ext.h pwd.c pwd.h start.c sysexits.h time_nw.c time_nw.h tsrm.mak wfile.c wfile.h zend.mak

2003-01-03 Thread Anantha Kesari H Y
hyanantha   Fri Jan  3 06:46:21 2003 EDT

  Added files: 
/php4/netware   phptest.ncf 

  Modified files:  
/php4/netware   grp.h libpq.imp mktemp.c param.h 
php4apache2filter.mak php4cli.mak pipe.c pipe.h 
postgres_ext.h pwd.c sysexits.h time_nw.c time_nw.h 
wfile.c wfile.h php-nw.bat php4apache.mak phplib.imp 
phplib.mak pwd.h start.c tsrm.mak zend.mak 
ZendEngine2.mak 
  Log:
  A few New files added and some old files modified for NetWare.
  
  
Index: php4/netware/grp.h
diff -u /dev/null php4/netware/grp.h:1.2
--- /dev/null   Fri Jan  3 06:46:21 2003
+++ php4/netware/grp.h  Fri Jan  3 06:46:15 2003
@@ -0,0 +1,31 @@
+/*  pwd.h - Try to approximate UN*X's getuser...() functions under MS-DOS.
+   Copyright (C) 1990 by Thorsten Ohl, [EMAIL PROTECTED]
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 1, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+   $Header: /usr/repository/php4/netware/grp.h,v 1.2 2003/01/03 11:46:15 hyanantha 
+Exp $
+ */
+
+/* This 'implementation' is conjectured from the use of this functions in
+   the RCS and BASH distributions.  Of course these functions don't do too
+   much useful things under MS-DOS, but using them avoids many "#ifdef
+   MSDOS" in ported UN*X code ...  */
+
+struct group {
+   char *gr_name;  /* group name */
+   char *gr_passwd;/* group password */
+   int gr_gid; /* group id */
+   char **gr_mem;  /* group members */
+};
Index: php4/netware/libpq.imp
diff -u /dev/null php4/netware/libpq.imp:1.2
--- /dev/null   Fri Jan  3 06:46:21 2003
+++ php4/netware/libpq.imp  Fri Jan  3 06:46:16 2003
@@ -0,0 +1,93 @@
+ lo_open,
+ lo_close,
+ lo_read,
+ lo_write,
+ lo_lseek,
+ lo_creat,
+ lo_tell,
+ lo_unlink,
+ lo_import,
+ lo_export,
+ PQconnectdb,
+ PQconnectStart,
+ PQconndefaults,
+ PQsetdbLogin,
+ PQconnectPoll,
+ PQfinish,
+ PQreset,
+ PQresetStart,
+ PQresetPoll,
+ PQrequestCancel,
+ PQconninfoFree,
+ PQdb,
+ PQuser,
+ PQpass,
+ PQhost,
+ PQport,
+ PQtty,
+ PQoptions,
+ PQstatus,
+ PQerrorMessage,
+ PQsocket,
+ PQbackendPID,
+ PQclientEncoding,
+ PQsetClientEncoding,
+ PQtrace,
+ PQuntrace,
+ PQsetNoticeProcessor,
+ PQmakeEmptyPGresult,
+ PQclear,
+ PQsendQuery,
+ PQconsumeInput,
+ PQisBusy,
+ PQgetResult,
+ PQexec,
+ PQnotifies,
+ PQgetline,
+ PQgetlineAsync,
+ PQputline,
+ PQputnbytes,
+ PQendcopy,
+ PQfn,
+ PQresultStatus,
+ PQresStatus,
+ PQresultErrorMessage,
+ PQntuples,
+ PQnfields,
+ PQbinaryTuples,
+ PQfname,
+ PQfnumber,
+ PQftype,
+ PQfsize,
+ PQfmod,
+ PQcmdStatus,
+ PQoidStatus,
+ PQoidValue,
+ PQcmdTuples,
+ PQgetvalue,
+ PQgetlength,
+ PQgetisnull,
+ PQsetnonblocking,
+ PQisnonblocking,
+ PQflush,
+ PQmblen,
+ PQenv2encoding,
+ PQprint,
+ PQdisplayTuples,
+ PQprintTuples,
+ pg_valid_client_encoding,
+ pg_valid_server_encoding,
+ pg_char_to_encname_struct,
+ pg_char_to_encoding,
+ pg_encoding_to_char,
+ createPQExpBuffer,
+ initPQExpBuffer,
+ destroyPQExpBuffer,
+ termPQExpBuffer,
+ resetPQExpBuffer,
+ enlargePQExpBuffer,
+ printfPQExpBuffer,
+ appendPQExpBuffer,
+ appendPQExpBufferStr,
+ appendPQExpBufferChar,
+ appendBinaryPQExpBuffer
Index: php4/netware/mktemp.c
diff -u /dev/null php4/netware/mktemp.c:1.2
--- /dev/null   Fri Jan  3 06:46:21 2003
+++ php4/netware/mktemp.c   Fri Jan  3 06:46:18 2003
@@ -0,0 +1,87 @@
+
+#include 
+#include 
+#include 
+
+
+/* Based on standard ANSI C mktemp() for NetWare */
+char* mktemp(char* templateStr)
+{
+   char* pXs = NULL;
+   char numBuf[50] = {'\0'};
+   int count = 0;
+   char* pPid = NULL;
+
+   char termChar = '\0';
+   char letter = 'a';
+   char letter1 = 'a';
+
+   if (templateStr && (pXs = strstr(templateStr, "XX")))
+   {
+   /* Generate temp name */
+   termChar = pXs[6];
+   ltoa(NXThreadGetId(), numBuf, 16);
+   numBuf[strlen(numBuf)-1] = '\0';
+
+/*
+   Beware! thread IDs are 8 hex digits on NW 4.11 and only the
+   lower digits seem to change, whereas on NW 5 they are in the
+   range of < 1000 hex or 3 hex digits in length. So the following
+   logic ensures we use t

[PHP-CVS] cvs: php4 /netware/sys stat.h

2003-01-03 Thread Anantha Kesari H Y
hyanantha   Fri Jan  3 06:53:10 2003 EDT

  Modified files:  
/php4/netware/sys   stat.h 
  Log:
  File modified for NetWare.
  
  
Index: php4/netware/sys/stat.h
diff -u php4/netware/sys/stat.h:1.3 php4/netware/sys/stat.h:1.4
--- php4/netware/sys/stat.h:1.3 Tue Dec 31 10:58:58 2002
+++ php4/netware/sys/stat.h Fri Jan  3 06:53:09 2003
@@ -28,7 +28,9 @@
 
 #include 
 
+
 #ifdef CLIB_STAT_PATCH
+
 /* stat structure taken from CLib and modified ***/
 struct stat 
 {



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-CVS] Not able to check-in files - Need help!

2003-01-03 Thread Ananth Kesari
I could now check-in most of the files under netware directory except
the three files that are attached. As per your suggestion, I have
attached them. Can you please check them in. They are new files that are
already added.

Thanks,
Ananth.

>>> "Ananth Kesari" <[EMAIL PROTECTED]> 01/03/03 02:07PM >>>
Hi,

I downloaded the latest cvs version 1.11.4 and even with this, I have
the same problem. I could easily commit changes to TSRM and Zend
areas.
But when I am trying to commit changes made into the NetWare
directory,
I get this error message:

D:\cvs-4.3\php4\netware>cvs commit apachecore.imp
assertion "key != NULL" failed: file "hash.c", line 312
cvs [server aborted]: received abort signal
cvs commit: saving log message in
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\cvs7

Let me explain in detai:
What I am trying to do is to commit changes made into 34 files in
NetWare directory. Out of this 23 are new files.
When I commit the already existing file, it goes through fine. But
when
I commit a new file that I just now added, then I get this error. Even
when I try to commit in the directory level, stiil the error comes due
to the presence of the just now added (but yet to be committed) new
files.

Please help.

Thanks,
Ananth.

>>> "Edin Kadribasic" <[EMAIL PROTECTED]> 12/20/02 04:17PM >>>
It seems that you found a bug in the cvs version you're using. Try
upgrading to a newever one. If you need them checked in quickly you
can mail them to me.

Edin

- Original Message -
From: "Ananth Kesari" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 20, 2002 7:31 AM
Subject: [PHP-CVS] Not able to check-in files - Need help!


> Hi,
>
> I am checking in some additional files and some modifications
related
> to NetWare. I could do so for a couple of files. Now I changed
quite a
> few files (about 10) in the NetWare directory and I am doing a cvs
> commit for the netware directory. This checked in about 2 files
and now
> it is giving the following error:
>
> D:\cvs-4.3\php4\netware>cvs commit
> cvs commit: Examining .
> cvs commit: Examining sys
> ? sysexits.h
> assertion "key != NULL" failed: file
> "/usr/src/gnu/usr.bin/cvs/cvs/../../../../c
> ontrib/cvs/src/hash.c", line 312
> cvs [server aborted]: received abort signal
> cvs commit: saving log message in
> C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\18
>
> I am not able to check-in now. Can someone help?
>
> Thanks,
> Ananth.
>
>
> --
> PHP CVS Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php 
>
>
>


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php 


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-CVS] cvs: php4 /netware ApacheCore.imp BisonExtStandard.bat BisonFlexZend.bat

2003-01-03 Thread Edin Kadribasic
edink   Fri Jan  3 07:15:37 2003 EDT

  Modified files:  
/php4/netware   ApacheCore.imp BisonExtStandard.bat BisonFlexZend.bat 
  Log:
  Checking in files for Ananth Kesari <[EMAIL PROTECTED]>
  
  
Index: php4/netware/ApacheCore.imp
diff -u /dev/null php4/netware/ApacheCore.imp:1.2
--- /dev/null   Fri Jan  3 07:15:37 2003
+++ php4/netware/ApacheCore.imp Fri Jan  3 07:15:36 2003
@@ -0,0 +1,365 @@
+ ap_MD5Final,
+ ap_MD5Init,
+ ap_MD5Update,
+ ap_acquire_mutex,
+ ap_add_cgi_vars,
+ ap_add_common_vars,
+ ap_add_loaded_module,
+ ap_add_module,
+ ap_add_named_module,
+ ap_add_per_dir_conf,
+ ap_add_per_url_conf,
+ ap_add_version_component,
+ ap_allow_options,
+ ap_allow_overrides,
+ ap_append_arrays,
+ ap_array_cat,
+ ap_auth_name,
+ ap_auth_type,
+ ap_basic_http_header,
+ ap_bclose,
+ ap_bcreate,
+ ap_bfilbuf,
+ ap_bfileno,
+ ap_bflsbuf,
+ ap_bflush,
+ ap_bgetopt,
+ ap_bgets,
+ ap_bhalfduplex,
+ ap_block_alarms,
+ ap_blookc,
+ ap_bnonblock,
+ ap_bonerror,
+ ap_bpushfd,
+ ap_bputs,
+ ap_bread,
+ ap_bsetflag,
+ ap_bsetopt,
+ ap_bskiplf,
+ ap_bspawn_child,
+ ap_bwrite,
+ ap_bytes_in_free_blocks,
+ ap_bytes_in_pool,
+ ap_call_exec,
+ ap_can_exec,
+ ap_cfg_closefile,
+ ap_cfg_getc,
+ ap_cfg_getline,
+ ap_chdir_file,
+ ap_check_alarm,
+ ap_check_cmd_context,
+ ap_checkmask,
+ ap_cleanup_for_exec,
+ ap_clear_module_list,
+ ap_clear_pool,
+ ap_clear_table,
+ ap_close_piped_log,
+ ap_construct_server,
+ ap_construct_url,
+ ap_content_type_tolower,
+ ap_copy_array,
+ ap_copy_array_hdr,
+ ap_copy_table,
+ ap_count_dirs,
+ ap_cpystrn,
+ ap_create_environment,
+ ap_create_mutex,
+ ap_create_per_dir_config,
+ ap_custom_response,
+ ap_default_port_for_request,
+ ap_default_port_for_scheme,
+ ap_default_type,
+ ap_destroy_mutex,
+ ap_destroy_pool,
+ ap_destroy_sub_req,
+ ap_die,
+ ap_discard_request_body,
+ ap_document_root,
+ ap_each_byterange,
+ ap_error_log2stderr,
+ ap_escape_html,
+ ap_escape_path_segment,
+ ap_escape_quotes,
+ ap_escape_shell_cmd,
+ ap_exists_scoreboard_image,
+ ap_finalize_request_protocol,
+ ap_find_command,
+ ap_find_command_in_modules,
+ ap_find_last_token,
+ ap_find_linked_module,
+ ap_find_module_name,
+ ap_find_path_info,
+ ap_find_token,
+ ap_get_basic_auth_pw,
+ ap_get_client_block,
+ ap_get_gmtoff,
+ ap_get_limit_req_body,
+ ap_get_remote_host,
+ ap_get_remote_logname,
+ ap_get_server_built,
+ ap_get_server_name,
+ ap_get_server_port,
+ ap_get_server_version,
+ ap_get_time,
+ ap_get_token,
+ ap_getparents,
+ ap_getword,
+ ap_getword_conf,
+ ap_getword_conf_nc,
+ ap_getword_nc,
+ ap_getword_nulls,
+ ap_getword_nulls_nc,
+ ap_getword_white,
+ ap_getword_white_nc,
+ ap_gm_timestr_822,
+ ap_gname2id,
+ ap_handle_command,
+ ap_hard_timeout,
+ ap_ht_time,
+ ap_ind,
+ ap_index_of_response,
+ ap_init_virtual_host,
+ ap_internal_redirect,
+ ap_internal_redirect_handler,
+ ap_is_directory,
+ ap_is_fnmatch,
+ ap_is_initial_req,
+ ap_is_matchexp,
+ ap_is_url,
+ ap_kill_cleanup,
+ ap_kill_cleanups_for_fd,
+ ap_kill_cleanups_for_socket,
+ ap_kill_timeout,
+ ap_log_assert,
+ ap_log_error_old,
+ ap_log_reason,
+ ap_log_unixerr,
+ ap_make_array,
+ ap_make_dirstr,
+ ap_make_dirstr_parent,
+ ap_make_dirstr_prefix,
+ ap_make_full_path,
+ ap_make_sub_pool,
+ ap_make_table,
+ ap_matches_request_vhost,
+ ap_md5,
+ ap_md5_binary,
+ ap_md5contextTo64,
+ ap_md5digest,
+ ap_meets_conditions,
+ ap_no2slash,
+ ap_note_auth_failure,
+ ap_note_basic_auth_failure,
+ ap_note_cleanups_for_fd,
+ ap_note_cleanups_for_file,
+ ap_note_cleanups_for_socket,
+ ap_note_digest_auth_failure,
+ ap_note_subprocess,
+ ap_open_mutex,
+ ap_open_piped_log,
+ ap_os_escape_path,
+ ap_overlap_tables,
+ ap_overlay_tables,
+ ap_palloc,
+ ap_parseHTTPdate,
+ ap_parse_hostinfo_components,
+ ap_parse_uri,
+ ap_parse_uri_components,
+ ap_pcalloc,
+ ap_pcfg_open_custom,
+ ap_pcfg_openfile,
+ ap_pclosedir,
+ ap_pclosef,
+ ap_pclosesocket,
+ ap_pduphostent,
+ ap_pfclose,
+ ap_pfdopen,
+ ap_pfopen,
+ ap_pgethostbyname,
+ ap_popendir,
+ ap_popenf,
+ ap_pregcomp,
+ ap_pregfree,
+ ap_pregsub,
+ ap_psignature,
+ ap_psocket,
+ ap_pstrdup,
+ ap_pstrndup,
+ ap_push_array,
+ ap_pvsprintf,
+ ap_rationalize_mtime,
+ ap_register_cleanup,
+ ap_release_mutex,
+ ap_remove_loaded_module,
+ ap_remove_module,
+ ap_requires,
+ ap_reset_timeout,
+ ap_rflush,
+ ap_rind,
+ ap_rputc,
+ ap_rputs,
+ ap_run_cleanup,
+ ap_run_sub_req,
+ ap_rwrite,
+ ap_satisfies,
+ ap_scan_script_header_err,
+ ap_scan_script_header_err_buff,
+ ap_scan_script_header_err_core,
+ ap_send_fb,
+ ap_send_fb_length,
+ ap_send_fd,
+ ap_send_fd_length,
+ ap_send_http_header,
+ ap_send_http_trace,
+ ap_send_mmap,
+ ap_send_size,
+ ap_server_root_relative,
+ ap_set_byterange,
+ ap_set_content_length,
+ ap_set_etag,
+ ap_set_keepalive,
+ ap_set_last_modified,
+ ap_setup_client_block,
+ ap_should_client_block,
+ ap_soft_timeout,
+ ap_some_auth_required,
+ ap_spawn_child,
+ ap_srm_command_loop,
+ ap_str_tolower,
+ ap_strcasecmp_match,
+ ap_strcmp_match,
+ ap_sub_req_lookup_file,
+ 

Re: [PHP-CVS] Not able to check-in files - Need help!

2003-01-03 Thread Edin Kadribasic
The check-in from my side seems to work without problems.

Edin

- Original Message - 
From: "Ananth Kesari" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, January 03, 2003 1:07 PM
Subject: Re: [PHP-CVS] Not able to check-in files - Need help!


> I could now check-in most of the files under netware directory except
> the three files that are attached. As per your suggestion, I have
> attached them. Can you please check them in. They are new files that are
> already added.
> 
> Thanks,
> Ananth.
> 
> >>> "Ananth Kesari" <[EMAIL PROTECTED]> 01/03/03 02:07PM >>>
> Hi,
> 
> I downloaded the latest cvs version 1.11.4 and even with this, I have
> the same problem. I could easily commit changes to TSRM and Zend
> areas.
> But when I am trying to commit changes made into the NetWare
> directory,
> I get this error message:
> 
> D:\cvs-4.3\php4\netware>cvs commit apachecore.imp
> assertion "key != NULL" failed: file "hash.c", line 312
> cvs [server aborted]: received abort signal
> cvs commit: saving log message in
> C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\cvs7
> 
> Let me explain in detai:
> What I am trying to do is to commit changes made into 34 files in
> NetWare directory. Out of this 23 are new files.
> When I commit the already existing file, it goes through fine. But
> when
> I commit a new file that I just now added, then I get this error. Even
> when I try to commit in the directory level, stiil the error comes due
> to the presence of the just now added (but yet to be committed) new
> files.
> 
> Please help.
> 
> Thanks,
> Ananth.
> 
> >>> "Edin Kadribasic" <[EMAIL PROTECTED]> 12/20/02 04:17PM >>>
> It seems that you found a bug in the cvs version you're using. Try
> upgrading to a newever one. If you need them checked in quickly you
> can mail them to me.
> 
> Edin
> 
> - Original Message -
> From: "Ananth Kesari" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, December 20, 2002 7:31 AM
> Subject: [PHP-CVS] Not able to check-in files - Need help!
> 
> 
> > Hi,
> >
> > I am checking in some additional files and some modifications
> related
> > to NetWare. I could do so for a couple of files. Now I changed
> quite a
> > few files (about 10) in the NetWare directory and I am doing a cvs
> > commit for the netware directory. This checked in about 2 files
> and now
> > it is giving the following error:
> >
> > D:\cvs-4.3\php4\netware>cvs commit
> > cvs commit: Examining .
> > cvs commit: Examining sys
> > ? sysexits.h
> > assertion "key != NULL" failed: file
> > "/usr/src/gnu/usr.bin/cvs/cvs/../../../../c
> > ontrib/cvs/src/hash.c", line 312
> > cvs [server aborted]: received abort signal
> > cvs commit: saving log message in
> > C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\18
> >
> > I am not able to check-in now. Can someone help?
> >
> > Thanks,
> > Ananth.
> >
> >
> > --
> > PHP CVS Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php 
> >
> >
> >
> 
> 
> -- 
> PHP CVS Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php 
> 
> 
> -- 
> PHP CVS Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php 
> 
> 


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4(PHP_4_3) /ext/standard string.c

2003-01-03 Thread Derick Rethans
derick  Fri Jan  3 07:31:13 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php4/ext/standard  string.c 
  Log:
  - MFH for bug #21311
  
  
Index: php4/ext/standard/string.c
diff -u php4/ext/standard/string.c:1.333.2.5 php4/ext/standard/string.c:1.333.2.6
--- php4/ext/standard/string.c:1.333.2.5Tue Dec 31 11:35:34 2002
+++ php4/ext/standard/string.c  Fri Jan  3 07:31:13 2003
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: string.c,v 1.333.2.5 2002/12/31 16:35:34 sebastian Exp $ */
+/* $Id: string.c,v 1.333.2.6 2003/01/03 12:31:13 derick Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -1399,6 +1399,9 @@
if (Z_TYPE_PP(needle) == IS_STRING) {
if (!Z_STRLEN_PP(needle)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty 
delimiter.");
+   efree(haystack_orig);
+   zval_ptr_dtor(haystack);
+   zval_ptr_dtor(needle);
RETURN_FALSE;
}
 
@@ -3509,11 +3512,12 @@
/* JavaScript & Other HTML scripting languages */
if (state == 1 && *(p-1) == '<') { 
state = 3;
+   lc = c;
} else {
*(rp++) = c;
}   
break;
-   
+
case '?':
 
if (state == 1 && *(p-1)=='<') { 
@@ -3522,13 +3526,28 @@
break;
}
 
+   case 'E':
+   case 'e':
+   /* !DOCTYPE exception */
+   if (state==3 && p > buf+6
+&& tolower(*(p-1)) == 'p'
+&& tolower(*(p-2)) == 'y'
+&& tolower(*(p-3)) == 't'
+&& tolower(*(p-4)) == 'c'
+&& tolower(*(p-5)) == 'o'
+&& tolower(*(p-6)) == 'd') {
+   state = 1;
+   break;
+   }
+   /* fall-through */
+
case 'l':
 
/* swm: If we encounter ' buf+2 && *(p-1) == 'm' && *(p-2) 
+== 'x') {
state = 1;
break;
}



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /main config.nw.h internal_functions_nw.c php.h php_sprintf.c user_streams.c

2003-01-03 Thread Anantha Kesari H Y
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 
+#include 
+#include 
+
+#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 MAG

[PHP-CVS] cvs: php4 /ext/ftp ftp.c

2003-01-03 Thread Anantha Kesari H Y
hyanantha   Fri Jan  3 09:21:19 2003 EDT

  Modified files:  
/php4/ext/ftp   ftp.c 
  Log:
  Modified for NetWare.
  
  
Index: php4/ext/ftp/ftp.c
diff -u php4/ext/ftp/ftp.c:1.69 php4/ext/ftp/ftp.c:1.70
--- php4/ext/ftp/ftp.c:1.69 Tue Dec 31 11:06:37 2002
+++ php4/ext/ftp/ftp.c  Fri Jan  3 09:21:17 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: ftp.c,v 1.69 2002/12/31 16:06:37 sebastian Exp $ */
+/* $Id: ftp.c,v 1.70 2003/01/03 14:21:17 hyanantha Exp $ */
 
 #include "php.h"
 
@@ -67,6 +67,11 @@
 
 #include "ftp.h"
 #include "ext/standard/fsock.h"
+
+/* Additional headers for NetWare */
+#if defined(NETWARE) && defined(NEW_LIBC) && !defined(USE_WINSOCK)
+#include 
+#endif
 
 /* sends an ftp command, returns true on success, false on error.
  * it sends the string "cmd args\r\n" if args is non-null, or



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/ldap ldap.mak

2003-01-03 Thread Anantha Kesari H Y
hyanantha   Fri Jan  3 09:21:40 2003 EDT

  Modified files:  
/php4/ext/ldap  ldap.mak 
  Log:
  Modified for NetWare.
  
  
Index: php4/ext/ldap/ldap.mak
diff -u php4/ext/ldap/ldap.mak:1.1 php4/ext/ldap/ldap.mak:1.2
--- php4/ext/ldap/ldap.mak:1.1  Thu Sep  5 07:26:05 2002
+++ php4/ext/ldap/ldap.mak  Fri Jan  3 09:21:40 2003
@@ -4,10 +4,10 @@
 
 # Module details
 MODULE_NAME = php_ldap
-MODULE_DESC = "PHP LDAP Extension"
-VMAJ = 0
-VMIN = 60
-VREV = 1
+MODULE_DESC = "PHP 4.3 - LDAP Extension"
+VMAJ = 3
+VMIN = 0
+VREV = 0
 
 #include the common settings
 include $(PROJECT_ROOT)/netware/common.mif
@@ -44,12 +44,14 @@
 C_FLAGS += -wchar_t on -bool on
 C_FLAGS += -processor Pentium
 C_FLAGS += -nostdinc -nosyspath
+C_FLAGS += -relax_pointers # To remove type-casting errors
 C_FLAGS += -DNETWARE -DZTS
 C_FLAGS += -DNEW_LIBC
-C_FLAGS += -DCOMPILE_DL_LDAP -DCOMPILE_DL=1
-C_FLAGS += -I. -I$(PROJECT_ROOT)/main -I$(PROJECT_ROOT)/ext/standard 
-I$(PROJECT_ROOT) -I$(PROJECT_ROOT)/netware
+C_FLAGS += -DCOMPILE_DL_LDAP
+C_FLAGS += -I. -I- -I$(PROJECT_ROOT) -I$(PROJECT_ROOT)/main
+C_FLAGS += -I$(PROJECT_ROOT)/ext/standard -I$(PROJECT_ROOT)/netware
 C_FLAGS += -I$(PROJECT_ROOT)/zend -I$(PROJECT_ROOT)/tsrm
-C_FLAGS += -I- -I$(SDK_DIR)/include -I$(MWCIncludes)
+C_FLAGS += -I$(SDK_DIR)/include -I$(MWCIncludes)
 C_FLAGS += -I$(LDAP_DIR)/inc
 C_FLAGS += -I$(WINSOCK_DIR)/include/nlm -I$(WINSOCK_DIR)/include
 
@@ -81,10 +83,6 @@
  @$(MPK_DIR)/import/mpkOrg.imp   \
  @$(LDAP_DIR)/lib/nlm/Ldapsdk.imp\
  @$(PROJECT_ROOT)/netware/phplib.imp
-#EXPORT = get_module
-#EXPORT = ldap_functions\
-# ldap_module_entry \
-# ($(MODULE_NAME).nlm) get_module
 EXPORT = ($(MODULE_NAME)) get_module
 API =  OutputToScreen
 
@@ -122,7 +120,7 @@
@$(CC) $< $(C_FLAGS) -o $@
 
 
-$(BINARY): $(DEPDS) $(OBJECTS)
+$(BINARY): $(OBJECTS)
@echo Import $(IMPORT) > $(basename $@).def
 ifdef API
@echo Import $(API) >> $(basename $@).def
@@ -136,8 +134,10 @@
@echo Debug >> $(basename $@).def
 endif
@echo Flag_On 0x0008 >> $(basename $@).def
-   @echo Start _NonAppStart >> $(basename $@).def
-   @echo Exit _NonAppStop >> $(basename $@).def
+#  @echo Start _NonAppStart >> $(basename $@).def
+#  @echo Exit _NonAppStop >> $(basename $@).def
+   @echo Start _LibCPrelude >> $(basename $@).def
+   @echo Exit _LibCPostlude >> $(basename $@).def
 
$(MPKTOOL) $(XDCFLAGS) $(basename $@).xdc
@echo xdcdata $(basename $@).xdc >> $(basename $@).def
@@ -150,7 +150,7 @@
 
 
 .PHONY: clean
-clean: cleand cleanobj cleanbin
+clean: cleanobj cleanbin
 
 .PHONY: cleand
 cleand:



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/mysql mysql.mak

2003-01-03 Thread Anantha Kesari H Y
hyanantha   Fri Jan  3 09:23:38 2003 EDT

  Modified files:  
/php4/ext/mysql mysql.mak 
  Log:
  Modified for NetWare.
  
  
Index: php4/ext/mysql/mysql.mak
diff -u php4/ext/mysql/mysql.mak:1.1 php4/ext/mysql/mysql.mak:1.2
--- php4/ext/mysql/mysql.mak:1.1Fri Jul 12 08:55:56 2002
+++ php4/ext/mysql/mysql.makFri Jan  3 09:23:38 2003
@@ -4,9 +4,9 @@
 
 # Module details
 MODULE_NAME = phpmysql
-MODULE_DESC = "PHP MySQL Extension"
-VMAJ = 0
-VMIN = 60
+MODULE_DESC = "PHP 4.2.3 - MySQL Extension"
+VMAJ = 3
+VMIN = 0
 VREV = 0
 
 #include the common settings
@@ -47,13 +47,15 @@
 endif
 
 # Compile flags
-C_FLAGS  = -c -maxerrors 25 -msgstyle gcc -wchar_t on -bool on -processor Pentium 
-align 1
+C_FLAGS  = -c -maxerrors 25 -msgstyle gcc -wchar_t on -bool on -processor Pentium
 C_FLAGS += -nostdinc -nosyspath  
-C_FLAGS += -DNETWARE -DZTS -DNEW_LIBC -DUSE_OLD_FUNCTIONS -DCOMPILE_DL=1
-C_FLAGS += -I. -I$(PROJECT_ROOT)/main -I$(PROJECT_ROOT)/ext/standard 
-I$(PROJECT_ROOT) -I$(PROJECT_ROOT)/netware
+C_FLAGS += -relax_pointers # To remove type-casting errors
+C_FLAGS += -DNETWARE -DZTS -DNEW_LIBC -DUSE_OLD_FUNCTIONS -DCOMPILE_DL_MYSQL=1
+C_FLAGS += -I. -I- -I$(PROJECT_ROOT) -I$(PROJECT_ROOT)/main
+C_FLAGS += -I$(PROJECT_ROOT)/ext/standard -I$(PROJECT_ROOT)/netware
 C_FLAGS += -I$(PROJECT_ROOT)/zend -I$(PROJECT_ROOT)/tsrm
-C_FLAGS += -I- -I$(SDK_DIR)/include -I$(MWCIncludes)
-C_FLAGS += -I$(MYSQL_DIR)/include -DCOMPILE_DL_MYSQL=1
+C_FLAGS += -I$(SDK_DIR)/include -I$(MWCIncludes)
+C_FLAGS += -I$(MYSQL_DIR)/include
 C_FLAGS += -I$(WINSOCK_DIR)/include/nlm -I$(WINSOCK_DIR)/include
 
 
@@ -79,10 +81,6 @@
  @$(SDK_DIR)/imports/ws2nlm.imp  \
  @$(MPK_DIR)/import/mpkOrg.imp   \
  @$(PROJECT_ROOT)/netware/phplib.imp
-
-#EXPORT = mysql_functions\
-# mysql_module_entry \
-# ($(MODULE_NAME).nlm) get_module
 EXPORT = ($(MODULE_NAME)) get_module
 API = OutputToScreen
 
@@ -119,7 +117,7 @@
@$(CC) $< $(C_FLAGS) -o $@
 
 
-$(BINARY): $(DEPDS) $(OBJECTS)
+$(BINARY): $(OBJECTS)
@echo Import $(IMPORT) > $(basename $@).def
 ifdef API
@echo Import $(API) >> $(basename $@).def
@@ -133,8 +131,13 @@
@echo Debug >> $(basename $@).def
 endif
@echo Flag_On 0x0008 >> $(basename $@).def
-   @echo Start _NonAppStart >> $(basename $@).def
-   @echo Exit _NonAppStop >> $(basename $@).def
+#  @echo Start _NonAppStart >> $(basename $@).def
+#  @echo Exit _NonAppStop >> $(basename $@).def
+   @echo Start _LibCPrelude >> $(basename $@).def
+   @echo Exit _LibCPostlude >> $(basename $@).def
+
+   $(MPKTOOL) $(XDCFLAGS) $(basename $@).xdc
+   @echo xdcdata $(basename $@).xdc >> $(basename $@).def
 
@echo Linking $@...
@echo $(LD_FLAGS) -commandfile $(basename $@).def > $(basename $@).link
@@ -143,7 +146,7 @@
 
 
 .PHONY: clean
-clean: cleand cleanobj cleanbin
+clean: cleanobj cleanbin
 
 .PHONY: cleand
 cleand:



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/session mod_files.c session.c

2003-01-03 Thread Anantha Kesari H Y
hyanantha   Fri Jan  3 09:24:07 2003 EDT

  Modified files:  
/php4/ext/session   mod_files.c session.c 
  Log:
  Modified for NetWare.
  
  
Index: php4/ext/session/mod_files.c
diff -u php4/ext/session/mod_files.c:1.85 php4/ext/session/mod_files.c:1.86
--- php4/ext/session/mod_files.c:1.85   Tue Dec 31 11:07:25 2002
+++ php4/ext/session/mod_files.cFri Jan  3 09:24:07 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: mod_files.c,v 1.85 2002/12/31 16:07:25 sebastian Exp $ */
+/* $Id: mod_files.c,v 1.86 2003/01/03 14:24:07 hyanantha Exp $ */
 
 #include "php.h"
 
@@ -172,7 +172,11 @@
DIR *dir;
char dentry[sizeof(struct dirent) + MAXPATHLEN];
struct dirent *entry = (struct dirent *) &dentry;
+#if defined(NETWARE) && defined(CLIB_STAT_PATCH)
+   struct stat_libc sbuf;
+#else
struct stat sbuf;
+#endif
char buf[MAXPATHLEN];
time_t now;
int nrdels = 0;
@@ -206,7 +210,11 @@
buf[dirname_len + entry_len + 1] = '\0';
/* check whether its last access was more than 
maxlifet ago */
if (VCWD_STAT(buf, &sbuf) == 0 && 
+#if defined(NETWARE) && defined(CLIB_STAT_PATCH)
+   (now - (sbuf.st_mtime).tv_sec) > 
+maxlifetime) {
+#else
(now - sbuf.st_mtime) > maxlifetime) {
+#endif
VCWD_UNLINK(buf);
nrdels++;
}
@@ -258,7 +266,11 @@
 PS_READ_FUNC(files)
 {
long n;
+#if defined(NETWARE) && defined(CLIB_STAT_PATCH)
+   struct stat_libc sbuf;
+#else
struct stat sbuf;
+#endif
PS_FILES_DATA;
 
ps_files_open(data, key TSRMLS_CC);
Index: php4/ext/session/session.c
diff -u php4/ext/session/session.c:1.342 php4/ext/session/session.c:1.343
--- php4/ext/session/session.c:1.342Tue Dec 31 11:07:26 2002
+++ php4/ext/session/session.c  Fri Jan  3 09:24:07 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: session.c,v 1.342 2002/12/31 16:07:26 sebastian Exp $ */
+/* $Id: session.c,v 1.343 2003/01/03 14:24:07 hyanantha Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -729,7 +729,11 @@
 static void last_modified(TSRMLS_D)
 {
const char *path;
+#if defined(NETWARE) && defined(CLIB_STAT_PATCH)
+   struct stat_libc sb;
+#else
struct stat sb;
+#endif
char buf[MAX_STR + 1];

path = SG(request_info).path_translated;
@@ -740,7 +744,11 @@
 
 #define LAST_MODIFIED "Last-Modified: "
memcpy(buf, LAST_MODIFIED, sizeof(LAST_MODIFIED) - 1);
+#ifdef NETWARE
+   strcpy_gmt(buf + sizeof(LAST_MODIFIED) - 1, &((sb.st_mtime).tv_sec));
+#else
strcpy_gmt(buf + sizeof(LAST_MODIFIED) - 1, &sb.st_mtime);
+#endif
ADD_COOKIE(buf);
}
 }



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/xml xml.mak

2003-01-03 Thread Anantha Kesari H Y
hyanantha   Fri Jan  3 09:24:35 2003 EDT

  Added files: 
/php4/ext/xml   xml.mak 
  Log:
  New file added for NetWare.
  
  

Index: php4/ext/xml/xml.mak
+++ php4/ext/xml/xml.mak
# Temporarily here -- later may go into some batch file
# which will set this as an environment variable
PROJECT_ROOT = ..\..

# Module details
MODULE_NAME = php_xml
MODULE_DESC = "PHP 4.3 - XML Extension"
VMAJ = 3
VMIN = 0
VREV = 0

#include the common settings
include $(PROJECT_ROOT)/netware/common.mif

# Extensions of all input and output files
SUFFIXES:
SUFFIXES: .nlm .lib .obj .cpp .c .msg .mlc .mdb .xdc .d

# Source files
C_SRC = xml.c \
start.c

CPP_SRC_NODIR = $(notdir $(CPP_SRC))
C_SRC_NODIR = $(notdir $(C_SRC))
SRC_DIR = $(dir $(CPP_SRC) $(C_SRC))

# Library files
LIBRARY = 

# Destination directories and files
OBJ_DIR = $(BUILD)
FINAL_DIR = $(BUILD)
MAP_FILE = $(FINAL_DIR)\$(MODULE_NAME).map
OBJECTS  = $(addprefix $(OBJ_DIR)/,$(CPP_SRC_NODIR:.c=.obj) $(C_SRC_NODIR:.c=.obj))
DEPDS  = $(addprefix $(OBJ_DIR)/,$(CPP_SRC_NODIR:.c=.d) $(C_SRC_NODIR:.c=.d))

# Binary file
ifndef BINARY
BINARY=$(FINAL_DIR)\$(MODULE_NAME).nlm
endif

# Compile flags
C_FLAGS += -c -maxerrors 25 -msgstyle gcc
C_FLAGS += -wchar_t on -bool on
C_FLAGS += -processor Pentium
C_FLAGS += -nostdinc -nosyspath
C_FLAGS += -relax_pointers  # To remove type-casting errors
C_FLAGS += -DNETWARE -DZTS
C_FLAGS += -DNEW_LIBC
C_FLAGS += -DCOMPILE_DL_XML -DHAVE_LIBEXPAT=1
C_FLAGS += -I. -I- -I$(PROJECT_ROOT) -I$(PROJECT_ROOT)/main
C_FLAGS += -I$(PROJECT_ROOT)/ext/standard -I$(PROJECT_ROOT)/netware
C_FLAGS += -I$(PROJECT_ROOT)/zend -I$(PROJECT_ROOT)/tsrm
C_FLAGS += -I$(SDK_DIR)/include -I$(MWCIncludes)
C_FLAGS += -I$(EXPAT_DIR)/include

ifndef STACK_SIZE
STACK_SIZE=8192
endif

# Extra stuff based on debug / release builds
ifeq '$(BUILD)' 'debug'
SYM_FILE = $(FINAL_DIR)\$(MODULE_NAME).sym
C_FLAGS  += -inline smart -sym on -sym codeview4 -opt off -opt intrinsics -sym 
internal -DDEBUGGING -DDKFBPON
C_FLAGS += -exc cw -DZEND_DEBUG=1
LD_FLAGS += -sym on -sym codeview4 -osym $(SYM_FILE)
export MWLibraryFiles=$(SDK_DIR)/imports/libcpre.o;mwcrtld.lib
else
C_FLAGS  += -opt speed -inline on -inline smart -inline auto -sym off
C_FLAGS += -opt intrinsics
C_FLAGS += -opt level=4 -DZEND_DEBUG=0
LD_FLAGS += -sym off
export MWLibraryFiles=$(SDK_DIR)/imports/libcpre.o;mwcrtl.lib
endif

# Dependencies
MODULE = LibC \
 expatlbc \
 phplib
IMPORT = @$(SDK_DIR)/imports/libc.imp\
 @$(SDK_DIR)/imports/ws2nlm.imp  \
 @$(MPK_DIR)/import/mpkOrg.imp   \
 @$(EXPAT_DIR)/imports/expatlbc.imp \
 @$(PROJECT_ROOT)/netware/phplib.imp
EXPORT = ($(MODULE_NAME)) get_module
API =  OutputToScreen


# Virtual paths
vpath %.cpp .
vpath %.c . ..\..\netware
vpath %.obj $(OBJ_DIR)


all: prebuild project

PHONY: all

prebuild:
@if not exist $(OBJ_DIR) md $(OBJ_DIR)

project: $(BINARY)
@echo Build complete.

$(OBJ_DIR)/%.d: %.cpp
@echo Building Dependencies for $( $(basename $@).def
ifdef API
@echo Import $(API) >> $(basename $@).def
endif
@echo Module $(MODULE) >> $(basename $@).def
ifdef EXPORT
@echo Export $(EXPORT) >> $(basename $@).def
endif
@echo AutoUnload >> $(basename $@).def
ifeq '$(BUILD)' 'debug'
@echo Debug >> $(basename $@).def
endif
@echo Flag_On 0x0008 >> $(basename $@).def
#   @echo Start _NonAppStart >> $(basename $@).def
#   @echo Exit _NonAppStop >> $(basename $@).def
@echo Start _LibCPrelude >> $(basename $@).def
@echo Exit _LibCPostlude >> $(basename $@).def

$(MPKTOOL) $(XDCFLAGS) $(basename $@).xdc
@echo xdcdata $(basename $@).xdc >> $(basename $@).def

@echo Linking $@...
@echo $(LD_FLAGS) -commandfile $(basename $@).def > $(basename $@).link
@echo $(LIBRARY) $(OBJECTS) >> $(basename $@).link

@$(LINK) @$(basename $@).link


PHONY: clean
clean: cleanobj cleanbin

PHONY: cleand
cleand:
@echo Deleting all dependency files...
-@del "$(OBJ_DIR)\*.d"

PHONY: cleanobj
cleanobj:
@echo Deleting all object files...
-@del "$(OBJ_DIR)\*.obj"

PHONY: cleanbin
cleanbin:
@echo Deleting binary files...
-@del "$(FINAL_DIR)\$(MODULE_NAME).nlm"
@echo Deleting MAP, DEF files, etc
-@del "$(FINAL_DIR)\$(MODULE_NAME).map"
-@del "$(FINAL_DIR)\$(MODULE_NAME).def"
-@del "$(FINAL_DIR)\$(MODULE_NAME).link"
ifeq '$(BUILD)' 'debug'
-@del $(FINAL_DIR)\$(MODULE_NAME).sym
endif



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-CVS] cvs: php4 /ext/ldap ldap.mak

2003-01-03 Thread Derick Rethans
On Fri, 3 Jan 2003, Anantha Kesari H Y wrote:

> hyanantha Fri Jan  3 09:21:40 2003 EDT
> 
>   Modified files:  
> /php4/ext/ldapldap.mak 
>   Log:
>   Modified for NetWare.
>   
>   
>   @echo Flag_On 0x0008 >> $(basename $@).def
> - @echo Start _NonAppStart >> $(basename $@).def
> - @echo Exit _NonAppStop >> $(basename $@).def
> +#@echo Start _NonAppStart >> $(basename $@).def
> +#@echo Exit _NonAppStop >> $(basename $@).def

Why didn't you just remove those two lines? CVS is there to keep track 
of changes...

Derick

-- 

-
 Derick Rethans http://derickrethans.nl/ 
 PHP Magazine - PHP Magazine for Professionals   http://php-mag.net/
-


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/xml xml.mak

2003-01-03 Thread Anantha Kesari H Y
hyanantha   Fri Jan  3 09:29:14 2003 EDT

  Modified files:  
/php4/ext/xml   xml.mak 
  Log:
  Modified for NetWare.
  
  
Index: php4/ext/xml/xml.mak
diff -u php4/ext/xml/xml.mak:1.1 php4/ext/xml/xml.mak:1.2
--- php4/ext/xml/xml.mak:1.1Fri Jan  3 09:24:34 2003
+++ php4/ext/xml/xml.makFri Jan  3 09:29:14 2003
@@ -133,8 +133,6 @@
@echo Debug >> $(basename $@).def
 endif
@echo Flag_On 0x0008 >> $(basename $@).def
-#  @echo Start _NonAppStart >> $(basename $@).def
-#  @echo Exit _NonAppStop >> $(basename $@).def
@echo Start _LibCPrelude >> $(basename $@).def
@echo Exit _LibCPostlude >> $(basename $@).def
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/ldap ldap.mak

2003-01-03 Thread Anantha Kesari H Y
hyanantha   Fri Jan  3 09:29:37 2003 EDT

  Modified files:  
/php4/ext/ldap  ldap.mak 
  Log:
  Modified for NetWare.
  
  
Index: php4/ext/ldap/ldap.mak
diff -u php4/ext/ldap/ldap.mak:1.2 php4/ext/ldap/ldap.mak:1.3
--- php4/ext/ldap/ldap.mak:1.2  Fri Jan  3 09:21:40 2003
+++ php4/ext/ldap/ldap.mak  Fri Jan  3 09:29:37 2003
@@ -134,8 +134,6 @@
@echo Debug >> $(basename $@).def
 endif
@echo Flag_On 0x0008 >> $(basename $@).def
-#  @echo Start _NonAppStart >> $(basename $@).def
-#  @echo Exit _NonAppStop >> $(basename $@).def
@echo Start _LibCPrelude >> $(basename $@).def
@echo Exit _LibCPostlude >> $(basename $@).def
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/iconv iconv.c

2003-01-03 Thread Moriyoshi Koizumi
moriyoshi   Fri Jan  3 09:29:49 2003 EDT

  Modified files:  
/php4/ext/iconv iconv.c 
  Log:
  Added offset validity check for iconv_strpos()
  
  
Index: php4/ext/iconv/iconv.c
diff -u php4/ext/iconv/iconv.c:1.74 php4/ext/iconv/iconv.c:1.75
--- php4/ext/iconv/iconv.c:1.74 Fri Jan  3 00:38:50 2003
+++ php4/ext/iconv/iconv.c  Fri Jan  3 09:29:49 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: iconv.c,v 1.74 2003/01/03 05:38:50 moriyoshi Exp $ */
+/* $Id: iconv.c,v 1.75 2003/01/03 14:29:49 moriyoshi Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -1590,6 +1590,11 @@
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|ls",
&haystk, &haystk_len, &ndl, &ndl_len,
&offset, &charset, &charset_len) == FAILURE) {
+   RETURN_FALSE;
+   }
+
+   if (offset < 0) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Offset not contained in 
+string.");
RETURN_FALSE;
}
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/mysql mysql.mak

2003-01-03 Thread Anantha Kesari H Y
hyanantha   Fri Jan  3 09:29:57 2003 EDT

  Modified files:  
/php4/ext/mysql mysql.mak 
  Log:
  Modified for NetWare.
  
  
Index: php4/ext/mysql/mysql.mak
diff -u php4/ext/mysql/mysql.mak:1.2 php4/ext/mysql/mysql.mak:1.3
--- php4/ext/mysql/mysql.mak:1.2Fri Jan  3 09:23:38 2003
+++ php4/ext/mysql/mysql.makFri Jan  3 09:29:57 2003
@@ -131,8 +131,6 @@
@echo Debug >> $(basename $@).def
 endif
@echo Flag_On 0x0008 >> $(basename $@).def
-#  @echo Start _NonAppStart >> $(basename $@).def
-#  @echo Exit _NonAppStop >> $(basename $@).def
@echo Start _LibCPrelude >> $(basename $@).def
@echo Exit _LibCPostlude >> $(basename $@).def
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /netware phplib.mak

2003-01-03 Thread Anantha Kesari H Y
hyanantha   Fri Jan  3 09:31:32 2003 EDT

  Modified files:  
/php4/netware   phplib.mak 
  Log:
  Modified for NetWare.
  
  
Index: php4/netware/phplib.mak
diff -u php4/netware/phplib.mak:1.2 php4/netware/phplib.mak:1.3
--- php4/netware/phplib.mak:1.2 Fri Jan  3 06:46:20 2003
+++ php4/netware/phplib.mak Fri Jan  3 09:31:31 2003
@@ -82,6 +82,7 @@
 ext/standard/exec.c \
 ext/standard/file.c \
 ext/standard/filestat.c \
+ext/standard/filters.c \
 ext/standard/flock_compat.c \
 ext/standard/formatted_print.c \
 ext/standard/fsock.c \
@@ -116,6 +117,7 @@
 ext/standard/strnatcmp.c \
 ext/standard/type.c \
 ext/standard/uniqid.c \
+ext/standard/user_filters.c \
 ext/standard/url.c \
 ext/standard/url_scanner.c \
 ext/standard/url_scanner_ex.c \
@@ -303,8 +305,6 @@
@echo Debug >> $(basename $@).def
 endif
@echo Flag_On 0x0008 >> $(basename $@).def
-#  @echo Start _NonAppStart >> $(basename $@).def
-#  @echo Exit _NonAppStop >> $(basename $@).def
@echo Start _LibCPrelude >> $(basename $@).def
@echo Exit _LibCPostlude >> $(basename $@).def
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/standard exec.c file.c filestat.c html.c syslog.c

2003-01-03 Thread Anantha Kesari H Y
hyanantha   Fri Jan  3 09:37:43 2003 EDT

  Modified files:  
/php4/ext/standard  exec.c file.c filestat.c html.c syslog.c 
  Log:
  Modified for NetWare.
  
  
Index: php4/ext/standard/exec.c
diff -u php4/ext/standard/exec.c:1.88 php4/ext/standard/exec.c:1.89
--- php4/ext/standard/exec.c:1.88   Tue Dec 31 11:07:38 2002
+++ php4/ext/standard/exec.cFri Jan  3 09:37:40 2003
@@ -15,7 +15,7 @@
| Author: Rasmus Lerdorf   |
+--+
  */
-/* $Id: exec.c,v 1.88 2002/12/31 16:07:38 sebastian Exp $ */
+/* $Id: exec.c,v 1.89 2003/01/03 14:37:40 hyanantha Exp $ */
 
 #include 
 #include "php.h"
@@ -895,6 +895,18 @@
 
child = pi.hProcess;
CloseHandle(pi.hThread);
+
+#elif defined(NETWARE)
+
+   /* clean up all the descriptors */
+   for (i = 0; i < ndesc; i++) {
+   close(descriptors[i].childend);
+   close(descriptors[i].parentend);
+   }
+
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "fork not supported on NetWare");
+
+   goto exit_fail;
 
 #else
/* the unix way */
Index: php4/ext/standard/file.c
diff -u php4/ext/standard/file.c:1.285 php4/ext/standard/file.c:1.286
--- php4/ext/standard/file.c:1.285  Fri Jan  3 03:02:35 2003
+++ php4/ext/standard/file.cFri Jan  3 09:37:41 2003
@@ -21,7 +21,7 @@
+--+
  */
 
-/* $Id: file.c,v 1.285 2003/01/03 08:02:35 pollita Exp $ */
+/* $Id: file.c,v 1.286 2003/01/03 14:37:41 hyanantha Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -54,6 +54,7 @@
 #include "netware/param.h"
 #else
 #include 
+#include 
 #if defined(NETWARE) && defined(USE_WINSOCK)
 #include 
 #else
@@ -1979,9 +1980,16 @@
MAKE_LONG_ZVAL_INCREF(stat_rdev, -1); 
 #endif
MAKE_LONG_ZVAL_INCREF(stat_size, stat_ssb.sb.st_size);
+#if defined(NETWARE) && defined(CLIB_STAT_PATCH)
+   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
Index: php4/ext/standard/filestat.c
diff -u php4/ext/standard/filestat.c:1.114 php4/ext/standard/filestat.c:1.115
--- php4/ext/standard/filestat.c:1.114  Tue Dec 31 11:07:40 2002
+++ php4/ext/standard/filestat.cFri Jan  3 09:37:41 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: filestat.c,v 1.114 2002/12/31 16:07:40 sebastian Exp $ */
+/* $Id: filestat.c,v 1.115 2003/01/03 14:37:41 hyanantha Exp $ */
 
 #include "php.h"
 #include "safe_mode.h"
@@ -664,26 +664,30 @@
case FS_INODE:
RETURN_LONG((long)BG(sb).st_ino);
case FS_SIZE:
+#if defined(NETWARE) && defined(NEW_LIBC)
+   RETURN_LONG((long)(stat_sb->st_size));
+#else
RETURN_LONG((long)BG(sb).st_size);
+#endif
case FS_OWNER:
RETURN_LONG((long)BG(sb).st_uid);
case FS_GROUP:
RETURN_LONG((long)BG(sb).st_gid);
case FS_ATIME:
 #if defined(NETWARE) && defined(NEW_LIBC)
-   RETURN_LONG((long)(BG(sb).st_atime).tv_nsec);
+   RETURN_LONG((long)((stat_sb->st_atime).tv_sec));
 #else
RETURN_LONG((long)BG(sb).st_atime);
 #endif
case FS_MTIME:
 #if defined(NETWARE) && defined(NEW_LIBC)
-   RETURN_LONG((long)(BG(sb).st_mtime).tv_nsec);
+   RETURN_LONG((long)((stat_sb->st_mtime).tv_sec));
 #else
-   RETURN_LONG((long)BG(sb).st_mtime);
+   RETURN_LONG((long)BG(sb).st_mtime);
 #endif
case FS_CTIME:
 #if defined(NETWARE) && defined(NEW_LIBC)
-   RETURN_LONG((long)(BG(sb).st_ctime).tv_nsec);
+   RETURN_LONG((long)((stat_sb->st_ctime).tv_sec));
 #else
RETURN_LONG((long)BG(sb).st_ctime);
 #endif
@@ -706,28 +710,25 @@
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown file type (%d)", 
BG(sb).st_mode&S_IFMT);
RETURN_STRING("unknown", 1);
case FS_IS_W:
-#ifdef NETWARE
-   RETURN_LONG(0);
-#endif
+   #ifndef NETWARE /* getuid is not available on NetWare */
if (getuid()==0) {
RETURN_TRUE; /* root */
}
+   #endif  /* NETWARE */
RETURN_BOOL((BG(sb).st_mode & wmask) != 0);
case FS_IS_R:
-#ifdef NETWARE
-   RETURN_LONG(0);
-#endif
+   #ifndef NETWARE /* getuid is not available on NetWare */
   

[PHP-CVS] cvs: php4 /win32 sendmail.c sendmail.h

2003-01-03 Thread Anantha Kesari H Y
hyanantha   Fri Jan  3 10:17:44 2003 EDT

  Modified files:  
/php4/win32 sendmail.c sendmail.h 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/win32/sendmail.c
diff -u php4/win32/sendmail.c:1.51 php4/win32/sendmail.c:1.52
--- php4/win32/sendmail.c:1.51  Sat Dec 28 14:40:03 2002
+++ php4/win32/sendmail.c   Fri Jan  3 10:17:43 2003
@@ -17,17 +17,23 @@
  *
  */
 
-/* $Id: sendmail.c,v 1.51 2002/12/28 19:40:03 pollita Exp $ */
+/* $Id: sendmail.c,v 1.52 2003/01/03 15:17:43 hyanantha Exp $ */
 
 #include "php.h"   /*php specific */
 #include 
 #include 
+#ifndef NETWARE
 #include 
+#else  /* NETWARE */
+#include 
+#endif /* NETWARE */
 #include "time.h"
 #include 
+#ifndef NETWARE
 #include 
 #include 
 #include 
+#endif /* NETWARE */
 #include "sendmail.h"
 #include "php_ini.h"
 
@@ -69,17 +75,25 @@
 
 /* socket related data */
 SOCKET sc;
+#ifndef NETWARE
 WSADATA Data;
 struct hostent *adr;
+#endif /* NETWARE */
 SOCKADDR_IN sock_in;
+#ifndef NETWARE
 int WinsockStarted;
 /* values set by the constructor */
 char *AppName;
+#endif /* NETWARE */
 char MailHost[HOST_NAME_LEN];
 char LocalHost[HOST_NAME_LEN];
 #endif
 char seps[] = " ,\t\n";
+#ifndef NETWARE
 char *php_mailer = "PHP 4 WIN32";
+#else
+char *php_mailer = "PHP 4 NetWare";
+#endif /* NETWARE */
 
 char *get_header(char *h, char *headers);
 
@@ -201,7 +215,9 @@
char *headers_lc = NULL; /* headers_lc is only created if we've a header at 
all */
TSRMLS_FETCH();
 
+#ifndef NETWARE
WinsockStarted = FALSE;
+#endif
 
if (host == NULL) {
*error = BAD_MAIL_HOST;
@@ -305,7 +321,14 @@
*/
 
shutdown(sc, 0); 
+#ifndef NETWARE
closesocket(sc);
+#else
+   /* closesocket commented out since it was giving undefined symbol linker error
+* close added in its place
+*/
+   close(sc);
+#endif /* NETWARE */
 }
 
 
@@ -775,7 +798,11 @@
 // Author/Date:  jcar 20/9/96
 // History:
 ///
+#ifndef NETWARE
 int Post(LPCSTR msg)
+#else
+int Post(char *msg)
+#endif
 {
int len = strlen(msg);
int slen;
@@ -862,7 +889,11 @@
 // Author/Date:  jcar 20/9/96
 // History:
 ///
+#ifndef NETWARE
 unsigned long GetAddr(LPSTR szHost)
+#else
+unsigned long GetAddr(char * szHost)
+#endif
 {
LPHOSTENT lpstHost;
u_long lAddr = INADDR_ANY;
@@ -878,7 +909,11 @@
 
lpstHost = gethostbyname(szHost);
if (lpstHost) { /* success */
+#ifndef NETWARE
lAddr = *((u_long FAR *) (lpstHost->h_addr));
+#else
+   lAddr = *((u_long *) (lpstHost->h_addr));
+#endif /* NETWARE */
} else {
lAddr = INADDR_ANY; /* failure */
}
Index: php4/win32/sendmail.h
diff -u php4/win32/sendmail.h:1.11 php4/win32/sendmail.h:1.12
--- php4/win32/sendmail.h:1.11  Fri Dec  6 17:56:57 2002
+++ php4/win32/sendmail.h   Fri Jan  3 10:17:43 2003
@@ -1,6 +1,8 @@
 #if !defined(sendmail_h)   /* Sentry, use file only if it's not already 
included. */
 #define sendmail_h
+#ifndef NETWARE
 #include 
+#endif
 
 #define HOST_NAME_LEN  256
 #define MAX_APPNAME_LENGHT 100
@@ -42,9 +44,17 @@
 
 int MailConnect();
 int PostHeader(char *, char *, char *, char *);
-int Post(LPCSTR);
+#ifndef NETWARE
+int Post(LPCSTR msg);
+#else
+int Post(char *msg);
+#endif
 int Ack(char **server_response);
+#ifndef NETWARE
 unsigned long GetAddr(LPSTR szHost);
+#else
+unsigned long GetAddr(char * szHost);
+#endif
 
 
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /netware phplib.imp phplib.mak sendmail.c sendmail.h

2003-01-03 Thread Anantha Kesari H Y
hyanantha   Fri Jan  3 10:21:33 2003 EDT

  Removed files:   
/php4/netware   sendmail.c sendmail.h 

  Modified files:  
/php4/netware   phplib.imp phplib.mak 
  Log:
  Some existing files modified and a couple of files removed for NetWare.
  
  
Index: php4/netware/phplib.imp
diff -u php4/netware/phplib.imp:1.3 php4/netware/phplib.imp:1.4
--- php4/netware/phplib.imp:1.3 Fri Jan  3 06:46:20 2003
+++ php4/netware/phplib.imp Fri Jan  3 10:21:33 2003
@@ -9,7 +9,6 @@
 _object_and_properties_init,
 _object_init,
 _object_init_ex,
-_persist_alloc,
 _zend_get_parameters_array,
 _zend_list_addref,
 _zend_list_delete,
@@ -55,10 +54,7 @@
 php_check_open_basedir,
 php_checkuid,
 php_execute_script,
-php_file_le_fopen,
 php_fopen_primary_script,
-php_fopen_wrapper,
-php_fread_all,
 php_handle_aborted_connection,
 php_handle_special_queries,
 php_body_write,
Index: php4/netware/phplib.mak
diff -u php4/netware/phplib.mak:1.3 php4/netware/phplib.mak:1.4
--- php4/netware/phplib.mak:1.3 Fri Jan  3 09:31:31 2003
+++ php4/netware/phplib.mak Fri Jan  3 10:21:33 2003
@@ -336,6 +336,7 @@
@echo $(wordlist 126, 130, $(OBJECTS)) >> $(basename $@).link
@echo $(wordlist 131, 135, $(OBJECTS)) >> $(basename $@).link
@echo $(wordlist 136, 140, $(OBJECTS)) >> $(basename $@).link
+   @echo $(wordlist 141, 141, $(OBJECTS)) >> $(basename $@).link
 
@echo $(wordlist 1, 2, $(WIN32_OBJECTS)) >> $(basename $@).link
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-CVS] cvs: php4 /ext/standard exec.c file.c filestat.c html.csyslog.c

2003-01-03 Thread Wez Furlong
Wouldn't it be better to just remove proc_open from the function
table under netware?

It doesn't make sense to do all that work and then fail because there is
not way to execute a new process (fork() + exec()).

--Wez.

On Fri, 3 Jan 2003, Anantha Kesari H Y wrote:

> hyanantha Fri Jan  3 09:37:43 2003 EDT
>
>   Modified files:
> /php4/ext/standardexec.c file.c filestat.c html.c syslog.c
>   Log:
>   Modified for NetWare.
>
>
> Index: php4/ext/standard/exec.c
> diff -u php4/ext/standard/exec.c:1.88 php4/ext/standard/exec.c:1.89
> --- php4/ext/standard/exec.c:1.88 Tue Dec 31 11:07:38 2002
> +++ php4/ext/standard/exec.c  Fri Jan  3 09:37:40 2003
> @@ -895,6 +895,18 @@
>
>   child = pi.hProcess;
>   CloseHandle(pi.hThread);
> +
> +#elif defined(NETWARE)
> +
> + /* clean up all the descriptors */
> + for (i = 0; i < ndesc; i++) {
> + close(descriptors[i].childend);
> + close(descriptors[i].parentend);
> + }
> +
> + php_error_docref(NULL TSRMLS_CC, E_WARNING, "fork not supported on NetWare");
> +
> + goto exit_fail;


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /sapi/apache libpre.c

2003-01-03 Thread Anantha Kesari H Y
hyanantha   Fri Jan  3 10:39:44 2003 EDT

  Modified files:  
/php4/sapi/apache   libpre.c 
  Log:
  New file added for NetWare.
  
  
Index: php4/sapi/apache/libpre.c
diff -u /dev/null php4/sapi/apache/libpre.c:1.2
--- /dev/null   Fri Jan  3 10:39:44 2003
+++ php4/sapi/apache/libpre.c   Fri Jan  3 10:39:43 2003
@@ -0,0 +1,36 @@
+
+#ifdef NETWARE
+
+/* --
+ * These functions are to be called when the shared NLM starts and
+ * stops.  By using these functions instead of defining a main()
+ * and calling ExitThread(TSR_THREAD, 0), the load time of the
+ * shared NLM is faster and memory size reduced.
+ * 
+ * You may also want to override these in your own Apache module
+ * to do any cleanup other than the mechanism Apache modules provide.
+ * --
+ */
+
+
+#ifdef __GNUC__
+#include /* memset */
+extern char _edata, _end ; /* end of DATA (start of BSS), end of BSS */
+#endif
+
+int _lib_start()
+{
+/* printf("Inside _lib_start\n");*/
+#ifdef __GNUC__
+memset (&_edata, 0, &_end - &_edata);
+#endif
+return 0;
+}
+
+int _lib_stop()
+{
+/* printf("Inside _lib_stop\n");*/
+return 0;
+}
+
+#endif /* NETWARE */



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /sapi/apache2filter php_apache.h sapi_apache2.c

2003-01-03 Thread Anantha Kesari H Y
hyanantha   Fri Jan  3 10:59:02 2003 EDT

  Modified files:  
/php4/sapi/apache2filterphp_apache.h sapi_apache2.c 
  Log:
  Modifications for NetWare.
  
  
Index: php4/sapi/apache2filter/php_apache.h
diff -u php4/sapi/apache2filter/php_apache.h:1.19 
php4/sapi/apache2filter/php_apache.h:1.20
--- php4/sapi/apache2filter/php_apache.h:1.19   Tue Dec 31 10:59:03 2002
+++ php4/sapi/apache2filter/php_apache.hFri Jan  3 10:59:02 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_apache.h,v 1.19 2002/12/31 15:59:03 sebastian Exp $ */
+/* $Id: php_apache.h,v 1.20 2003/01/03 15:59:02 hyanantha Exp $ */
 
 #ifndef PHP_APACHE_H
 #define PHP_APACHE_H
@@ -41,7 +41,11 @@
/* Index for reading from buffer */
int post_idx;
/* stat structure of the current file */
+#if defined(NETWARE) && defined(CLIB_STAT_PATCH)
+   struct stat_libc finfo;
+#else
struct stat finfo;
+#endif
/* Buffer for request body filter */
char *post_data;
/* Whether or not we've processed PHP in the output filters yet. */
Index: php4/sapi/apache2filter/sapi_apache2.c
diff -u php4/sapi/apache2filter/sapi_apache2.c:1.101 
php4/sapi/apache2filter/sapi_apache2.c:1.102
--- php4/sapi/apache2filter/sapi_apache2.c:1.101Tue Dec 31 10:59:03 2002
+++ php4/sapi/apache2filter/sapi_apache2.c  Fri Jan  3 10:59:02 2003
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: sapi_apache2.c,v 1.101 2002/12/31 15:59:03 sebastian Exp $ */
+/* $Id: sapi_apache2.c,v 1.102 2003/01/03 15:59:02 hyanantha Exp $ */
 
 #include 
 
@@ -29,7 +29,11 @@
 #include "SAPI.h"
 
 #include "ext/standard/php_smart_str.h"
+#ifndef NETWARE
 #include "ext/standard/php_standard.h"
+#else
+#include "ext/standard/basic_functions.h"
+#endif
 
 #include "apr_strings.h"
 #include "ap_config.h"
@@ -47,6 +51,10 @@
 
 #include "php_apache.h"
  
+#ifdef NETWARE
+#undef shutdown /* To avoid Winsock confusion */
+#endif
+
 /* A way to specify the location of the php.ini dir in an apache directive */
 char *apache2_php_ini_path_override = NULL;
 
@@ -160,9 +168,16 @@
ctx->finfo.st_uid = ctx->r->finfo.user;
ctx->finfo.st_gid = ctx->r->finfo.group;
ctx->finfo.st_ino = ctx->r->finfo.inode;
+#if defined(NETWARE) && defined(CLIB_STAT_PATCH)
+   ctx->finfo.st_atime.tv_sec = ctx->r->finfo.atime/100;
+   ctx->finfo.st_mtime.tv_sec = ctx->r->finfo.mtime/100;
+   ctx->finfo.st_ctime.tv_sec = ctx->r->finfo.ctime/100;
+#else
ctx->finfo.st_atime = ctx->r->finfo.atime/100;
ctx->finfo.st_mtime = ctx->r->finfo.mtime/100;
ctx->finfo.st_ctime = ctx->r->finfo.ctime/100;
+#endif
+
ctx->finfo.st_size = ctx->r->finfo.size;
ctx->finfo.st_nlink = ctx->r->finfo.nlink;
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/standard exec.c

2003-01-03 Thread Anantha Kesari H Y
hyanantha   Fri Jan  3 11:06:03 2003 EDT

  Modified files:  
/php4/ext/standard  exec.c 
  Log:
  Modified for NetWare.
  
  
Index: php4/ext/standard/exec.c
diff -u php4/ext/standard/exec.c:1.89 php4/ext/standard/exec.c:1.90
--- php4/ext/standard/exec.c:1.89   Fri Jan  3 09:37:40 2003
+++ php4/ext/standard/exec.cFri Jan  3 11:06:02 2003
@@ -15,7 +15,7 @@
| Author: Rasmus Lerdorf   |
+--+
  */
-/* $Id: exec.c,v 1.89 2003/01/03 14:37:40 hyanantha Exp $ */
+/* $Id: exec.c,v 1.90 2003/01/03 16:06:02 hyanantha Exp $ */
 
 #include 
 #include "php.h"
@@ -599,13 +599,13 @@
le_proc_open = zend_register_list_destructors_ex(proc_open_rsrc_dtor, NULL, 
"process", module_number);
return SUCCESS;
 }
-
 /* }}} */
 
 /* {{{ proto int proc_close(resource process)
close a process opened by proc_open */
 PHP_FUNCTION(proc_close)
 {
+#ifndef NETWARE/* This is removed for NetWare because there is not way to 
+execute a new process using fork() */
zval *proc;
void *child;

@@ -617,6 +617,7 @@

zend_list_delete(Z_LVAL_P(proc));
RETURN_LONG(FG(pclose_ret));
+#endif /* NETWARE */
 }
 /* }}} */
 
@@ -667,6 +668,8 @@
Run a process with more control over it's file descriptors */
 PHP_FUNCTION(proc_open)
 {
+#ifndef NETWARE/* This is removed for NetWare because there is not way to 
+execute a new process using fork() */
+
 #define MAX_DESCRIPTORS16
 
char *command;
@@ -896,18 +899,6 @@
child = pi.hProcess;
CloseHandle(pi.hThread);
 
-#elif defined(NETWARE)
-
-   /* clean up all the descriptors */
-   for (i = 0; i < ndesc; i++) {
-   close(descriptors[i].childend);
-   close(descriptors[i].parentend);
-   }
-
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, "fork not supported on NetWare");
-
-   goto exit_fail;
-
 #else
/* the unix way */
 
@@ -1008,7 +999,7 @@
efree(command);
RETURN_FALSE;
 
-   
+#endif /* NETWARE */
 }
 /* }}} */
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/standard http_fopen_wrapper.c

2003-01-03 Thread Ilia Alshanetsky
iliaa   Fri Jan  3 12:05:17 2003 EDT

  Modified files:  
/php4/ext/standard  http_fopen_wrapper.c 
  Log:
  Further fixes related to bug #21267.
  
  
Index: php4/ext/standard/http_fopen_wrapper.c
diff -u php4/ext/standard/http_fopen_wrapper.c:1.56 
php4/ext/standard/http_fopen_wrapper.c:1.57
--- php4/ext/standard/http_fopen_wrapper.c:1.56 Tue Dec 31 11:07:42 2002
+++ php4/ext/standard/http_fopen_wrapper.c  Fri Jan  3 12:05:16 2003
@@ -18,7 +18,7 @@
|  Wez Furlong <[EMAIL PROTECTED]>  |
+--+
  */
-/* $Id: http_fopen_wrapper.c,v 1.56 2002/12/31 16:07:42 sebastian Exp $ */ 
+/* $Id: http_fopen_wrapper.c,v 1.57 2003/01/03 17:05:16 iliaa Exp $ */ 
 
 #include "php.h"
 #include "php_globals.h"
@@ -346,7 +346,11 @@
if (*location != '/') {
if (*(location+1) != '\0') {   
 
php_dirname(resource->path, 
strlen(resource->path));
-   snprintf(loc_path, sizeof(loc_path) - 
1, "%s%s", resource->path, location);
+   if (resource->path && 
+*(resource->path) == '/' && *(resource->path + 1) == '\0') {
+   snprintf(loc_path, 
+sizeof(loc_path) - 1, "%s%s", resource->path, location);
+   } else {
+   snprintf(loc_path, 
+sizeof(loc_path) - 1, "%s/%s", resource->path, location);
+   }
} else {
snprintf(loc_path, sizeof(loc_path) - 
1, "/%s", location);
}
@@ -358,8 +362,7 @@
} else {
snprintf(new_path, sizeof(new_path) - 1, 
"%s://%s%s", resource->scheme, resource->host, loc_path);
}
-   }
-   else {
+   } else {
strlcpy(new_path, location, sizeof(new_path));
}
stream = php_stream_url_wrap_http(NULL, new_path, mode, 
options, opened_path, context STREAMS_CC TSRMLS_CC);



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/standard http_fopen_wrapper.c

2003-01-03 Thread Ilia Alshanetsky
iliaa   Fri Jan  3 12:12:36 2003 EDT

  Modified files:  
/php4/ext/standard  http_fopen_wrapper.c 
  Log:
  Fixed a memory leak that occurs if the location specified by redirect header
  cannot be opened.
  
  
Index: php4/ext/standard/http_fopen_wrapper.c
diff -u php4/ext/standard/http_fopen_wrapper.c:1.57 
php4/ext/standard/http_fopen_wrapper.c:1.58
--- php4/ext/standard/http_fopen_wrapper.c:1.57 Fri Jan  3 12:05:16 2003
+++ php4/ext/standard/http_fopen_wrapper.c  Fri Jan  3 12:12:35 2003
@@ -18,7 +18,7 @@
|  Wez Furlong <[EMAIL PROTECTED]>  |
+--+
  */
-/* $Id: http_fopen_wrapper.c,v 1.57 2003/01/03 17:05:16 iliaa Exp $ */ 
+/* $Id: http_fopen_wrapper.c,v 1.58 2003/01/03 17:12:35 iliaa Exp $ */ 
 
 #include "php.h"
 #include "php_globals.h"
@@ -311,9 +311,9 @@
php_stream_notify_file_size(context, 
file_size, http_header_line, 0);
}
 
-   if (http_header_line[0] == '\0')
+   if (http_header_line[0] == '\0') {
body = 1;
-   else{
+   } else {
zval *http_header;
 
MAKE_STD_ZVAL(http_header);
@@ -322,9 +322,9 @@


zend_hash_next_index_insert(Z_ARRVAL_P(response_header), &http_header, sizeof(zval *), 
NULL);
}
-   }
-   else
+   } else {
break;
+   }
}
} 

@@ -379,9 +379,11 @@
}
zval_dtor(stream->wrapperdata);
FREE_ZVAL(stream->wrapperdata);
+   } else {
+   zval_dtor(response_header);
+   FREE_ZVAL(response_header);
}
} else {
-
zval_dtor(response_header);
FREE_ZVAL(response_header);
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4(PHP_4_3) /ext/standard http_fopen_wrapper.c

2003-01-03 Thread Ilia Alshanetsky
iliaa   Fri Jan  3 12:19:46 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php4/ext/standard  http_fopen_wrapper.c 
  Log:
  MFH (fix for bug #21267 & memory leak fix on reidrects).
  
  
Index: php4/ext/standard/http_fopen_wrapper.c
diff -u php4/ext/standard/http_fopen_wrapper.c:1.53.2.2 
php4/ext/standard/http_fopen_wrapper.c:1.53.2.3
--- php4/ext/standard/http_fopen_wrapper.c:1.53.2.2 Tue Dec 31 11:35:29 2002
+++ php4/ext/standard/http_fopen_wrapper.c  Fri Jan  3 12:19:46 2003
@@ -18,7 +18,7 @@
|  Wez Furlong <[EMAIL PROTECTED]>  |
+--+
  */
-/* $Id: http_fopen_wrapper.c,v 1.53.2.2 2002/12/31 16:35:29 sebastian Exp $ */ 
+/* $Id: http_fopen_wrapper.c,v 1.53.2.3 2003/01/03 17:19:46 iliaa Exp $ */ 
 
 #include "php.h"
 #include "php_globals.h"
@@ -311,9 +311,9 @@
php_stream_notify_file_size(context, 
file_size, http_header_line, 0);
}
 
-   if (http_header_line[0] == '\0')
+   if (http_header_line[0] == '\0') {
body = 1;
-   else{
+   } else {
zval *http_header;
 
MAKE_STD_ZVAL(http_header);
@@ -322,9 +322,9 @@


zend_hash_next_index_insert(Z_ARRVAL_P(response_header), &http_header, sizeof(zval *), 
NULL);
}
-   }
-   else
+   } else {
break;
+   }
}
} 

@@ -339,21 +339,30 @@
 
zval *entry, **entryp;
char new_path[HTTP_HEADER_BLOCK_SIZE];
+   char loc_path[HTTP_HEADER_BLOCK_SIZE];
 
*new_path='\0';
-   if (strlen(location)<8 || (strncasecmp(location, "http://";, 7) 
&& strncasecmp(location, "https://";, 8))) {
-   strcpy(new_path, resource->scheme);
-   strlcat(new_path, resource->host, sizeof(new_path));
-   if ((use_ssl && resource->port != 443) || (!use_ssl && 
resource->port != 80)) {
-   snprintf(new_path+strlen(new_path), 
sizeof(new_path)-strlen(new_path)-1, ":%d", resource->port);
-   }
+   if (strlen(location)<8 || (strncasecmp(location, "http://";, 
+sizeof("http://";)-1) && strncasecmp(location, "https://";, sizeof("https://";)-1))) {
if (*location != '/') {
-   php_dirname(resource->path, 
strlen(resource->path));
-   snprintf (new_path+strlen(new_path), 
sizeof(new_path)-strlen(new_path)-1, "%s/", resource->path);
+   if (*(location+1) != '\0') {   
+ 
+   php_dirname(resource->path, 
+strlen(resource->path));
+   if (resource->path && 
+*(resource->path) == '/' && *(resource->path + 1) == '\0') {
+   snprintf(loc_path, 
+sizeof(loc_path) - 1, "%s%s", resource->path, location);
+   } else {
+   snprintf(loc_path, 
+sizeof(loc_path) - 1, "%s/%s", resource->path, location);
+   }
+   } else {
+   snprintf(loc_path, sizeof(loc_path) - 
+1, "/%s", location);
+   }
+   } else {
+   strlcpy(loc_path, location, sizeof(loc_path));
}
-   strlcat(new_path, location, sizeof(new_path));
-   }
-   else {
+   if ((use_ssl && resource->port != 443) || (!use_ssl && 
+resource->port != 80)) {
+   snprintf(new_path, sizeof(new_path) - 1, 
+"%s://%s:%d%s", resource->scheme, resource->host, resource->port, loc_path);
+   } else {
+   snprintf(new_path, sizeof(new_path) - 1, 
+"%s://%s%s", resource->scheme, resource->host, loc_path);
+   }
+   } else {
strlcpy(new_path, location, sizeof(new_path));
}
 

[PHP-CVS] cvs: php4 /ext/standard file.c

2003-01-03 Thread Ilia Alshanetsky
iliaa   Fri Jan  3 13:33:28 2003 EDT

  Modified files:  
/php4/ext/standard  file.c 
  Log:
  Fixed a bug that would cause flock() to never set the 3rd argument.
  CS fixes & switched to new parameter parsing API.
  
  
Index: php4/ext/standard/file.c
diff -u php4/ext/standard/file.c:1.286 php4/ext/standard/file.c:1.287
--- php4/ext/standard/file.c:1.286  Fri Jan  3 09:37:41 2003
+++ php4/ext/standard/file.cFri Jan  3 13:33:28 2003
@@ -21,7 +21,7 @@
+--+
  */
 
-/* $Id: file.c,v 1.286 2003/01/03 14:37:41 hyanantha Exp $ */
+/* $Id: file.c,v 1.287 2003/01/03 18:33:28 iliaa Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -212,38 +212,38 @@
 
 PHP_FUNCTION(flock)
 {
-zval **arg1, **arg2, **arg3;
-int fd, act, ret, arg_count = ZEND_NUM_ARGS();
+   zval *arg1, *arg3;
+   int fd, act, ret;
php_stream *stream;
+   long operation = 0;
 
-if (arg_count > 3 || zend_get_parameters_ex(arg_count, &arg1, &arg2, &arg3) == 
FAILURE) {
-WRONG_PARAM_COUNT;
-}
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl|z", &arg1, 
+&operation, &arg3) == FAILURE) {
+   return;
+   }
 
-   php_stream_from_zval(stream, arg1);
+   php_stream_from_zval(stream, &arg1);
 
-   if (php_stream_cast(stream, PHP_STREAM_AS_FD, (void*)&fd, 1) == FAILURE)   
 {
+   if (php_stream_cast(stream, PHP_STREAM_AS_FD, (void*)&fd, 1) == FAILURE) {
RETURN_FALSE;
}
 
-   convert_to_long_ex(arg2);
-
-act = Z_LVAL_PP(arg2) & 3;
-if (act < 1 || act > 3) {
+   act = operation & 3;
+   if (act < 1 || act > 3) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Illegal operation 
argument");
RETURN_FALSE;
-}
+   }
 
-/* flock_values contains all possible actions
-   if (arg2 & 4) we won't block on the lock */
-act = flock_values[act - 1] | (Z_LVAL_PP(arg2) & 4 ? LOCK_NB : 0);
-if ((ret=flock(fd, act)) == -1) {
-RETURN_FALSE;
-}
-   if(ret == -1 && errno == EWOULDBLOCK && arg_count == 3) {
-   ZVAL_LONG(*arg3, 1);
+   /* flock_values contains all possible actions if (operation & 4) we won't 
+block on the lock */
+   act = flock_values[act - 1] | (operation & 4 ? LOCK_NB : 0);
+   if ((ret = flock(fd, act)) == -1) {
+   if (errno == EWOULDBLOCK && operation) {
+   convert_to_long(arg3);
+   Z_LVAL_P(arg3) = 1;
+   RETURN_TRUE;
+   }
+   RETURN_FALSE;
}
-RETURN_TRUE;
+   RETURN_TRUE;
 }
 
 /* }}} */



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4(PHP_4_3) /ext/standard string.c

2003-01-03 Thread Derick Rethans
derick  Fri Jan  3 13:57:38 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php4/ext/standard  string.c 
  Log:
  - Remove broken lines (due to MFH)
  
  
Index: php4/ext/standard/string.c
diff -u php4/ext/standard/string.c:1.333.2.6 php4/ext/standard/string.c:1.333.2.7
--- php4/ext/standard/string.c:1.333.2.6Fri Jan  3 07:31:13 2003
+++ php4/ext/standard/string.c  Fri Jan  3 13:57:37 2003
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: string.c,v 1.333.2.6 2003/01/03 12:31:13 derick Exp $ */
+/* $Id: string.c,v 1.333.2.7 2003/01/03 18:57:37 derick Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -1399,9 +1399,6 @@
if (Z_TYPE_PP(needle) == IS_STRING) {
if (!Z_STRLEN_PP(needle)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty 
delimiter.");
-   efree(haystack_orig);
-   zval_ptr_dtor(haystack);
-   zval_ptr_dtor(needle);
RETURN_FALSE;
}
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/mcrypt config.m4 mcrypt.c php_mcrypt.h

2003-01-03 Thread Derick Rethans
derick  Fri Jan  3 14:49:44 2003 EDT

  Modified files:  
/php4/ext/mcryptconfig.m4 mcrypt.c php_mcrypt.h 
  Log:
  - Removed support for libmcrypt 2.2.x to allow cleaner code. Another reason
to upgrade libmcrypt to a 2.5.x series as the older ones have too much bugs
to be safely used with PHP.
  - Updated macro's, php_errors and parameter parsing.
  @- Removed support for libmcrypt 2.2.x to allow cleaner code. Another reason
  @  to upgrade libmcrypt to a 2.5.x series as the older ones have too much bugs
  @  to be safely used with PHP. (Derick)
  
  
Index: php4/ext/mcrypt/config.m4
diff -u php4/ext/mcrypt/config.m4:1.24 php4/ext/mcrypt/config.m4:1.25
--- php4/ext/mcrypt/config.m4:1.24  Tue Mar 12 11:24:05 2002
+++ php4/ext/mcrypt/config.m4   Fri Jan  3 14:49:44 2003
@@ -1,7 +1,25 @@
 dnl
-dnl $Id: config.m4,v 1.24 2002/03/12 16:24:05 sas Exp $
+dnl $Id: config.m4,v 1.25 2003/01/03 19:49:44 derick Exp $
 dnl 
 
+AC_DEFUN(PHP_MCRYPT_CHECK_VERSION,[
+  old_CPPFLAGS=$CPPFLAGS
+  CPPFLAGS=-I$MCRYPT_DIR/include
+  AC_MSG_CHECKING(for libmcrypt version)
+  AC_EGREP_CPP(yes,[
+#include 
+#if MCRYPT_API_VERSION >= 20020309
+  yes
+#endif
+  ],[
+AC_MSG_RESULT(>= 2.5.3)
+  ],[
+AC_MSG_ERROR(libmcrypt version 2.5.3 or greater required.)
+  ])
+  CPPFLAGS=$old_CPPFLAGS
+])  
+
+
 PHP_ARG_WITH(mcrypt, for mcrypt support,
 [  --with-mcrypt[=DIR] Include mcrypt support.])
 
@@ -16,32 +34,9 @@
 AC_MSG_ERROR(mcrypt.h not found. Please reinstall libmcrypt.)
   fi
 
-  PHP_CHECK_LIBRARY(mcrypt, mcrypt_module_open, 
-  [
-PHP_ADD_LIBRARY(ltdl,, MCRYPT_SHARED_LIBADD)
-AC_DEFINE(HAVE_LIBMCRYPT24,1,[ ])
-
-PHP_CHECK_LIBRARY(mcrypt, mcrypt_generic_deinit, 
-[
-  AC_DEFINE(HAVE_MCRYPT_GENERIC_DEINIT,1,[ ])
-],[],[
-  -L$MCRYPT_DIR/lib
-])
-
-  ],[
-PHP_CHECK_LIBRARY(mcrypt, init_mcrypt, 
-[
-  AC_DEFINE(HAVE_LIBMCRYPT22,1,[ ])
-],[
-  AC_MSG_ERROR([Sorry, I was not able to diagnose which libmcrypt version you 
have installed.])
-],[
-  -L$MCRYPT_DIR/lib
-])
-
-  ],[
--L$MCRYPT_DIR/lib -lltdl
-  ])
+  PHP_MCRYPT_CHECK_VERSION
 
+  PHP_ADD_LIBRARY(ltdl,, MCRYPT_SHARED_LIBADD)
   PHP_ADD_LIBRARY_WITH_PATH(mcrypt, $MCRYPT_DIR/lib, MCRYPT_SHARED_LIBADD)
   PHP_ADD_INCLUDE($MCRYPT_DIR/include)
   AC_DEFINE(HAVE_LIBMCRYPT,1,[ ])
Index: php4/ext/mcrypt/mcrypt.c
diff -u php4/ext/mcrypt/mcrypt.c:1.78 php4/ext/mcrypt/mcrypt.c:1.79
--- php4/ext/mcrypt/mcrypt.c:1.78   Tue Dec 31 11:06:55 2002
+++ php4/ext/mcrypt/mcrypt.cFri Jan  3 14:49:44 2003
@@ -16,7 +16,7 @@
|  Derick Rethans <[EMAIL PROTECTED]>  |
+--+
  */
-/* $Id: mcrypt.c,v 1.78 2002/12/31 16:06:55 sebastian Exp $ */
+/* $Id: mcrypt.c,v 1.79 2003/01/03 19:49:44 derick Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -38,7 +38,6 @@
 
 static int le_mcrypt;
 
-
 function_entry mcrypt_functions[] = {
PHP_FE(mcrypt_ecb, NULL)
PHP_FE(mcrypt_cbc, NULL)
@@ -48,7 +47,7 @@
PHP_FE(mcrypt_get_block_size, NULL)
PHP_FE(mcrypt_get_cipher_name, NULL)
PHP_FE(mcrypt_create_iv, NULL)
-#if HAVE_LIBMCRYPT24
+
PHP_FE(mcrypt_list_algorithms, NULL)
PHP_FE(mcrypt_list_modes, NULL)
PHP_FE(mcrypt_get_iv_size, NULL)
@@ -60,9 +59,8 @@
PHP_FE(mcrypt_generic, NULL)
PHP_FE(mdecrypt_generic, NULL)
PHP_FE(mcrypt_generic_end, NULL)
-#if HAVE_MCRYPT_GENERIC_DEINIT
PHP_FE(mcrypt_generic_deinit, NULL)
-#endif
+
PHP_FE(mcrypt_enc_self_test, NULL)
PHP_FE(mcrypt_enc_is_block_algorithm_mode, NULL)
PHP_FE(mcrypt_enc_is_block_algorithm, NULL)
@@ -83,7 +81,6 @@
PHP_FE(mcrypt_module_get_supported_key_sizes, NULL)
 
PHP_FE(mcrypt_module_close, NULL)
-#endif
{NULL, NULL, NULL}
 };
 
@@ -92,19 +89,17 @@
 static PHP_MSHUTDOWN_FUNCTION(mcrypt);
 
 zend_module_entry mcrypt_module_entry = {
-STANDARD_MODULE_HEADER,
+   STANDARD_MODULE_HEADER,
"mcrypt", 
mcrypt_functions,
PHP_MINIT(mcrypt), PHP_MSHUTDOWN(mcrypt),
NULL, NULL,
PHP_MINFO(mcrypt),
-NO_VERSION_YET,
+   NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES,
 };
 
-#if HAVE_LIBMCRYPT24
 ZEND_DECLARE_MODULE_GLOBALS(mcrypt)
-#endif
 
 #ifdef COMPILE_DL_MCRYPT
 ZEND_GET_MODULE(mcrypt)
@@ -122,13 +117,6 @@
MCRYPT_ARGS2;  
 \
zval **iv
 
-#if HAVE_LIBMCRYPT22
-#define MCRYPT_CONVERT
 \
-   convert_to_long_ex(cipher);
 \
-   convert_to_long_ex(mode);  
 \
-   convert_to_string_ex(data); 

[PHP-CVS] cvs: php4 /ext/mcrypt TODO

2003-01-03 Thread Derick Rethans
derick  Fri Jan  3 14:50:42 2003 EDT

  Modified files:  
/php4/ext/mcryptTODO 
  Log:
  - Update todo
  
Index: php4/ext/mcrypt/TODO
diff -u php4/ext/mcrypt/TODO:1.1 php4/ext/mcrypt/TODO:1.2
--- php4/ext/mcrypt/TODO:1.1Sat Dec 15 08:18:51 2001
+++ php4/ext/mcrypt/TODOFri Jan  3 14:50:41 2003
@@ -1,6 +1,6 @@
-/* $Id: TODO,v 1.1 2001/12/15 13:18:51 derick Exp $ */
+/* $Id: TODO,v 1.2 2003/01/03 19:50:41 derick Exp $ */
 
 TODO:
 - Convert to zend_parse_parameters
 - Unify error handling
-- Get rid of libmcrypt 2.2.x compability
+- Implement encryption streams



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/iconv iconv.c

2003-01-03 Thread Moriyoshi Koizumi
moriyoshi   Fri Jan  3 15:01:14 2003 EDT

  Modified files:  
/php4/ext/iconv iconv.c 
  Log:
  Fixed an iconv_strrpos() bug that the function doesn't return accurate
  position of last occurrence
  
  
  
Index: php4/ext/iconv/iconv.c
diff -u php4/ext/iconv/iconv.c:1.75 php4/ext/iconv/iconv.c:1.76
--- php4/ext/iconv/iconv.c:1.75 Fri Jan  3 09:29:49 2003
+++ php4/ext/iconv/iconv.c  Fri Jan  3 15:01:13 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: iconv.c,v 1.75 2003/01/03 14:29:49 moriyoshi Exp $ */
+/* $Id: iconv.c,v 1.76 2003/01/03 20:01:13 moriyoshi Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -910,6 +910,9 @@
ndl_buf_left -= GENERIC_SUPERSET_NBYTES;
if (ndl_buf_left == 0) {
*pretval = match_ofs;
+   ndl_buf_p = ndl_buf;
+   ndl_buf_left = ndl_buf_len;
+   match_ofs = -1;
}
} else {
unsigned int i, j, lim;



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/iconv/tests iconv_strpos.phpt iconv_strrpos.phpt

2003-01-03 Thread Moriyoshi Koizumi
moriyoshi   Fri Jan  3 15:02:24 2003 EDT

  Added files: 
/php4/ext/iconv/tests   iconv_strpos.phpt iconv_strrpos.phpt 
  Log:
  Added test cases for iconv_strpos() and iconv_strrpos()
  
  

Index: php4/ext/iconv/tests/iconv_strpos.phpt
+++ php4/ext/iconv/tests/iconv_strpos.phpt
--TEST--
iconv_strpos()
--SKIPIF--

--INI--
iconv.internal_charset=ISO-8859-1
--FILE--

--EXPECTF--
2: %s
bool(false)
2: %s
bool(false)
2: %s
bool(false)
bool(false)
int(7)
int(7)
int(16)
int(16)
int(300)
int(300)
int(302)
int(151)
int(1)
int(300)

Index: php4/ext/iconv/tests/iconv_strrpos.phpt
+++ php4/ext/iconv/tests/iconv_strrpos.phpt
--TEST--
iconv_strrpos()
--SKIPIF--

--INI--
iconv.internal_charset=ISO-8859-1
--FILE--

--EXPECT--
int(14)
int(9)
int(605)
int(300)
int(305)
int(151)
int(600)
bool(false)
int(601)
int(300)
int(602)
int(301)
int(603)
int(302)
int(604)
int(303)
int(605)
int(304)
int(606)
int(305)



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/iconv/tests iconv_mime_decode.phpt

2003-01-03 Thread Moriyoshi Koizumi
moriyoshi   Fri Jan  3 15:33:53 2003 EDT

  Added files: 
/php4/ext/iconv/tests   iconv_mime_decode.phpt 
  Log:
  Added test case for iconv_mime_decode()
  
  

Index: php4/ext/iconv/tests/iconv_mime_decode.phpt
+++ php4/ext/iconv/tests/iconv_mime_decode.phpt
--TEST--
iconv_mime_decode() (quoted-printable)
--SKIPIF--

--INI--
iconv.internal_charset=iso-8859-1
--FILE--
http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /sapi/apache php_apache.c

2003-01-03 Thread Derick Rethans
derick  Fri Jan  3 16:30:50 2003 EDT

  Modified files:  
/php4/sapi/apache   php_apache.c 
  Log:
  - Fix typo (patch by Joseph Tate)
  
Index: php4/sapi/apache/php_apache.c
diff -u php4/sapi/apache/php_apache.c:1.73 php4/sapi/apache/php_apache.c:1.74
--- php4/sapi/apache/php_apache.c:1.73  Tue Dec 31 10:59:02 2002
+++ php4/sapi/apache/php_apache.c   Fri Jan  3 16:30:49 2003
@@ -17,7 +17,7 @@
|  David Sklar <[EMAIL PROTECTED]> |
+--+
  */
-/* $Id: php_apache.c,v 1.73 2002/12/31 15:59:02 sebastian Exp $ */
+/* $Id: php_apache.c,v 1.74 2003/01/03 21:30:49 derick Exp $ */
 
 #include "php_apache_http.h"
 
@@ -120,7 +120,7 @@
ap_child_terminate( ((request_rec *)SG(server_context)) );
RETURN_TRUE;
} else { /* tell them to get lost! */
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, "apache.child_terminate is 
disabled");
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "apache_child_terminate is 
+disabled");
RETURN_FALSE;
}
 #else



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /sapi/apache php_apache.c

2003-01-03 Thread Derick Rethans
derick  Fri Jan  3 16:33:32 2003 EDT

  Modified files:  
/php4/sapi/apache   php_apache.c 
  Log:
  - Fix docrefs
  
Index: php4/sapi/apache/php_apache.c
diff -u php4/sapi/apache/php_apache.c:1.74 php4/sapi/apache/php_apache.c:1.75
--- php4/sapi/apache/php_apache.c:1.74  Fri Jan  3 16:30:49 2003
+++ php4/sapi/apache/php_apache.c   Fri Jan  3 16:33:31 2003
@@ -17,7 +17,7 @@
|  David Sklar <[EMAIL PROTECTED]> |
+--+
  */
-/* $Id: php_apache.c,v 1.74 2003/01/03 21:30:49 derick Exp $ */
+/* $Id: php_apache.c,v 1.75 2003/01/03 21:33:31 derick Exp $ */
 
 #include "php_apache_http.h"
 
@@ -120,11 +120,11 @@
ap_child_terminate( ((request_rec *)SG(server_context)) );
RETURN_TRUE;
} else { /* tell them to get lost! */
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, "apache_child_terminate is 
disabled");
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "This function is 
+disabled");
RETURN_FALSE;
}
 #else
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, "apache_child_terminate() 
is not supported in this build");
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "This function is not 
+supported in this build");
RETURN_FALSE;
 #endif
 }



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 / acinclude.m4

2003-01-03 Thread Alex Waugh
alexwaugh   Fri Jan  3 17:05:13 2003 EDT

  Modified files:  
/php4   acinclude.m4 
  Log:
  Provide alternative for glibc brokenness test when cross compiling
  
  
Index: php4/acinclude.m4
diff -u php4/acinclude.m4:1.223 php4/acinclude.m4:1.224
--- php4/acinclude.m4:1.223 Thu Jan  2 14:20:57 2003
+++ php4/acinclude.m4   Fri Jan  3 17:05:12 2003
@@ -1,4 +1,4 @@
-dnl $Id: acinclude.m4,v 1.223 2003/01/02 19:20:57 iliaa Exp $
+dnl $Id: acinclude.m4,v 1.224 2003/01/03 22:05:12 alexwaugh Exp $
 dnl
 dnl This file contains local autoconf functions.
 
@@ -1457,6 +1457,7 @@
 
 AC_DEFUN([PHP_BROKEN_GLIBC_FOPEN_APPEND],[
   AC_MSG_CHECKING([for broken libc stdio])
+  AC_CACHE_VAL(have_broken_glibc_fopen_append,[
   AC_TRY_RUN([
 #include 
 int main(int argc, char *argv[])
@@ -1483,7 +1484,17 @@
 }
 ],
 [have_broken_glibc_fopen_append=no],
-[have_broken_glibc_fopen_append=yes ])
+[have_broken_glibc_fopen_append=yes ],
+AC_TRY_COMPILE([
+#include 
+],[
+#if !__GLIBC_PREREQ(2,2)
+choke me
+#endif
+],
+[have_broken_glibc_fopen_append=yes],
+[have_broken_glibc_fopen_append=no ])
+)])
 
   if test "$have_broken_glibc_fopen_append" = "yes"; then
AC_MSG_RESULT(yes)



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4(PHP_4_3) / acinclude.m4

2003-01-03 Thread Alex Waugh
alexwaugh   Fri Jan  3 17:07:06 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php4   acinclude.m4 
  Log:
  MFH
  
  
Index: php4/acinclude.m4
diff -u php4/acinclude.m4:1.218.2.4 php4/acinclude.m4:1.218.2.5
--- php4/acinclude.m4:1.218.2.4 Thu Jan  2 14:21:53 2003
+++ php4/acinclude.m4   Fri Jan  3 17:07:05 2003
@@ -1,4 +1,4 @@
-dnl $Id: acinclude.m4,v 1.218.2.4 2003/01/02 19:21:53 iliaa Exp $
+dnl $Id: acinclude.m4,v 1.218.2.5 2003/01/03 22:07:05 alexwaugh Exp $
 dnl
 dnl This file contains local autoconf functions.
 
@@ -1464,6 +1464,7 @@
 
 AC_DEFUN([PHP_BROKEN_GLIBC_FOPEN_APPEND],[
   AC_MSG_CHECKING([for broken libc stdio])
+  AC_CACHE_VAL(have_broken_glibc_fopen_append,[
   AC_TRY_RUN([
 #include 
 int main(int argc, char *argv[])
@@ -1490,7 +1491,17 @@
 }
 ],
 [have_broken_glibc_fopen_append=no],
-[have_broken_glibc_fopen_append=yes ])
+[have_broken_glibc_fopen_append=yes ],
+AC_TRY_COMPILE([
+#include 
+],[
+#if !__GLIBC_PREREQ(2,2)
+choke me
+#endif
+],
+[have_broken_glibc_fopen_append=yes],
+[have_broken_glibc_fopen_append=no ])
+)])
 
   if test "$have_broken_glibc_fopen_append" = "yes"; then
AC_MSG_RESULT(yes)



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-CVS] cvs: php4 /ext/iconv iconv.c

2003-01-03 Thread Andrei Zmievski
On Fri, 03 Jan 2003, Moriyoshi Koizumi wrote:
> moriyoshi Fri Jan  3 00:14:34 2003 EDT
> 
>   Modified files:  
> /php4/ext/iconv   iconv.c 
>   Log:
>   MFB: fixed shift-out sequence unawareness issue

Please, fix stuff in HEAD and *then* merge into the branch.

-Andrei   http://www.gravitonic.com/

Linux is like living in a teepee.
No Windows, no Gates, Apache in house.
- Usenet signature

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php