[PHP-CVS] cvs: php4 / NEWS

2002-10-24 Thread Jani Taskinen
sniper  Fri Oct 25 02:24:53 2002 EDT

  Modified files:  
/php4   NEWS 
  Log:
  style
  
  
Index: php4/NEWS
diff -u php4/NEWS:1.1225 php4/NEWS:1.1226
--- php4/NEWS:1.1225Thu Oct 24 20:34:26 2002
+++ php4/NEWS   Fri Oct 25 02:24:53 2002
@@ -1,7 +1,6 @@
 PHP 4  NEWS
 |||
 ? ? ??? 2002, Version 4.3.0
-- Added dba_handlers() that lists all installed handlers in an array. (marcus)
 - ATTENTION! "make install" will *by default* install the CLI SAPI binary in 
   {PREFIX}/bin/php. If you don't disable the CGI binary, it will be
   installed as {PREFIX}/bin/php-cgi.
@@ -12,6 +11,7 @@
   . ext/icap
   . sapi/fhttpd
 - Moved ext/vpopmail to PECL. (James)
+- Added dba_handlers() that returns an array of installed handlers. (Marcus)
 - Added Oracle (oci8) support to dbx module. (Marc)
 - Updated FDF extension to work with Adode fdftk 5.0. (Hartmut)
 - Made raw POST data to be available also as "php://input" stream. (Hartmut)



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




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

2002-10-24 Thread Sascha Schumann
sas Thu Oct 24 21:10:51 2002 EDT

  Modified files:  
/php4/sapi/thttpd   thttpd.c 
  Log:
  thttpd initializes contentlength to -1, so we need to transfer that to 0
  for SAPI/PHP.  Otherwise, SAPI will try to read (unsigned long) -1 bytes
  from the connection.
  
  
Index: php4/sapi/thttpd/thttpd.c
diff -u php4/sapi/thttpd/thttpd.c:1.69 php4/sapi/thttpd/thttpd.c:1.70
--- php4/sapi/thttpd/thttpd.c:1.69  Sun Sep 22 20:49:12 2002
+++ php4/sapi/thttpd/thttpd.c   Thu Oct 24 21:10:50 2002
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: thttpd.c,v 1.69 2002/09/23 00:49:12 sas Exp $ */
+/* $Id: thttpd.c,v 1.70 2002/10/25 01:10:50 sas Exp $ */
 
 #include "php.h"
 #include "SAPI.h"
@@ -449,7 +449,8 @@
SG(request_info).request_method = httpd_method_str(TG(hc)->method);
SG(sapi_headers).http_response_code = 200;
SG(request_info).content_type = TG(hc)->contenttype;
-   SG(request_info).content_length = TG(hc)->contentlength;
+   SG(request_info).content_length = TG(hc)->contentlength == -1 ? 0
+   : TG(hc)->contentlength;

php_handle_auth_data(TG(hc)->authorization 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 basic_functions.c

2002-10-24 Thread Ilia Alshanetsky
iliaa   Thu Oct 24 21:06:47 2002 EDT

  Modified files:  
/php4/ext/standard  basic_functions.c 
  Log:
  Added a mechanism allowing the disabling of the ability to change 
  certain INI options when safe_mode is enabled.
  
  ATM three options are limited:
  max_execution_time
  memory_limit
  child_terminate
  
  This patch also fixes bug #17287.
  
  
Index: php4/ext/standard/basic_functions.c
diff -u php4/ext/standard/basic_functions.c:1.536 
php4/ext/standard/basic_functions.c:1.537
--- php4/ext/standard/basic_functions.c:1.536   Thu Oct 24 16:04:16 2002
+++ php4/ext/standard/basic_functions.c Thu Oct 24 21:06:46 2002
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.536 2002/10/24 20:04:16 hholzgra Exp $ */
+/* $Id: basic_functions.c,v 1.537 2002/10/25 01:06:46 iliaa Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -2342,6 +2342,18 @@
RETURN_FALSE;
}
}
+   }   
+   
+#define _CHECK_SAFEMODE_INI(ini, var) strncmp(ini, Z_STRVAL_PP(var), sizeof(ini))
+   
+   /* checks that ensure the user does not overwrite certain ini settings when 
+safe_mode is enabled */
+   if (PG(safe_mode)) {
+   if (!_CHECK_SAFEMODE_INI("max_execution_time", varname) ||
+   !_CHECK_SAFEMODE_INI("memory_limit", varname) ||
+   !_CHECK_SAFEMODE_INI("child_terminate", varname)) {
+   zval_dtor(return_value);
+   RETURN_FALSE;
+   }   
}   

if (zend_alter_ini_entry(Z_STRVAL_PP(varname), Z_STRLEN_PP(varname)+1, 
Z_STRVAL_PP(new_value), Z_STRLEN_PP(new_value),



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




Re: [PHP-CVS] Re: [PHP-QA] Re: [PHP-CVS] cvs: php4 /ext/standard file.c /ext/standard/tests/strings strtoupper.phpt

2002-10-24 Thread Ilia A.
Could you please try the attached patch and let me know if it fixes the 
problem.

Ilia

On October 24, 2002 06:27 pm, Melvyn Sopacua wrote:
> At 22:10 24-10-2002, Ilia A. wrote:
> >The lower/upper code uses libc's tolower/toupper functions, as long as the
> >specified locale is supported and the entered text is considered to be
> >alphabetic based on the entered locale the code will and does work
> > correctly.
>
> Except - the cast!
>
> This makes things work again on my FreeBSD box, will test it for BSDi in a
> minute, but I'm pretty sure it's going to work there also.
>
> Is there any specific reason this cast has been removed from the 4.2.3
> version?
>
> If so - we should work this in at a preprocessor level somehow (generically
> as I recall the test failing on AIX also).
>
> Index: ext/standard/string.c
> ===
> RCS file: /repository/php4/ext/standard/string.c,v
> retrieving revision 1.328
> diff -u -r1.328 string.c
> --- ext/standard/string.c   24 Oct 2002 19:11:49 -  1.328
> +++ ext/standard/string.c   24 Oct 2002 22:22:37 -
> @@ -990,7 +990,7 @@
>  e = c+len;
>
>  while (c < e) {
> -   *c = toupper(*c);
> +   *c = toupper((unsigned char)*c);
>  c++;
>  }
>  return s;
>
> >Ilia
> >
> >On October 24, 2002 03:50 pm, Melvyn Sopacua wrote:
> > > At 21:27 24-10-2002, Marcus Börger wrote:
> > > >The test PASSES on my system. So the question is why should it
> > > >be skipped on BSD or if not why does it fail?
> > >
> > > It shouldn't be skipped, that's why I added the locale for FreeBSD.
> > >
> > > The other question I can't answer - all I know is, that 4.2.3 handles
> > > it correctly and 4.3.0 doesn't .
> > >
> > > I can try and trace this through all the commits on string.c, but will
> > > have to wait until the weekend.
> > >
> > > http://cvs.php.net/diff.php/php4/ext/standard/string.c?r1=1.263.2.6&r2=
> > >1.32 8&ty=h
> > >
> > > Then again - it may related to completely different settings :(
> > >
> > > If there are volunteers for the job, with BSD systems - be my guest :)
> > >
> > > >It seems that the skip logic is done well.
> > > >
> > > >marcus
> > > >
> > > >At 21:17 24.10.2002, Melvyn Sopacua wrote:
> > > >>msopacuaThu Oct 24 15:17:09 2002 EDT
> > > >>
> > > >>   Modified files:
> > > >> /php4/ext/standard  file.c
> > > >> /php4/ext/standard/tests/stringsstrtoupper.phpt
> > > >>   Log:
> > > >>   - Add locale string for FreeBSD
> > > >>   ATTN: Test nog longer skips, but fails. So whatever has changed
> > > >> since 4.2.3
> > > >>   affects BSD systems.
> > > >
> > > >(...)
> > >
> > > Met vriendelijke groeten / With kind regards,
> > >
> > > Webmaster IDG.nl
> > > Melvyn Sopacua
> >
> >--
> >PHP CVS Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
>
> Met vriendelijke groeten / With kind regards,
>
> Webmaster IDG.nl
> Melvyn Sopacua

Index: ext/standard/string.c
===
RCS file: /repository/php4/ext/standard/string.c,v
retrieving revision 1.327
diff -u -3 -p -r1.327 string.c
--- ext/standard/string.c   22 Oct 2002 18:27:56 -  1.327
+++ ext/standard/string.c   24 Oct 2002 23:29:28 -
@@ -983,7 +983,7 @@ restore:
  */
 PHPAPI char *php_strtoupper(char *s, size_t len)
 {
-   char *c, *e;
+   unsigned char *c, *e;

c = s;
e = c+len;
@@ -1017,7 +1017,7 @@ PHP_FUNCTION(strtoupper)
  */
 PHPAPI char *php_strtolower(char *s, size_t len)
 {
-   char *c, *e;
+   unsigned char *c, *e;

c = s;
e = c+len;


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


Re: [PHP-CVS] Re: [PHP-QA] Re: [PHP-CVS] cvs: php4 /ext/standard file.c /ext/standard/tests/strings strtoupper.phpt

2002-10-24 Thread Melvyn Sopacua
At 22:10 24-10-2002, Ilia A. wrote:


The lower/upper code uses libc's tolower/toupper functions, as long as the
specified locale is supported and the entered text is considered to be
alphabetic based on the entered locale the code will and does work correctly.


Except - the cast!

This makes things work again on my FreeBSD box, will test it for BSDi in a
minute, but I'm pretty sure it's going to work there also.

Is there any specific reason this cast has been removed from the 4.2.3 version?

If so - we should work this in at a preprocessor level somehow (generically as
I recall the test failing on AIX also).

Index: ext/standard/string.c
===
RCS file: /repository/php4/ext/standard/string.c,v
retrieving revision 1.328
diff -u -r1.328 string.c
--- ext/standard/string.c   24 Oct 2002 19:11:49 -  1.328
+++ ext/standard/string.c   24 Oct 2002 22:22:37 -
@@ -990,7 +990,7 @@
e = c+len;

while (c < e) {
-   *c = toupper(*c);
+   *c = toupper((unsigned char)*c);
c++;
}
return s;





Ilia

On October 24, 2002 03:50 pm, Melvyn Sopacua wrote:
> At 21:27 24-10-2002, Marcus Börger wrote:
> >The test PASSES on my system. So the question is why should it
> >be skipped on BSD or if not why does it fail?
>
> It shouldn't be skipped, that's why I added the locale for FreeBSD.
>
> The other question I can't answer - all I know is, that 4.2.3 handles it
> correctly and 4.3.0 doesn't .
>
> I can try and trace this through all the commits on string.c, but will
> have to wait until the weekend.
>
> http://cvs.php.net/diff.php/php4/ext/standard/string.c?r1=1.263.2.6&r2=1.32
>8&ty=h
>
> Then again - it may related to completely different settings :(
>
> If there are volunteers for the job, with BSD systems - be my guest :)
>
> >It seems that the skip logic is done well.
> >
> >marcus
> >
> >At 21:17 24.10.2002, Melvyn Sopacua wrote:
> >>msopacuaThu Oct 24 15:17:09 2002 EDT
> >>
> >>   Modified files:
> >> /php4/ext/standard  file.c
> >> /php4/ext/standard/tests/stringsstrtoupper.phpt
> >>   Log:
> >>   - Add locale string for FreeBSD
> >>   ATTN: Test nog longer skips, but fails. So whatever has changed since
> >> 4.2.3
> >>   affects BSD systems.
> >
> >(...)
>
> Met vriendelijke groeten / With kind regards,
>
> Webmaster IDG.nl
> Melvyn Sopacua


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



Met vriendelijke groeten / With kind regards,

Webmaster IDG.nl
Melvyn Sopacua


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




[PHP-CVS] cvs: php4 /ext/standard/tests/strings htmlentities10.phpt htmlentities11.phpt htmlentities12.phpt htmlentities13.phpt htmlentities14.phpt

2002-10-24 Thread Moriyoshi Koizumi
moriyoshi   Thu Oct 24 18:21:04 2002 EDT

  Added files: 
/php4/ext/standard/tests/stringshtmlentities10.phpt 
htmlentities11.phpt 
htmlentities12.phpt 
htmlentities13.phpt 
htmlentities14.phpt 
  Log:
  Added some cases which test if charset determination with 
  SG(default_charset) works.
  
  

Index: php4/ext/standard/tests/strings/htmlentities10.phpt
+++ php4/ext/standard/tests/strings/htmlentities10.phpt
--TEST--
htmlentities() test 10 (default_charset / cp1252)
--INI--
output_handler=
mbstring.internal_encoding=pass
default_charset=cp1252
--SKIPIF--
--FILE--

--EXPECT--
cp1252
string(28) "‚†™Ÿ"
string(32) "€¢£¤¥"

Index: php4/ext/standard/tests/strings/htmlentities11.phpt
+++ php4/ext/standard/tests/strings/htmlentities11.phpt
--TEST--
htmlentities() test 11 (default_charset / ISO-8859-15)
--INI--
output_handler=
mbstring.internal_encoding=pass
default_charset=ISO-8859-15
--SKIPIF--
--FILE--

--EXPECT--
ISO-8859-15
string(20) "ŒœŸ"

Index: php4/ext/standard/tests/strings/htmlentities12.phpt
+++ php4/ext/standard/tests/strings/htmlentities12.phpt
--TEST--
htmlentities() test 12 (default_charset / ISO-8859-1)
--INI--
output_handler=
mbstring.internal_encoding=pass
default_charset=ISO-8859-1
--SKIPIF--
--FILE--

--EXPECT--
ISO-8859-1
string(18) "äöü"

Index: php4/ext/standard/tests/strings/htmlentities13.phpt
+++ php4/ext/standard/tests/strings/htmlentities13.phpt
--TEST--
htmlentities() test 13 (default_charset / EUC-JP)
--INI--
output_handler=
mbstring.internal_encoding=pass
default_charset=EUC-JP
--SKIPIF--
--FILE--

--EXPECT--
EUC-JP
string(6) "¡¢¡£¡¤"

Index: php4/ext/standard/tests/strings/htmlentities14.phpt
+++ php4/ext/standard/tests/strings/htmlentities14.phpt
--TEST--
htmlentities() test 14 (default_charset / Shift_JIS)
--INI--
output_handler=
mbstring.internal_encoding=pass
default_charset=Shift_JIS
--SKIPIF--
--FILE--

--EXPECT--
Shift_JIS
string(6) "ABC"



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




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

2002-10-24 Thread Moriyoshi Koizumi
moriyoshi   Thu Oct 24 18:04:29 2002 EDT

  Modified files:  
/php4/ext/standard  html.c 
  Log:
  Improved determine_charset() to look up SG(default_charset) value 
  
  
Index: php4/ext/standard/html.c
diff -u php4/ext/standard/html.c:1.58 php4/ext/standard/html.c:1.59
--- php4/ext/standard/html.c:1.58   Thu Oct 24 17:10:45 2002
+++ php4/ext/standard/html.cThu Oct 24 18:04:28 2002
@@ -18,12 +18,13 @@
+--+
 */
 
-/* $Id: html.c,v 1.58 2002/10/24 21:10:45 moriyoshi Exp $ */
+/* $Id: html.c,v 1.59 2002/10/24 22:04:28 moriyoshi Exp $ */
 
 #include "php.h"
 #include "reg.h"
 #include "html.h"
 #include "php_string.h"
+#include "SAPI.h"
 #if HAVE_LOCALE_H
 #include 
 #endif
@@ -529,7 +530,7 @@
if (charset_hint == NULL)
return cs_8859_1;
 
-   if (strlen(charset_hint) == 0)  {
+   if ((len = strlen(charset_hint)) == 0) {
 #if HAVE_MBSTRING
/* XXX: Ugly things. Why don't we look for a more sophisticated way? */
switch (MBSTRG(internal_encoding)) {
@@ -563,46 +564,45 @@
return cs_gb2312;
}
 #endif
-   /* try to detect the charset for the locale */
+   charset_hint = SG(default_charset);
+   if (charset_hint == NULL || (len=strlen(charset_hint)) == 0) {
+   /* try to detect the charset for the locale */
 #if HAVE_NL_LANGINFO && HAVE_LOCALE_H && defined(CODESET)
-   charset_hint = nl_langinfo(CODESET);
+   charset_hint = nl_langinfo(CODESET);
 #endif
 #if HAVE_LOCALE_H
-   if (charset_hint == NULL) {
-   /* try to figure out the charset from the locale */
-   char *localename;
-   char *dot, *at;
-
-   /* lang[_territory][.codeset][@modifier] */
-   localename = setlocale(LC_CTYPE, NULL);
-
-   dot = strchr(localename, '.');
-   if (dot) {
-   dot++;
-   /* locale specifies a codeset */
-   at = strchr(dot, '@');
-   if (at)
-   len = at - dot;
-   else
-   len = strlen(dot);
-   charset_hint = dot;
+   if (charset_hint == NULL) {
+   /* try to figure out the charset from the locale */
+   char *localename;
+   char *dot, *at;
+
+   /* lang[_territory][.codeset][@modifier] */
+   localename = setlocale(LC_CTYPE, NULL);
+
+   dot = strchr(localename, '.');
+   if (dot) {
+   dot++;
+   /* locale specifies a codeset */
+   at = strchr(dot, '@');
+   if (at)
+   len = at - dot;
+   else
+   len = strlen(dot);
+   charset_hint = dot;
+   } else {
+   /* no explicit name; see if the name itself
+* is the charset */
+   charset_hint = localename;
+   len = strlen(charset_hint);
+   }
} else {
-   /* no explicit name; see if the name itself
-* is the charset */
-   charset_hint = localename;
len = strlen(charset_hint);
}
-   } else
-   len = strlen(charset_hint);
-#else
-   if (charset_hint)
-   len = strlen(charset_hint);
 #endif
+   }
}
if (charset_hint) {
int found = 0;
-   if (!len)
-   len = strlen(charset_hint);

/* now walk the charset map and look for the codeset */
for (i = 0; charset_map[i].codeset; i++){



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




[PHP-CVS] cvs: php4 /ext/standard/tests/strings htmlentities1.phpt htmlentities2.phpt htmlentities3.phpt htmlentities4.phpt htmlentities5.phpt htmlentities6.phpt htmlentities7.phpt htmlentities8.phpt htmlentities9.phpt

2002-10-24 Thread Moriyoshi Koizumi
moriyoshi   Thu Oct 24 17:11:41 2002 EDT

  Added files: 
/php4/ext/standard/tests/stringshtmlentities1.phpt 
htmlentities2.phpt 
htmlentities3.phpt 
htmlentities4.phpt 
htmlentities5.phpt 
htmlentities6.phpt 
htmlentities7.phpt 
htmlentities8.phpt 
htmlentities9.phpt 
  Log:
  Added new test cases for htmlentities
  
  

Index: php4/ext/standard/tests/strings/htmlentities1.phpt
+++ php4/ext/standard/tests/strings/htmlentities1.phpt
--TEST--
htmlentities() test 1 (cp1252)
--INI--
mbstring.internal_encoding=pass
--FILE--

--EXPECT--
string(28) "‚†™Ÿ"
string(32) "€¢£¤¥"

Index: php4/ext/standard/tests/strings/htmlentities2.phpt
+++ php4/ext/standard/tests/strings/htmlentities2.phpt
--TEST--
htmlentities() test 2 (setlocale / fr_FR.ISO-8859-15) 
--SKIPIF--

--INI--
mbstring.internal_encoding=pass
--FILE--

--EXPECT--
string(20) "ŒœŸ"

Index: php4/ext/standard/tests/strings/htmlentities3.phpt
+++ php4/ext/standard/tests/strings/htmlentities3.phpt
--TEST--
htmlentities() test 3 (setlocale / de_DE.ISO-8859-1)
--SKIPIF--

--INI--
mbstring.internal_encoding=pass
--FILE--

--EXPECT--
string(18) "äöü"

Index: php4/ext/standard/tests/strings/htmlentities4.phpt
+++ php4/ext/standard/tests/strings/htmlentities4.phpt
--TEST--
htmlentities() test 4 (setlocale / ja_JP.EUC-JP)
--SKIPIF--

--INI--
mbstring.internal_encoding=pass
--FILE--

--EXPECT--
string(6) "¡¢¡£¡¤"

Index: php4/ext/standard/tests/strings/htmlentities5.phpt
+++ php4/ext/standard/tests/strings/htmlentities5.phpt
--TEST--
htmlentities() test 5 (mbstring / cp1252)
--INI--
output_handler=
mbstring.internal_encoding=cp1252
--SKIPIF--

--FILE--

--EXPECT--
Windows-1252
string(28) "‚†™Ÿ"
string(32) "€¢£¤¥"

Index: php4/ext/standard/tests/strings/htmlentities6.phpt
+++ php4/ext/standard/tests/strings/htmlentities6.phpt
--TEST--
htmlentities() test 6 (mbstring / ISO-8859-15)
--INI--
output_handler=
mbstring.internal_encoding=ISO-8859-15
--SKIPIF--

--FILE--

--EXPECT--
ISO-8859-15
string(20) "ŒœŸ"

Index: php4/ext/standard/tests/strings/htmlentities7.phpt
+++ php4/ext/standard/tests/strings/htmlentities7.phpt
--TEST--
htmlentities() test 7 (mbstring / ISO-8859-1)
--INI--
output_handler=
mbstring.internal_encoding=ISO-8859-1
--SKIPIF--

--FILE--

--EXPECT--
ISO-8859-1
string(18) "äöü"

Index: php4/ext/standard/tests/strings/htmlentities8.phpt
+++ php4/ext/standard/tests/strings/htmlentities8.phpt
--TEST--
htmlentities() test 8 (mbstring / EUC-JP)
--INI--
output_handler=
mbstring.internal_encoding=EUC-JP
--SKIPIF--

--FILE--

--EXPECT--
EUC-JP
string(6) "¡¢¡£¡¤"

Index: php4/ext/standard/tests/strings/htmlentities9.phpt
+++ php4/ext/standard/tests/strings/htmlentities9.phpt
--TEST--
htmlentities() test 9 (mbstring / Shift_JIS)
--INI--
output_handler=
mbstring.internal_encoding=Shift_JIS
--SKIPIF--

--FILE--

--EXPECT--
SJIS
string(6) "ABC"



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




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

2002-10-24 Thread Moriyoshi Koizumi
moriyoshi   Thu Oct 24 17:10:45 2002 EDT

  Modified files:  
/php4/ext/standard  html.c 
  Log:
  Fixed ISO-8859-1 handling.
  
  
Index: php4/ext/standard/html.c
diff -u php4/ext/standard/html.c:1.57 php4/ext/standard/html.c:1.58
--- php4/ext/standard/html.c:1.57   Thu Oct 24 15:52:30 2002
+++ php4/ext/standard/html.cThu Oct 24 17:10:45 2002
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: html.c,v 1.57 2002/10/24 19:52:30 moriyoshi Exp $ */
+/* $Id: html.c,v 1.58 2002/10/24 21:10:45 moriyoshi Exp $ */
 
 #include "php.h"
 #include "reg.h"
@@ -533,6 +533,9 @@
 #if HAVE_MBSTRING
/* XXX: Ugly things. Why don't we look for a more sophisticated way? */
switch (MBSTRG(internal_encoding)) {
+   case mbfl_no_encoding_8859_1:
+   return cs_8859_1;
+
case mbfl_no_encoding_utf8:
return cs_utf_8;
 



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




[PHP-CVS] cvs: php4 /ext/dba dba.c php_dba.h

2002-10-24 Thread Marcus Börger
helly   Thu Oct 24 16:43:03 2002 EDT

  Modified files:  
/php4/ext/dba   dba.c php_dba.h 
  Log:
  implemented dba_handlers()
  @Added dba_handlers() that lists all installed handlers in an array. (marcus)
  
  
Index: php4/ext/dba/dba.c
diff -u php4/ext/dba/dba.c:1.44 php4/ext/dba/dba.c:1.45
--- php4/ext/dba/dba.c:1.44 Fri Aug 23 18:24:02 2002
+++ php4/ext/dba/dba.c  Thu Oct 24 16:43:02 2002
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: dba.c,v 1.44 2002/08/23 22:24:02 sniper Exp $ */
+/* $Id: dba.c,v 1.45 2002/10/24 20:43:02 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -51,6 +51,7 @@
PHP_FE(dba_nextkey, NULL)
PHP_FE(dba_optimize, NULL)
PHP_FE(dba_sync, NULL)
+   PHP_FE(dba_handlers, NULL)
{NULL, NULL, NULL}
 };
 /* }}} */
@@ -509,6 +510,27 @@
RETURN_TRUE;
}
RETURN_FALSE;
+}
+/* }}} */
+
+/* {{{ proto array dba_list()
+   List configured databases */
+PHP_FUNCTION(dba_handlers)
+{
+   dba_handler *hptr;
+
+   if (ZEND_NUM_ARGS()!=0) {
+   ZEND_WRONG_PARAM_COUNT();
+   RETURN_FALSE;
+   }
+
+   if (array_init(return_value) == FAILURE) {
+   php_error_docref(NULL TSRMLS_CC, E_ERROR, "Unable to initialize 
+array");
+   RETURN_FALSE;
+   }
+   for(hptr = handler; hptr->name; hptr++) {
+   add_next_index_string(return_value, hptr->name, 1);
+   }
 }
 /* }}} */
 
Index: php4/ext/dba/php_dba.h
diff -u php4/ext/dba/php_dba.h:1.12 php4/ext/dba/php_dba.h:1.13
--- php4/ext/dba/php_dba.h:1.12 Fri Aug 23 18:24:02 2002
+++ php4/ext/dba/php_dba.h  Thu Oct 24 16:43:03 2002
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_dba.h,v 1.12 2002/08/23 22:24:02 sniper Exp $ */
+/* $Id: php_dba.h,v 1.13 2002/10/24 20:43:03 helly Exp $ */
 
 #ifndef PHP_DBA_H
 #define PHP_DBA_H
@@ -94,6 +94,7 @@
 PHP_FUNCTION(dba_fetch);
 PHP_FUNCTION(dba_optimize);
 PHP_FUNCTION(dba_sync);
+PHP_FUNCTION(dba_handlers);
 
 #else
 #define dba_module_ptr NULL



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




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

2002-10-24 Thread Marc Boeren
mboeren Thu Oct 24 10:26:14 2002 EDT

  Modified files:  
/php4/ext/dbx   dbx_oci8.c 
  Log:
  Changed the dbx_oci8 behaviour to return lowercase column-names,
  which is a hack but at least it makes it easier for users
  to create portable apps.
  # Perhaps this should be controlled by a (.ini?) directive or define
  # which determines the change (toupper, tolower, nochange)?
  
  
Index: php4/ext/dbx/dbx_oci8.c
diff -u php4/ext/dbx/dbx_oci8.c:1.7 php4/ext/dbx/dbx_oci8.c:1.8
--- php4/ext/dbx/dbx_oci8.c:1.7 Thu Oct 24 08:52:13 2002
+++ php4/ext/dbx/dbx_oci8.c Thu Oct 24 10:26:14 2002
@@ -20,10 +20,11 @@
+--+
 */
 
-/* $Id: dbx_oci8.c,v 1.7 2002/10/24 12:52:13 derick Exp $ */
+/* $Id: dbx_oci8.c,v 1.8 2002/10/24 14:26:14 mboeren Exp $ */
 
 #include "dbx.h"
 #include "dbx_oci8.h"
+#include "ext/standard/php_string.h" /* for auto-change column names to lowercase*/
 
 #define OCI_ASSOC1<<0
 #define OCI_NUM  1<<1
@@ -178,6 +179,7 @@
return 0;
}
FREE_ZVAL(zval_column_index);
+   php_strtolower(Z_STRVAL_P(returned_zval), Z_STRLEN_P(returned_zval));
MOVE_RETURNED_TO_RV(rv, returned_zval);
return 1;
 }



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




[PHP-CVS] cvs: php4 /ext/dbx/tests 005.phpt 007.phpt 008.phpt dbx_test.p

2002-10-24 Thread Marc Boeren
mboeren Thu Oct 24 10:16:29 2002 EDT

  Modified files:  
/php4/ext/dbx/tests 005.phpt 007.phpt 008.phpt dbx_test.p 
  Log:
  Not happy with the hack to handle the uppercase fieldnames that oracle 
  returns. Changed the dbx_oci8 behaviour to return lowercase instead,
  which is also a hack but at least it makes it much easier for users
  to create portable apps (Mc).
  # also, I prefer lowercase :-)
  
  
Index: php4/ext/dbx/tests/005.phpt
diff -u php4/ext/dbx/tests/005.phpt:1.5 php4/ext/dbx/tests/005.phpt:1.6
--- php4/ext/dbx/tests/005.phpt:1.5 Wed Oct 23 06:45:29 2002
+++ php4/ext/dbx/tests/005.phpt Thu Oct 24 10:16:27 2002
@@ -30,9 +30,9 @@
 // select query
 if ($dro=dbx_query($dlo, $sql_statement)) {
 for ($i=0; $i<$dro->rows; ++$i) {
-
print($dro->data[$i][$fieldname_case_function('id')].".".$dro->data[$i][$fieldname_case_function('description')].".".$dro->data[$i][$fieldname_case_function('field1')].".".strlen($dro->data[$i][$fieldname_case_function('field2')])."\n");
+
+print($dro->data[$i]['id'].".".$dro->data[$i]['description'].".".$dro->data[$i]['field1'].".".strlen($dro->data[$i]['field2'])."\n");
 }
-$dro->data[0][$fieldname_case_function('id')]='changed_value';
+$dro->data[0]['id']='changed_value';
 print($dro->data[0][0]."\n");
 }
 // insert query
@@ -40,7 +40,7 @@
 print('insert-query: dbx_query works ok'."\n");
 if ($dro=dbx_query($dlo, $sql_select_statement)) {
 for ($i=0; $i<$dro->rows; ++$i) {
-
print($dro->data[$i][$fieldname_case_function('id')].".".$dro->data[$i][$fieldname_case_function('description')].".".strlen($dro->data[$i][$fieldname_case_function('field2')])."\n");
+
+print($dro->data[$i]['id'].".".$dro->data[$i]['description'].".".strlen($dro->data[$i]['field2'])."\n");
 }
 }
 }
@@ -49,7 +49,7 @@
 print('update-query: dbx_query works ok'."\n");
 if ($dro=dbx_query($dlo, $sql_select_statement)) {
 for ($i=0; $i<$dro->rows; ++$i) {
-
print($dro->data[$i][$fieldname_case_function('id')].".".$dro->data[$i][$fieldname_case_function('description')].".".strlen($dro->data[$i][$fieldname_case_function('field2')])."\n");
+
+print($dro->data[$i]['id'].".".$dro->data[$i]['description'].".".strlen($dro->data[$i]['field2'])."\n");
 }
 }
 }
@@ -58,7 +58,7 @@
 print('delete-query: dbx_query works ok'."\n");
 if ($dro=dbx_query($dlo, $sql_select_statement)) {
 for ($i=0; $i<$dro->rows; ++$i) {
-
print($dro->data[$i][$fieldname_case_function('id')].".".$dro->data[$i][$fieldname_case_function('description')].".".strlen($dro->data[$i][$fieldname_case_function('field2')])."\n");
+
+print($dro->data[$i]['id'].".".$dro->data[$i]['description'].".".strlen($dro->data[$i]['field2'])."\n");
 }
 }
 }
Index: php4/ext/dbx/tests/007.phpt
diff -u php4/ext/dbx/tests/007.phpt:1.3 php4/ext/dbx/tests/007.phpt:1.4
--- php4/ext/dbx/tests/007.phpt:1.3 Wed Oct 23 06:45:29 2002
+++ php4/ext/dbx/tests/007.phpt Thu Oct 24 10:16:28 2002
@@ -22,9 +22,8 @@
 return "blabla";
 }
 function cmp($a, $b) {
-$fieldname_case_function = $GLOBALS['fieldname_case_function'];
-$rv = dbx_compare($a, $b, $fieldname_case_function("description"));
-if (!$rv) $rv = dbx_compare($a, $b, $fieldname_case_function("id"));
+$rv = dbx_compare($a, $b, "description");
+if (!$rv) $rv = dbx_compare($a, $b, "id");
 return $rv;
 }
 if (!$dlo) {
@@ -36,11 +35,11 @@
 print('this won\'t work'."\n");
 }
 for ($i=0; $i<$dro->rows; ++$i) {
-
print($dro->data[$i][$fieldname_case_function('id')].".".$dro->data[$i][$fieldname_case_function('description')]."\n");
+print($dro->data[$i]['id'].".".$dro->data[$i]['description']."\n");
 }
 if (dbx_sort($dro, $compare_function)) {
 for ($i=0; $i<$dro->rows; ++$i) {
-
print($dro->data[$i][$fieldname_case_function('id')].".".$dro->data[$i][$fieldname_case_function('description')]."\n");
+print($dro->data[$i]['id'].".".$dro->data[$i]['description']."\n");
 }
 }
 if (!@dbx_sort(0, $compare_function)) {
Index: php4/ext/dbx/tests/008.phpt
diff -u php4/ext/dbx/tests/008.phpt:1.3 php4/ext/dbx/tests/008.phpt:1.4
--- php4/ext/dbx/tests/008.phpt:1.3 Wed Oct 23 06:45:29 2002
+++ php4/ext/dbx/tests/008.phpt Thu Oct 24 10:16:28 2002
@@ -22,39 +22,33 @@
 $compare_function_6 = "cmp_description_number_id";
 $dlo = dbx_connect($module, $host, $database, $username, $password);
 function cmp_description_id($a, $b) {
-$fieldname_case_function = $GLOBALS['fieldname_case_function'];
-$rv = dbx_compare($a, $b, $fieldname_case_function("description"));
-if (!$rv) $rv = dbx_compare($a, $b

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

2002-10-24 Thread Moriyoshi Koizumi
moriyoshi   Thu Oct 24 10:12:06 2002 EDT

  Modified files:  
/php4/ext/standard  dl.c 
  Log:
  Reverted because my patch doesn't make sense: it was just my problem.
  
  
Index: php4/ext/standard/dl.c
diff -u php4/ext/standard/dl.c:1.77 php4/ext/standard/dl.c:1.78
--- php4/ext/standard/dl.c:1.77 Thu Oct 24 10:01:45 2002
+++ php4/ext/standard/dl.c  Thu Oct 24 10:12:06 2002
@@ -18,14 +18,13 @@
+--+
 */
 
-/* $Id: dl.c,v 1.77 2002/10/24 14:01:45 moriyoshi Exp $ */
+/* $Id: dl.c,v 1.78 2002/10/24 14:12:06 moriyoshi Exp $ */
 
 #include "php.h"
 #include "dl.h"
 #include "php_globals.h"
 #include "ext/standard/info.h"
 #include "SAPI.h"
-#include "build-defs.h"
 
 #if defined(HAVE_LIBDL) || HAVE_MACH_O_DYLD_H
 #include 



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




Re: [PHP-CVS] cvs: php4 /sapi/cli php_cli.c

2002-10-24 Thread Derick Rethans
On Thu, 24 Oct 2002, Sascha Schumann wrote:

> > Can you please stick to the coding standards:
> 
> My changes are always aligned with the rest of the source file.

Not this time then; I wouldn't really bother to mail if it was aligned, 
but it's clearly not. The whole file (except for one other occasion) 
uses the

if () {
}

style. I corrected this little mistake now in CVS.

have a nice day,
Derick

--

---
 Derick Rethans   http://derickrethans.nl/ 
 JDI Media Solutions
--[ if you hold a unix shell to your ear, do you hear the c? ]-


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




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

2002-10-24 Thread Moriyoshi Koizumi
moriyoshi   Thu Oct 24 10:01:46 2002 EDT

  Modified files:  
/php4/ext/standard  dl.c 
  Log:
  Fix build
  
  
Index: php4/ext/standard/dl.c
diff -u php4/ext/standard/dl.c:1.76 php4/ext/standard/dl.c:1.77
--- php4/ext/standard/dl.c:1.76 Thu Oct 24 09:14:42 2002
+++ php4/ext/standard/dl.c  Thu Oct 24 10:01:45 2002
@@ -18,13 +18,14 @@
+--+
 */
 
-/* $Id: dl.c,v 1.76 2002/10/24 13:14:42 sas Exp $ */
+/* $Id: dl.c,v 1.77 2002/10/24 14:01:45 moriyoshi Exp $ */
 
 #include "php.h"
 #include "dl.h"
 #include "php_globals.h"
 #include "ext/standard/info.h"
 #include "SAPI.h"
+#include "build-defs.h"
 
 #if defined(HAVE_LIBDL) || HAVE_MACH_O_DYLD_H
 #include 



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




[PHP-CVS] cvs: php4 /sapi/cli php_cli.c

2002-10-24 Thread Derick Rethans
derick  Thu Oct 24 10:01:40 2002 EDT

  Modified files:  
/php4/sapi/cli  php_cli.c 
  Log:
  - whitespace
  
  
Index: php4/sapi/cli/php_cli.c
diff -u php4/sapi/cli/php_cli.c:1.41 php4/sapi/cli/php_cli.c:1.42
--- php4/sapi/cli/php_cli.c:1.41Thu Oct 24 09:25:57 2002
+++ php4/sapi/cli/php_cli.c Thu Oct 24 10:01:39 2002
@@ -109,7 +109,9 @@
long ret;
 
ret = write(STDOUT_FILENO, str, str_length);
-   if (ret <= 0) return 0;
+   if (ret <= 0) {
+   return 0;
+   }
return ret;
 #else
size_t ret;
@@ -748,8 +750,9 @@
} zend_end_try();
 
 out:
-   if (module_started)
+   if (module_started) {
php_module_shutdown(TSRMLS_C);
+   }
sapi_shutdown();
 #ifdef ZTS
tsrm_shutdown();



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




Re: [PHP-CVS] cvs: php4 /sapi/cli php_cli.c

2002-10-24 Thread Sascha Schumann
> Can you please stick to the coding standards:

My changes are always aligned with the rest of the source file.

- Sascha


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




Re: [PHP-CVS] cvs: php4 /sapi/cli php_cli.c

2002-10-24 Thread Derick Rethans
On Thu, 24 Oct 2002, Sascha Schumann wrote:

> sas   Thu Oct 24 09:25:58 2002 EDT
> 
>   Modified files:  
> /php4/sapi/cliphp_cli.c 
>   Log:
>   Improve shutdown-behaviour
>   
>   Noticed by: Anantha Kesari H Y

Can you please stick to the coding standards:

> +out:
> + if (module_started)
> + php_module_shutdown(TSRMLS_C);
> + sapi_shutdown();

>From CODING_STANDARDS:

[2] Use K&R-style.  

(see also http://www.tuxedo.org/~esr/jargon/html/entry/indent-style.html)

Which says:

if () {

}

Thank you,

Derick

--

---
 Derick Rethans   http://derickrethans.nl/ 
 JDI Media Solutions
--[ if you hold a unix shell to your ear, do you hear the c? ]-


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




[PHP-CVS] cvs: php4 /sapi/cli php_cli.c

2002-10-24 Thread Sascha Schumann
sas Thu Oct 24 09:25:58 2002 EDT

  Modified files:  
/php4/sapi/cli  php_cli.c 
  Log:
  Improve shutdown-behaviour
  
  Noticed by: Anantha Kesari H Y
  
  
Index: php4/sapi/cli/php_cli.c
diff -u php4/sapi/cli/php_cli.c:1.40 php4/sapi/cli/php_cli.c:1.41
--- php4/sapi/cli/php_cli.c:1.40Thu Oct 24 09:18:27 2002
+++ php4/sapi/cli/php_cli.c Thu Oct 24 09:25:57 2002
@@ -377,6 +377,7 @@
char *script_file=NULL;
zend_llist global_vars;
int interactive=0;
+   int module_started = 0;
char *exec_direct=NULL;
char *param_error=NULL;
 /* end of temporary locals */
@@ -430,8 +431,9 @@
 
/* startup after we get the above ini override se we get things right */
if (php_module_startup(&cli_sapi_module, NULL, 0)==FAILURE) {
-   return FAILURE;
+   goto err;
}
+   module_started = 1;
 
 #ifdef ZTS
compiler_globals = ts_resource(compiler_globals_id);
@@ -518,8 +520,7 @@
 
case 'i': /* php info & quit */
if (php_request_startup(TSRMLS_C)==FAILURE) {
-   php_module_shutdown(TSRMLS_C);
-   return FAILURE;
+   goto err;
}
if (no_headers) {
SG(headers_sent) = 1;
@@ -584,8 +585,7 @@
case 'v': /* show php version & quit */
no_headers = 1;
if (php_request_startup(TSRMLS_C)==FAILURE) {
-   php_module_shutdown(TSRMLS_C);
-   return FAILURE;
+   goto err;
}
if (no_headers) {
SG(headers_sent) = 1;
@@ -633,7 +633,7 @@
SG(headers_sent) = 1;
SG(request_info).no_headers = 1;
PUTS("Could not open input file.\n");
-   return FAILURE;
+   goto err;
}
file_handle.filename = script_file;
script_filename = script_file;
@@ -671,9 +671,8 @@
SG(headers_sent) = 1;
SG(request_info).no_headers = 1;
php_request_shutdown((void *) 0);
-   php_module_shutdown(TSRMLS_C);
PUTS("Could not startup.\n");
-   return FAILURE;
+   goto err;
}
*arg_excp = arg_free; /* reconstuct argv */
if (no_headers) {
@@ -707,7 +706,7 @@
zend_strip(TSRMLS_C);
fclose(file_handle.handle.fp);
}
-   return SUCCESS;
+   goto out;
break;
case PHP_MODE_HIGHLIGHT:
{
@@ -718,7 +717,7 @@
zend_highlight(&syntax_highlighter_ini 
TSRMLS_CC);
fclose(file_handle.handle.fp);
}
-   return SUCCESS;
+   goto out;
}
break;
 #if 0
@@ -727,7 +726,7 @@
open_file_for_scanning(&file_handle TSRMLS_CC);
zend_indent();
fclose(file_handle.handle.fp);
-   return SUCCESS;
+   goto out;
break;
 #endif
case PHP_MODE_CLI_DIRECT:
@@ -748,13 +747,19 @@
exit_status = EG(exit_status);
} zend_end_try();
 
-   php_module_shutdown(TSRMLS_C);
-
+out:
+   if (module_started)
+   php_module_shutdown(TSRMLS_C);
+   sapi_shutdown();
 #ifdef ZTS
tsrm_shutdown();
 #endif
 
-   return exit_status;
+   exit(exit_status);
+
+err:
+   exit_status = 1;
+   goto out;
 }
 /* }}} */
 



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




[PHP-CVS] cvs: php4 /sapi/cli php_cli.c

2002-10-24 Thread Derick Rethans
derick  Thu Oct 24 09:18:29 2002 EDT

  Modified files:  
/php4/sapi/cli  php_cli.c 
  Log:
  
  
  
Index: php4/sapi/cli/php_cli.c
diff -u php4/sapi/cli/php_cli.c:1.39 php4/sapi/cli/php_cli.c:1.40
--- php4/sapi/cli/php_cli.c:1.39Thu Oct 24 09:14:49 2002
+++ php4/sapi/cli/php_cli.c Thu Oct 24 09:18:27 2002
@@ -464,6 +464,7 @@
SG(options) |= SAPI_OPTION_NO_CHDIR;
zend_alter_ini_entry("register_argc_argv", 19, "1", 1, PHP_INI_SYSTEM, 
PHP_INI_STAGE_ACTIVATE);
zend_alter_ini_entry("html_errors", 12, "0", 1, PHP_INI_SYSTEM, 
PHP_INI_STAGE_ACTIVATE);
+   zend_alter_ini_entry("implicit_flush", 15, "1", 1, PHP_INI_SYSTEM, 
+PHP_INI_STAGE_ACTIVATE);
zend_alter_ini_entry("max_execution_time", 19, "0", 1, PHP_INI_SYSTEM, 
PHP_INI_STAGE_ACTIVATE);
 
zend_uv.html_errors = 0; /* tell the engine we're in non-html mode */



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




[PHP-CVS] cvs: php4 / configure.in /ext/dbase dbase.c /ext/dotnet php_dotnet.h /ext/fbsql php_fbsql.c /ext/filepro filepro.c /ext/gd gdcache.c /ext/hwapi hwapi.cpp /ext/hyperwave hw.c /ext/imap php_imap.h /ext/informix ifx.ec /ext/mcal php_mcal.h /ext/mysql php_mysql.c /ext/oci8 oci8.c /ext/odbc php_odbc.c /ext/oracle oracle.c /ext/standard dl.c fsock.c info.c mail.c /ext/xml xml.c /main main.c php.h php_ini.c streams.c /regex regex_extra.h /sapi/apache php_apache.c /sapi/cgi cgi_main.c /sapi/cli php_cli.c /sapi/servlet servlet.c

2002-10-24 Thread Sascha Schumann
sas Thu Oct 24 09:14:51 2002 EDT

  Modified files:  
/php4   configure.in 
/php4/ext/dbase dbase.c 
/php4/ext/dotnetphp_dotnet.h 
/php4/ext/fbsql php_fbsql.c 
/php4/ext/filepro   filepro.c 
/php4/ext/gdgdcache.c 
/php4/ext/hwapi hwapi.cpp 
/php4/ext/hyperwave hw.c 
/php4/ext/imap  php_imap.h 
/php4/ext/informix  ifx.ec 
/php4/ext/mcal  php_mcal.h 
/php4/ext/mysql php_mysql.c 
/php4/ext/oci8  oci8.c 
/php4/ext/odbc  php_odbc.c 
/php4/ext/oracleoracle.c 
/php4/ext/standard  dl.c fsock.c info.c mail.c 
/php4/ext/xml   xml.c 
/php4/main  main.c php.h php_ini.c streams.c 
/php4/regex regex_extra.h 
/php4/sapi/apache   php_apache.c 
/php4/sapi/cgi  cgi_main.c 
/php4/sapi/cli  php_cli.c 
/php4/sapi/servlet  servlet.c 
  Log:
  centralize #include "build-defs.h" and drop (sometimes inconsistent) other
  instances
  
  
Index: php4/configure.in
diff -u php4/configure.in:1.387 php4/configure.in:1.388
--- php4/configure.in:1.387 Thu Oct 24 08:21:06 2002
+++ php4/configure.in   Thu Oct 24 09:14:32 2002
@@ -1,4 +1,4 @@
-dnl ## $Id: configure.in,v 1.387 2002/10/24 12:21:06 sas Exp $ -*- sh -*-
+dnl ## $Id: configure.in,v 1.388 2002/10/24 13:14:32 sas Exp $ -*- sh -*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -325,6 +325,7 @@
 locale.h \
 monetary.h \
 mach-o/dyld.h \
+netdb.h \
 pwd.h \
 resolv.h \
 signal.h \
@@ -1107,6 +1108,8 @@
 
 PHP_GEN_BUILD_DIRS
 PHP_GEN_GLOBAL_MAKEFILE
+
+AC_DEFINE([HAVE_BUILD_DEFS_H], 1, [ ])
 
 $php_shtool mkdir -p pear/scripts
 ALL_OUTPUT_FILES="php4.spec main/build-defs.h \
Index: php4/ext/dbase/dbase.c
diff -u php4/ext/dbase/dbase.c:1.59 php4/ext/dbase/dbase.c:1.60
--- php4/ext/dbase/dbase.c:1.59 Sun Jun 16 22:27:34 2002
+++ php4/ext/dbase/dbase.c  Thu Oct 24 09:14:33 2002
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: dbase.c,v 1.59 2002/06/17 02:27:34 sniper Exp $ */
+/* $Id: dbase.c,v 1.60 2002/10/24 13:14:33 sas Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -760,7 +760,7 @@
 #ifdef COMPILE_DL_DBASE
 ZEND_GET_MODULE(dbase)
 
-#if (WIN32|WINNT) && defined(THREAD_SAFE)
+#if defined(PHP_WIN32) && defined(THREAD_SAFE)
 
 /*NOTE: You should have an odbc.def file where you
 export DllMain*/
Index: php4/ext/dotnet/php_dotnet.h
diff -u php4/ext/dotnet/php_dotnet.h:1.2 php4/ext/dotnet/php_dotnet.h:1.3
--- php4/ext/dotnet/php_dotnet.h:1.2Sun Jul 29 21:56:24 2001
+++ php4/ext/dotnet/php_dotnet.hThu Oct 24 09:14:33 2002
@@ -1,7 +1,7 @@
 #ifndef PHP_DOTNET_H
 #define PHP_DOTNET_H
 
-#if WIN32|WINNT
+#ifdef PHP_WIN32
 
 PHP_MINIT_FUNCTION(DOTNET);
 PHP_MSHUTDOWN_FUNCTION(DOTNET);
@@ -14,7 +14,7 @@
 
 #define DOTNET_module_ptr NULL
 
-#endif  /* Win32|WINNT */
+#endif  /* PHP_WIN32 */
 
 #define phpext_DOTNET_ptr DOTNET_module_ptr
 
Index: php4/ext/fbsql/php_fbsql.c
diff -u php4/ext/fbsql/php_fbsql.c:1.85 php4/ext/fbsql/php_fbsql.c:1.86
--- php4/ext/fbsql/php_fbsql.c:1.85 Sat Oct  5 22:10:19 2002
+++ php4/ext/fbsql/php_fbsql.c  Thu Oct 24 09:14:34 2002
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_fbsql.c,v 1.85 2002/10/06 02:10:19 fmk Exp $ */
+/* $Id: php_fbsql.c,v 1.86 2002/10/24 13:14:34 sas Exp $ */
 
 /* TODO:
  *
@@ -42,11 +42,10 @@
 #include "ext/standard/info.h"
 #include "ext/standard/php_string.h"
 
-#if WIN32|WINNT
+#ifdef PHP_WIN32
 #include 
 #else
 #include 
-#include 
 
 #if HAVE_SYS_TYPES_H
 #include 
Index: php4/ext/filepro/filepro.c
diff -u php4/ext/filepro/filepro.c:1.46 php4/ext/filepro/filepro.c:1.47
--- php4/ext/filepro/filepro.c:1.46 Thu Jun 27 02:54:51 2002
+++ php4/ext/filepro/filepro.c  Thu Oct 24 09:14:35 2002
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: filepro.c,v 1.46 2002/06/27 06:54:51 derick Exp $ */
+/* $Id: filepro.c,v 1.47 2002/10/24 13:14:35 sas Exp $ */
 
 /*
   filePro 4.x support developed by Chad Robinson, [EMAIL PROTECTED]
@@ -151,7 +151,7 @@
 
 #ifdef COMPILE_DL_FILEPRO
 ZEND_GET_MODULE(filepro)
-#if (WIN32|WINNT) && defined(THREAD_SAFE)
+#if defined(PHP_WIN32) && defined(THREAD_SAFE)
 
 /*NOTE: You should have an odbc.def file where you
 export DllMain*/
Index: php4/ext/gd/gdcache.c
diff -u php4/ext/gd/gdcache.c:1.4 php4/ext/gd/gdcache.c:1.5
--- php4/ext/gd/gdcache.c:1.4   Thu Aug 19 02:32:07 1999
+++ php4/ext/gd/gdcache.c   Thu Oct 24 09:14:35 2002
@@ -1,5 +1,5 @@
 /* 
- * $Id: gdcache.c,v 1.4 1999/08/19 06:32:07 rasmus Exp $
+ * $Id: gdcache.c,v 1.5 2002/10/24 13:14:35 sas Exp $
  *
  * Caches of pointers to user structs in which the least-recently-used 
  * element is replaced in the event of a cache miss after the cache has 
@@ -37,7 +37,7 @@
  */
 
 /* This just seems unessacary */
-#if (WIN32|

[PHP-CVS] cvs: php4 / run-tests.php

2002-10-24 Thread Ilia Alshanetsky
iliaa   Thu Oct 24 09:13:24 2002 EDT

  Modified files:  
/php4   run-tests.php 
  Log:
  Added failed test summary.
  
  
Index: php4/run-tests.php
diff -u php4/run-tests.php:1.87 php4/run-tests.php:1.88
--- php4/run-tests.php:1.87 Thu Oct 24 05:06:31 2002
+++ php4/run-tests.php  Thu Oct 24 09:13:23 2002
@@ -248,6 +248,24 @@
 =
 ";
 
+$failed_test_summary = '';
+if (count($GLOBALS['__PHP_FAILED_TESTS__'])) {
+$failed_test_summary .= "
+=
+FAILED TEST SUMMARY
+-
+";
+foreach ($GLOBALS['__PHP_FAILED_TESTS__'] as $failed_test_data) {
+$failed_test_summary .=  $failed_test_data['test_name'] . "\n";
+}
+$failed_test_summary .=  
+"=
+";
+}
+
+if ($failed_test_summary && !getenv('NO_PHPTEST_SUMMARY')) {
+   echo $failed_test_summary;
+}
+
 define('PHP_QA_EMAIL', '[EMAIL PROTECTED]');
 define('QA_SUBMISSION_PAGE', 'http://qa.php.net/buildtest-process.php');
 
@@ -276,6 +294,8 @@
$failed_tests_data .= "Compiler:\n". shell_exec(getenv('CC').' -v 
2>&1'). "\n";
$failed_tests_data .= "\n\n";

+   $failed_tests_data .= $failed_test_summary . "\n";
+   
foreach ($GLOBALS['__PHP_FAILED_TESTS__'] as $test_info) {
$failed_tests_data .= $sep . $test_info['name'];
$failed_tests_data .= $sep . 
file_get_contents(realpath($test_info['output']));
@@ -576,6 +596,7 @@
 
$GLOBALS['__PHP_FAILED_TESTS__'][] = array(
'name' => $file,
+   'test_name' => $tested,
'output' => 
ereg_replace('\.phpt$','.log', $file),
'diff'   => 
ereg_replace('\.phpt$','.diff', $file)
);



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




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

2002-10-24 Thread Derick Rethans
derick  Thu Oct 24 08:52:13 2002 EDT

  Modified files:  
/php4/ext/dbx   dbx_oci8.c 
  Log:
  - True and false are not always defined, used numbers now
  
  
Index: php4/ext/dbx/dbx_oci8.c
diff -u php4/ext/dbx/dbx_oci8.c:1.6 php4/ext/dbx/dbx_oci8.c:1.7
--- php4/ext/dbx/dbx_oci8.c:1.6 Wed Oct 23 06:50:22 2002
+++ php4/ext/dbx/dbx_oci8.c Thu Oct 24 08:52:13 2002
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: dbx_oci8.c,v 1.6 2002/10/23 10:50:22 mboeren Exp $ */
+/* $Id: dbx_oci8.c,v 1.7 2002/10/24 12:52:13 derick Exp $ */
 
 #include "dbx.h"
 #include "dbx_oci8.h"
@@ -108,7 +108,7 @@
arguments[0]=&returned_zval;
dbx_call_any_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, "OCIExecute", 
&execute_zval, number_of_arguments, arguments);
/* OCIExecute returns a bool for success or failure */
-   if (!execute_zval || Z_TYPE_P(execute_zval)!=IS_BOOL || 
Z_BVAL_P(execute_zval)==FALSE) {
+   if (!execute_zval || Z_TYPE_P(execute_zval)!=IS_BOOL || 
+Z_BVAL_P(execute_zval)==0) {
if (execute_zval) zval_ptr_dtor(&execute_zval);
zval_ptr_dtor(&returned_zval);
return 0;
@@ -131,7 +131,7 @@
/* it is not a select, so just return success */
zval_ptr_dtor(&returned_zval);
MAKE_STD_ZVAL(returned_zval);
-   ZVAL_BOOL(returned_zval, TRUE);
+   ZVAL_BOOL(returned_zval, 1);
MOVE_RETURNED_TO_RV(rv, returned_zval);
}
if (statementtype_zval) zval_ptr_dtor(&statementtype_zval);



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




[PHP-CVS] cvs: CVSROOT / avail

2002-10-24 Thread zeev
zeevThu Oct 24 08:45:00 2002 EDT

  Modified files:  
/CVSROOTavail 
  Log:
  Add karma to Anath
  
  
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.517 CVSROOT/avail:1.518
--- CVSROOT/avail:1.517 Mon Oct 21 03:28:25 2002
+++ CVSROOT/avail   Thu Oct 24 08:45:00 2002
@@ -22,7 +22,7 @@
 
 
 # People who work on the Engine
-avail|andi,zeev,andrei,stas,sterling,sascha,derick,sebastian,phanto,sniper,hirokawa,fujimoto,dali,rvenkat,imajes,jason,sesser,kalowsky,jmoore,iliaa,dreid|Zend,ZendEngine2,TSRM
+avail|andi,zeev,andrei,stas,sterling,sascha,derick,sebastian,phanto,sniper,hirokawa,fujimoto,dali,rvenkat,imajes,jason,sesser,kalowsky,jmoore,iliaa,dreid,hyanantha|Zend,ZendEngine2,TSRM
 
 # The PHP Documentation Group maintains the documentation and its
 # translations.



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




Re: [PHP-CVS] cvs: php4 / acinclude.m4 configure.in /ext/standardconfig.m4 math.c

2002-10-24 Thread Derick Rethans
On Thu, 24 Oct 2002, Sascha Schumann wrote:

> sas   Thu Oct 24 08:21:07 2002 EDT
> 
>   Modified files:  
> /php4 acinclude.m4 configure.in 
> /php4/ext/standardconfig.m4 math.c 
>   Log:
>   Make PHP compile out-of-the-box with uClibc
>   
>   
>  PHP_FUNCTION(asinh)
>  {
> +#ifdef HAVE_ASINH
>   zval **num;
>  
>   if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
> @@ -329,6 +330,7 @@
>   convert_to_double_ex(num);
>   Z_DVAL_P(return_value) = asinh(Z_DVAL_PP(num));
>   Z_TYPE_P(return_value) = IS_DOUBLE;
> +#endif
>  }

I thought the general consesus was to not define a function at all if it 
is not implemented. Better make function_exists() work on them so that 
you can code workarounds in your code...

Derick

--

---
 Derick Rethans   http://derickrethans.nl/ 
 JDI Media Solutions
--[ if you hold a unix shell to your ear, do you hear the c? ]-


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




[PHP-CVS] cvs: php4 / acinclude.m4 configure.in /ext/standard config.m4 math.c

2002-10-24 Thread Sascha Schumann
sas Thu Oct 24 08:21:07 2002 EDT

  Modified files:  
/php4   acinclude.m4 configure.in 
/php4/ext/standard  config.m4 math.c 
  Log:
  Make PHP compile out-of-the-box with uClibc
  
  
Index: php4/acinclude.m4
diff -u php4/acinclude.m4:1.215 php4/acinclude.m4:1.216
--- php4/acinclude.m4:1.215 Thu Oct 24 06:41:36 2002
+++ php4/acinclude.m4   Thu Oct 24 08:21:06 2002
@@ -1,4 +1,4 @@
-dnl $Id: acinclude.m4,v 1.215 2002/10/24 10:41:36 sas Exp $
+dnl $Id: acinclude.m4,v 1.216 2002/10/24 12:21:06 sas Exp $
 dnl
 dnl This file contains local autoconf functions.
 
@@ -1679,6 +1679,13 @@
   AC_CHECK_LIB($2, $1, [found=yes], [
 AC_CHECK_LIB($2, __$1, [found=yes], [found=no])
   ])
+
+  if test "$found" = "yes"; then
+ac_libs=$LIBS
+LIBS="$LIBS -l$2"
+AC_TRY_RUN([main() { return (0); }],[found=yes],[found=no],[found=no])
+LIBS=$ac_libs
+  fi
 
   if test "$found" = "yes"; then
 PHP_ADD_LIBRARY($2)
Index: php4/configure.in
diff -u php4/configure.in:1.386 php4/configure.in:1.387
--- php4/configure.in:1.386 Tue Oct 22 20:21:43 2002
+++ php4/configure.in   Thu Oct 24 08:21:06 2002
@@ -1,4 +1,4 @@
-dnl ## $Id: configure.in,v 1.386 2002/10/23 00:21:43 sniper Exp $ -*- sh -*-
+dnl ## $Id: configure.in,v 1.387 2002/10/24 12:21:06 sas Exp $ -*- sh -*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -279,7 +279,7 @@
 PHP_CHECK_FUNC(gethostbyaddr, nsl)
 PHP_CHECK_FUNC(yp_get_default_domain, nsl)
 
-AC_CHECK_LIB(dl, dlopen, [PHP_ADD_LIBRARY(dl)])
+PHP_CHECK_FUNC(dlopen, dl)
 AC_CHECK_LIB(m, sin)
 
 dnl Check for resolver routines.
@@ -802,6 +802,7 @@
 
 PHP_CONFIGURE_PART(Configuring Zend)
 LIBZEND_BASIC_CHECKS
+LIBZEND_DLSYM_CHECK
 LIBZEND_OTHER_CHECKS
 
 TSRM_LIB='TSRM/libtsrm.la'
Index: php4/ext/standard/config.m4
diff -u php4/ext/standard/config.m4:1.44 php4/ext/standard/config.m4:1.45
--- php4/ext/standard/config.m4:1.44Mon Oct 21 19:41:38 2002
+++ php4/ext/standard/config.m4 Thu Oct 24 08:21:06 2002
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.44 2002/10/21 23:41:38 sniper Exp $ -*- sh -*-
+dnl $Id: config.m4,v 1.45 2002/10/24 12:21:06 sas Exp $ -*- sh -*-
 
 divert(3)dnl
 
@@ -189,7 +189,7 @@
 dnl   EXTRA_LIBS="$EXTRA_LIBS -lpam"
 dnl   AC_DEFINE(HAVE_LIBPAM,1,[ ]) ], []) 
 
-AC_CHECK_FUNCS(getcwd getwd)
+AC_CHECK_FUNCS(getcwd getwd asinh acosh atanh log1p hypot)
 
 AC_CRYPT_CAP
 AC_FLUSH_IO
Index: php4/ext/standard/math.c
diff -u php4/ext/standard/math.c:1.90 php4/ext/standard/math.c:1.91
--- php4/ext/standard/math.c:1.90   Tue Oct 15 10:51:01 2002
+++ php4/ext/standard/math.cThu Oct 24 08:21:07 2002
@@ -19,7 +19,7 @@
+--+
 */
 
-/* $Id: math.c,v 1.90 2002/10/15 14:51:01 sterling Exp $ */
+/* $Id: math.c,v 1.91 2002/10/24 12:21:07 sas Exp $ */
 
 #include "php.h"
 #include "php_math.h"
@@ -321,6 +321,7 @@
 
 PHP_FUNCTION(asinh)
 {
+#ifdef HAVE_ASINH
zval **num;
 
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
@@ -329,6 +330,7 @@
convert_to_double_ex(num);
Z_DVAL_P(return_value) = asinh(Z_DVAL_PP(num));
Z_TYPE_P(return_value) = IS_DOUBLE;
+#endif
 }
 
 /* }}} */
@@ -337,6 +339,7 @@
 
 PHP_FUNCTION(acosh)
 {
+#ifdef HAVE_ACOSH
zval **num;
 
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
@@ -345,6 +348,7 @@
convert_to_double_ex(num);
Z_DVAL_P(return_value) = acosh(Z_DVAL_PP(num));
Z_TYPE_P(return_value) = IS_DOUBLE;
+#endif
 }
 
 /* }}} */
@@ -353,6 +357,7 @@
 
 PHP_FUNCTION(atanh)
 {
+#ifdef HAVE_ATANH
zval **num;
 
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
@@ -361,6 +366,7 @@
convert_to_double_ex(num);
Z_DVAL_P(return_value) = atanh(Z_DVAL_PP(num));
Z_TYPE_P(return_value) = IS_DOUBLE;
+#endif
 }
 
 /* }}} */
@@ -504,6 +510,7 @@
 
 PHP_FUNCTION(log1p)
 {
+#ifdef HAVE_LOG1P
zval **num;
 
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
@@ -512,6 +519,7 @@
convert_to_double_ex(num);
Z_DVAL_P(return_value) = log1p(Z_DVAL_PP(num));
Z_TYPE_P(return_value) = IS_DOUBLE;
+#endif
 }
 
 /* }}} */
@@ -577,6 +585,7 @@
 
 PHP_FUNCTION(hypot)
 {
+#ifdef HAVE_HYPOT
zval **num1, **num2;
 
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &num1, &num2) == 
FAILURE) {
@@ -586,6 +595,7 @@
convert_to_double_ex(num2);
Z_DVAL_P(return_value) = hypot(Z_DVAL_PP(num1), Z_DVAL_PP(num2));
Z_TYPE_P(return_value) = IS_DOUBLE;
+#endif
 }
 
 /* }}} */



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




Re: [PHP-CVS] cvs: php4(PHP_4_2_0) /ext/standard image.c

2002-10-24 Thread Derick Rethans
On Thu, 24 Oct 2002, Ananth Kesari wrote:

> Oh ok. Sorry if this caused any inconvenience, but I saw your mail only now!
> 
> Well, I thought I should do it individually since I also had some new 
> files to be added for NetWare under a few different folders. I had to 
> "cvs add ..." and then "cvs commit ..." for these new files. If I had 
> done a "cvs commit" on the "php4" folder, would it have taken care of 
> adding and then committing the new files also under different folders? 
> I know it takes care of the existing files that have changed. 

yeah, that works just fine, but you only need to add them by hand. A 
couple of cvs add's in different folders can be committed with one cvs 
commit in the root dir.

> 
> I am now left with files under TSRM and ZEND folders to check-in. 
> There are a couple of new files for NetWare there also. But I am 
> waiting for write access for me to these areas.

You can write to group@, or provide a patch so that somebody else can 
committ it for you.

regards,
Derick

--

---
 Derick Rethans   http://derickrethans.nl/ 
 JDI Media Solutions
--[ if you hold a unix shell to your ear, do you hear the c? ]-


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




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

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 08:08:54 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/win32 sendmail.c sendmail.h 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/win32/sendmail.c
diff -u php4/win32/sendmail.c:1.24.2.1 php4/win32/sendmail.c:1.24.2.2
--- php4/win32/sendmail.c:1.24.2.1  Tue May 14 10:17:04 2002
+++ php4/win32/sendmail.c   Thu Oct 24 08:08:54 2002
@@ -1,6 +1,6 @@
 
 /* 
- *PHP Sendmail for Windows.
+ *PHP Sendmail for Windows and NetWare.
  *
  *  This file is rewriten specificly for PHPFI.  Some functionality
  *  has been removed (MIME and file attachments).  This code was 
@@ -18,17 +18,31 @@
  *
  */
 
-/* $Id: sendmail.c,v 1.24.2.1 2002/05/14 14:17:04 mfischer Exp $ */
+/* $Id: sendmail.c,v 1.24.2.2 2002/10/24 12:08:54 hyanantha Exp $ */
 
 #include "php.h"   /*php specific */
 #include 
 #include 
+#ifndef NETWARE
 #include 
+#else  /* NETWARE */
+#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 */
+#endif /* NETWARE */
 #include "time.h"
 #include 
+#ifndef NETWARE
 #include 
 #include 
 #include 
+#endif /* NETWARE */
 #include "sendmail.h"
 #include "php_ini.h"
 
@@ -51,18 +65,34 @@
 char Buffer[MAIL_BUFFER_SIZE];
 
 /* socket related data */
+#ifdef NETWARE
+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 */
+#endif /* NETWARE */
 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.0 WIN32";
+#else
+char *php_mailer = "PHP 4.0 NetWare";
+#endif /* NETWARE */
 
 char *get_header(char *h, char *headers);
 
@@ -88,7 +118,8 @@
{"Bad Message Return Path"},
{"Bad Mail Host"},
{"Bad Message File"},
-   {"\"sendmail_from\" NOT set in php.ini"},
+   {"\"sendmail_from\" NOT set in php.ini"},
+
{"Mailserver rejected our \"sendmail_from\" setting"} /* 20 */
 };
 
@@ -113,7 +144,9 @@
int ret;
char *RPath = NULL;
 
+#ifndef NETWARE
WinsockStarted = FALSE;
+#endif
 
if (host == NULL) {
*error = BAD_MAIL_HOST;
@@ -127,8 +160,10 @@
 
if (INI_STR("sendmail_from")){
RPath = estrdup(INI_STR("sendmail_from"));
-   } else {
-   *error = W32_SM_SENDMAIL_FROM_NOT_SET;
+   } else {
+
+   *error = W32_SM_SENDMAIL_FROM_NOT_SET;
+
return FAILURE;
}
 
@@ -166,7 +201,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 */
 }
 
 
@@ -180,11 +222,14 @@
 //***/
 char *GetSMErrorText(int index)
 {
-
+
+
if (MIN_ERROR_INDEX <= index && index < MAX_ERROR_INDEX) {
-   return (ErrorMessages[index]);
+   return (ErrorMessages[index]);
+
} else {
-   return (ErrorMessages[UNKNOWN_ERROR]);
+   return (ErrorMessages[UNKNOWN_ERROR]);
+
}
 }
 
@@ -258,10 +303,13 @@
/* Send mail to all Cc rcpt's */
efree(tempMailTo);
if (headers && (pos1 = strstr(headers, "Cc:"))) {
-   if (NULL == (pos2 = strstr(pos1, "\r\n"))) {
-   tempMailTo = estrndup(pos1, strlen(pos1));
+   if (NULL == (pos2 = strstr(pos1, "\r\n"))) {
+
+   tempMailTo = estrndup(pos1, strlen(pos1));
+
} else {
-   tempMailTo = estrndup(pos1, pos2-pos1);
+   tempMailTo = estrndup(pos1, pos2-pos1);
+
}
 
token = strtok(tempMailTo, ",");
@@ -454,7 +502,11 @@
 // Author/Date:  jcar 20/9/96
 // History:
 ///
+#ifndef NETWARE
 int Post(LPCSTR msg)
+#else
+int Post(char * msg)
+#endif /* NETWARE */
 {
int len = strlen(msg);
int slen;
@@ -529,7 +581,11 @@
 // Author/Date:  jcar 20/9/96
 // History:
 ///
+#ifndef NETWARE
 unsigned long GetAddr(LPSTR szHost)
+#else
+unsigned long GetAddr(char * szHost

Re: [PHP-CVS] cvs: php4(PHP_4_2_0) /ext/standard image.c

2002-10-24 Thread Ananth Kesari
Oh ok. Sorry if this caused any inconvenience, but I saw your mail only now!

Well, I thought I should do it individually since I also had some new files to be 
added for NetWare under a few different folders. I had to "cvs add ..." and then "cvs 
commit ..." for these new files. If I had done a "cvs commit" on the "php4" folder, 
would it have taken care of adding and then committing the new files also under 
different folders? I know it takes care of the existing files that have changed.

I am now left with files under TSRM and ZEND folders to check-in. There are a couple 
of new files for NetWare there also. But I am waiting for write access for me to these 
areas.

Thanks,
Ananth.

>>> Derick Rethans <[EMAIL PROTECTED]> 10/24/02 05:25AM >>>
On Thu, 24 Oct 2002, Anantha Kesari H Y wrote:

> hyanantha Thu Oct 24 07:16:57 2002 EDT
> 
>   Modified files:  (Branch: PHP_4_2_0)
> /php4/ext/standardimage.c 
>   Log:
>   NetWare related changes/modifications.

You can also commit all files in one run ... please :)

Derick

>   
>   
> Index: php4/ext/standard/image.c
> diff -u php4/ext/standard/image.c:1.44.2.2 php4/ext/standard/image.c:1.44.2.3
> --- php4/ext/standard/image.c:1.44.2.2Tue Mar 12 00:57:28 2002
> +++ php4/ext/standard/image.c Thu Oct 24 07:16:57 2002
> @@ -16,7 +16,7 @@
> |  Marcus Boerger <[EMAIL PROTECTED]>  |
> +--+
>   */
> -/* $Id: image.c,v 1.44.2.2 2002/03/12 05:57:28 helly Exp $ */
> +/* $Id: image.c,v 1.44.2.3 2002/10/24 11:16:57 hyanantha Exp $ */
>  /*
>   * Based on Daniel Schmitt's imageinfo.c which carried the following
>   * Copyright notice.
> @@ -39,6 +39,11 @@
>  
>  #include "php.h"
>  #include 
> +
> +#if defined(NETWARE) && !defined(NEW_LIBC)
> +#include 
> +#endif
> +
>  #if HAVE_FCNTL_H
>  #include 
>  #endif
> @@ -82,10 +87,10 @@
>  
>   FP_FREAD(temp, 3, socketd, fp, issock);  /* fseek(fp, 6L, SEEK_SET); */
>  
> - FP_FREAD(a, sizeof(a), socketd, fp, issock); /* fread(a, sizeof(a), 1, fp); */
> + FP_FREAD((char*)a, sizeof(a), socketd, fp, issock); /*  fread(a, sizeof(a), 1, 
>fp); */  /* Type-casting done due to NetWare */
>   result->width = (unsigned short)a[0] | (((unsigned short)a[1])<<8);
>  
> - FP_FREAD(a, sizeof(a), socketd, fp, issock); /* fread(a, sizeof(a), 1, fp); */
> + FP_FREAD((char *)a, sizeof(a), socketd, fp, issock); /* fread(a, sizeof(a), 1, 
>fp); */  /* Type-casting done due to NetWare */
>   result->height = (unsigned short)a[0] | (((unsigned short)a[1])<<8);
>  
>   return result;
> @@ -104,7 +109,7 @@
>   result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo));
>   FP_FREAD(temp, sizeof(temp), socketd, fp, issock);
>  
> - if((FP_FREAD(a, sizeof(a), socketd, fp, issock)) <= 0) {
> + if((FP_FREAD((char *)a, sizeof(a), socketd, fp, issock)) <= 0) {/* 
>Type-casting done due to NetWare */
>   in_height = 0;
>   in_width  = 0;
>   } else {
> @@ -169,7 +174,7 @@
>   result = (struct gfxinfo *) ecalloc (1, sizeof (struct gfxinfo));
>   FP_FREAD(temp, 5, socketd, fp, issock); /*  fseek(fp, 8L, SEEK_SET); */
>  
> - FP_FREAD(a, sizeof(a), socketd, fp, issock); /* fread(a, sizeof(a), 1, fp); */
> + FP_FREAD((char *)a, sizeof(a), socketd, fp, issock); /* fread(a, sizeof(a), 1, 
>fp); */  /* Type-casting done due to NetWare */
>   bits = php_swf_get_bits (a, 0, 5);
>   result->width = (php_swf_get_bits (a, 5 + bits, bits) -
>   php_swf_get_bits (a, 5, bits)) / 20;
> @@ -192,7 +197,7 @@
>  
>   FP_FREAD(temp, sizeof(temp), socketd, fp, issock);  /* fseek(fp, 16L, 
>SEEK_SET); */
>  
> - if((FP_FREAD(a, sizeof(a), socketd, fp, issock)) <= 0) {
> + if((FP_FREAD((char *)a, sizeof(a), socketd, fp, issock)) <= 0) {/* 
>Type-casting done due to NetWare */
>   in_width  = 0;
>   in_height = 0;
>   } else {
> @@ -249,8 +254,7 @@
>   unsigned char a[2];
>  
>   /* just return 0 if we hit the end-of-file */
> - if((FP_FREAD(a, sizeof(a), socketd, fp, issock)) <= 0) return 0;
> -
> + if((FP_FREAD((char *)a, sizeof(a), socketd, fp, issock)) <= 0) return 0;   
> /* Type-casting done due to NetWare */
>   return (((unsigned short) a[ 0 ]) << 8) + ((unsigned short) a[ 1 ]);
>  }
>  /* }}} */
> @@ -316,16 +320,16 @@
>   buffer = emalloc(length);
>   if ( !buffer) return;
>  
> - if (FP_FREAD(buffer, (long) length, socketd, fp, issock) <= 0) {
> + if (FP_FREAD((char *)buffer, (long) length, socketd, fp, issock) <= 0) {   
> /* Type-casting done due to NetWare */
>   efree(buffer);
>   return;
>   }
>  
> - sprintf(markername, "APP%d", marker - M_APP0);
> + sprintf((char *)markername, "APP%d", marker - M_APP0);  /* Type-casting done 
>due to NetWare */
>  
> -   

[PHP-CVS] cvs: php4(PHP_4_2_0) /sapi/cli php_cli.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:55:32 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/sapi/cli  php_cli.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/sapi/cli/php_cli.c
diff -u php4/sapi/cli/php_cli.c:1.7.2.5 php4/sapi/cli/php_cli.c:1.7.2.6
--- php4/sapi/cli/php_cli.c:1.7.2.5 Thu Jun 13 04:40:33 2002
+++ php4/sapi/cli/php_cli.c Thu Oct 24 07:55:32 2002
@@ -33,6 +33,18 @@
 #include "win32/time.h"
 #include "win32/signal.h"
 #include 
+#elif defined(NETWARE)
+#ifdef NEW_LIBC
+#include 
+#else
+#include "netware/time_nw.h"
+#endif
+/*#include "netware/signal_nw.h"*/
+/*#include "netware/env.h"*//* Temporary */
+/*#include */
+#ifdef USE_WINSOCK
+#include 
+#endif
 #else
 #include "build-defs.h"
 #endif
@@ -362,6 +374,15 @@
 
/* startup after we get the above ini override se we get things right */
if (php_module_startup(&cli_sapi_module)==FAILURE) {
+#ifdef NETWARE
+   /*  Without the below two functions, it will leak memory!!
+   Don't know why they were not there in the first place.
+   */
+   sapi_shutdown();
+#ifdef ZTS
+   tsrm_shutdown();
+#endif
+#endif
return FAILURE;
}
 
@@ -643,6 +664,13 @@
} zend_end_try();
 
php_module_shutdown(TSRMLS_C);
+
+#ifdef NETWARE
+   /*  Without the below function, it will leak memory!!
+   Don't know why it was not there in the first place.
+   */
+   sapi_shutdown();
+#endif
 
 #ifdef ZTS
tsrm_shutdown();



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /sapi/apache2filter sapi_apache2.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:54:59 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/sapi/apache2filtersapi_apache2.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/sapi/apache2filter/sapi_apache2.c
diff -u php4/sapi/apache2filter/sapi_apache2.c:1.61.2.14 
php4/sapi/apache2filter/sapi_apache2.c:1.61.2.15
--- php4/sapi/apache2filter/sapi_apache2.c:1.61.2.14Thu Aug 15 18:27:03 2002
+++ php4/sapi/apache2filter/sapi_apache2.c  Thu Oct 24 07:54:58 2002
@@ -43,7 +43,11 @@
 #include "ap_mpm.h"
 
 #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;
 



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /sapi/apache sapi_apache.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:54:21 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/sapi/apache   sapi_apache.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/sapi/apache/sapi_apache.c
diff -u php4/sapi/apache/sapi_apache.c:1.39 php4/sapi/apache/sapi_apache.c:1.39.2.1
--- php4/sapi/apache/sapi_apache.c:1.39 Tue Dec 11 10:31:55 2001
+++ php4/sapi/apache/sapi_apache.c  Thu Oct 24 07:54:21 2002
@@ -19,13 +19,21 @@
| Stig Bakken <[EMAIL PROTECTED]>|
+--+
  */
-/* $Id: sapi_apache.c,v 1.39 2001/12/11 15:31:55 sebastian Exp $ */
+/* $Id: sapi_apache.c,v 1.39.2.1 2002/10/24 11:54:21 hyanantha Exp $ */
 
 #define NO_REGEX_EXTRA_H
 #ifdef WIN32
 #include 
 #include 
 #endif
+
+#ifdef NETWARE
+#ifdef NEW_LIBC /* Works fine for both Winsock and Berkeley sockets */
+#include 
+#else
+#include 
+#endif
+#endif /* NETWARE */
 
 #include "php.h"
 



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




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

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:54:04 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/sapi/apache   php_apache.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/sapi/apache/php_apache.c
diff -u php4/sapi/apache/php_apache.c:1.56 php4/sapi/apache/php_apache.c:1.56.2.1
--- php4/sapi/apache/php_apache.c:1.56  Thu Feb 28 03:27:19 2002
+++ php4/sapi/apache/php_apache.c   Thu Oct 24 07:54:03 2002
@@ -17,7 +17,7 @@
|  David Sklar <[EMAIL PROTECTED]> |
+--+
  */
-/* $Id: php_apache.c,v 1.56 2002/02/28 08:27:19 sebastian Exp $ */
+/* $Id: php_apache.c,v 1.56.2.1 2002/10/24 11:54:03 hyanantha Exp $ */
 
 #define NO_REGEX_EXTRA_H
 
@@ -26,6 +26,14 @@
 #include 
 #endif
 
+#ifdef NETWARE
+#ifdef NEW_LIBC /* Works fine for both Winsock and Berkeley sockets */
+#include 
+#else
+#include 
+#endif
+#endif /* NETWARE */
+
 #include "php.h"
 #include "ext/standard/head.h"
 #include "php_globals.h"
@@ -51,7 +59,7 @@
 php_apache_info_struct php_apache_info;
 #endif
 
-#ifdef PHP_WIN32
+#if defined(PHP_WIN32) || defined(NETWARE)
 #include "zend.h"
 #include "ap_compat.h"
 #else
@@ -101,7 +109,7 @@
 static PHP_MINIT_FUNCTION(apache)
 {
 #ifdef ZTS
-   ts_allocate_id(&php_apache_info_id, sizeof(php_apache_info_struct), 
php_apache_globals_ctor, NULL);
+   ts_allocate_id(&php_apache_info_id, sizeof(php_apache_info_struct), (void 
+(*)(void *, void ***))php_apache_globals_ctor, NULL); /* Type-casting done due to 
+NetWare */
 #else
php_apache_globals_ctor(&php_apache_info TSRMLS_CC);
 #endif
@@ -133,6 +141,9 @@
Terminate apache process after this request */
 PHP_FUNCTION(apache_child_terminate)
 {
+#if defined(NETWARE) && defined(NETWARE_CLIB_BROKER)
+   EnterClib();
+#endif
 #ifndef MULTITHREAD
if (AP(terminate_child)) {
ap_child_terminate( ((request_rec *)SG(server_context)) );
@@ -142,6 +153,9 @@
 #else
php_error(E_WARNING, "apache_child_terminate() is not supported in 
this build");
 #endif
+#if defined(NETWARE) && defined(NETWARE_CLIB_BROKER)
+   ExitClib();
+#endif
 }
 /* }}} */
 
@@ -153,6 +167,9 @@
char *note_val;
int arg_count = ARG_COUNT(ht);
 
+#if defined(NETWARE) && defined(NETWARE_CLIB_BROKER)
+   EnterClib();
+#endif
if (arg_count<1 || arg_count>2 ||
zend_get_parameters_ex(arg_count, &arg_name, &arg_val) ==FAILURE ) {
WRONG_PARAM_COUNT;
@@ -166,6 +183,9 @@
table_set(((request_rec *)SG(server_context))->notes, 
(*arg_name)->value.str.val, (*arg_val)->value.str.val);
}
 
+#if defined(NETWARE) && defined(NETWARE_CLIB_BROKER)
+   ExitClib();
+#endif
if (note_val) {
RETURN_STRING(note_val, 1);
} else {
@@ -180,7 +200,7 @@
 {
module *modp = NULL;
char output_buf[128];
-#if !defined(WIN32) && !defined(WINNT)
+#if !defined(WIN32) && !defined(WINNT) /* This seems to be working for NetWare */
char name[64];
char modulenames[1024];
char *p;
@@ -192,6 +212,9 @@
extern gid_t group_id;
extern int max_requests_per_child;
 
+#if defined(NETWARE) && defined(NETWARE_CLIB_BROKER)
+   EnterClib();
+#endif
serv = ((request_rec *) SG(server_context))->server;
 
 
@@ -201,6 +224,10 @@
php_info_print_table_row(1, "Apache for Windows 95/NT");
php_info_print_table_end();
php_info_print_table_start();
+#elif defined(NETWARE)
+   php_info_print_table_row(1, "Apache for NetWare");
+   php_info_print_table_end();
+   php_info_print_table_start();
 #else
php_info_print_table_row(2, "APACHE_INCLUDE", PHP_APACHE_INCLUDE);
php_info_print_table_row(2, "APACHE_TARGET", PHP_APACHE_TARGET);
@@ -216,7 +243,7 @@
php_info_print_table_row(2, "Apache API Version", output_buf);
sprintf(output_buf, "%s:%u", serv->server_hostname, serv->port);
php_info_print_table_row(2, "Hostname:Port", output_buf);
-#if !defined(WIN32) && !defined(WINNT)
+#if !defined(WIN32) && !defined(WINNT) /* This seems to be working for NetWare */
sprintf(output_buf, "%s(%d)/%d", user_name, (int)user_id, (int)group_id);
php_info_print_table_row(2, "User/Group", output_buf);
sprintf(output_buf, "Per Child: %d - Keep Alive: %s - Max Per Connection: %d", 
max_requests_per_child, serv->keep_alive ? "on":"off", serv->keep_alive_max);
@@ -224,7 +251,7 @@
 #endif
sprintf(output_buf, "Connection: %d - Keep-Alive: %d", serv->timeout, 
serv->keep_alive_timeout);
php_info_print_table_row(2, "Timeouts", output_buf);
-#if !defined(WIN32) && !defined(WINNT)
+#if !defined(WIN32) && !defined(WINNT) /* This seems to be working for NetWare */
php_info_print_table_row(2, "Server Root", server_root);
 
strcpy(modulenames, "");
@@ -238,6 +265,7 @@
  

[PHP-CVS] cvs: php4(PHP_4_2_0) /sapi/apache mod_php4.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:34:14 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/sapi/apache   mod_php4.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/sapi/apache/mod_php4.c
diff -u php4/sapi/apache/mod_php4.c:1.127.2.4 php4/sapi/apache/mod_php4.c:1.127.2.5
--- php4/sapi/apache/mod_php4.c:1.127.2.4   Thu Aug 22 10:45:56 2002
+++ php4/sapi/apache/mod_php4.c Thu Oct 24 07:34:14 2002
@@ -17,7 +17,7 @@
| PHP 4.0 patches by Zeev Suraski <[EMAIL PROTECTED]>  |
+--+
  */
-/* $Id: mod_php4.c,v 1.127.2.4 2002/08/22 14:45:56 rasmus Exp $ */
+/* $Id: mod_php4.c,v 1.127.2.5 2002/10/24 11:34:14 hyanantha Exp $ */
 
 #define NO_REGEX_EXTRA_H
 #ifdef WIN32
@@ -25,6 +25,18 @@
 #include 
 #endif
 
+#ifdef NETWARE
+#define SIGPIPE SIGINT
+#ifdef NEW_LIBC /* Works fine for both Winsock and Berkeley sockets */
+#include 
+#else  /* NEW_LIBC */
+#include 
+#endif /* NEW_LIBC */
+/* Security related functions: Using the dynamically exported functions */
+extern int NWSECInitializeSession(unsigned int ScriptLangType, unsigned int 
+ExecutionMode, char *pszPublicDocDir);
+extern int NWSECTerminateSession();
+#endif /* NETWARE */
+
 #include "zend.h"
 #include "php.h"
 #include "php_variables.h"
@@ -127,13 +139,20 @@
 static int sapi_apache_ub_write(const char *str, uint str_length TSRMLS_DC)
 {
int ret=0;
-   
+
+#if defined(NETWARE) && defined(NETWARE_CLIB_BROKER)
+   EnterClib();
+#endif
+
if (SG(server_context)) {
ret = rwrite(str, str_length, (request_rec *) SG(server_context));
}
if (ret != str_length) {
php_handle_aborted_connection();
}
+#if defined(NETWARE) && defined(NETWARE_CLIB_BROKER)
+   ExitClib();
+#endif
return ret;
 }
 /* }}} */
@@ -142,6 +161,9 @@
  */
 static void sapi_apache_flush(void *server_context)
 {
+#if defined(NETWARE) && defined(NETWARE_CLIB_BROKER)
+   EnterClib();
+#endif
if (server_context) {
 #if MODULE_MAGIC_NUMBER > 19970110
rflush((request_rec *) server_context);
@@ -149,6 +171,9 @@
bflush((request_rec *) server_context->connection->client);
 #endif
}
+#if defined(NETWARE) && defined(NETWARE_CLIB_BROKER)
+   ExitClib();
+#endif
 }
 /* }}} */
 
@@ -160,7 +185,13 @@
request_rec *r = (request_rec *) SG(server_context);
void (*handler)(int);
 
+#if defined(NETWARE) && defined(NETWARE_CLIB_BROKER)
+   EnterClib();
+#endif
+
+#ifndef NETWARE
handler = signal(SIGPIPE, SIG_IGN);
+#endif
while (total_read_bytessubprocess_env, "HTTP_COOKIE");
+#else
+char *temp;
+
+EnterClib();
+temp = (char *) table_get(((request_rec *) SG(server_context))->subprocess_env, 
+"HTTP_COOKIE");
+ExitClib();
+
+return temp;
+#endif
 }
 /* }}} */
 
@@ -202,6 +248,9 @@
header_content++;
} while (*header_content==' ');
 
+#if defined(NETWARE) && defined(NETWARE_CLIB_BROKER)
+   EnterClib();
+#endif
if (!strcasecmp(header_name, "Content-Type")) {
r->content_type = pstrdup(r->pool, header_content);
} else if (!strcasecmp(header_name, "Set-Cookie")) {
@@ -214,6 +263,9 @@
 
efree(sapi_header->header);

+#if defined(NETWARE) && defined(NETWARE_CLIB_BROKER)
+   ExitClib();
+#endif
return 0;  /* don't use the default SAPI mechanism, Apache duplicates this 
functionality */
 }
 /* }}} */
@@ -226,8 +278,14 @@
return SAPI_HEADER_SEND_FAILED;
}
 
+#if defined(NETWARE) && defined(NETWARE_CLIB_BROKER)
+   EnterClib();
+#endif
((request_rec *) SG(server_context))->status = 
SG(sapi_headers).http_response_code;
send_http_header((request_rec *) SG(server_context));
+#if defined(NETWARE) && defined(NETWARE_CLIB_BROKER)
+   ExitClib();
+#endif
return SAPI_HEADER_SENT_SUCCESSFULLY;
 }
 /* }}} */
@@ -242,6 +300,9 @@
zval **path_translated;
HashTable *symbol_table;
 
+#if defined(NETWARE) && defined(NETWARE_CLIB_BROKER)
+   EnterClib();
+#endif
for (i = 0; i < arr->nelts; i++) {
char *val;
 
@@ -269,6 +330,9 @@
}
 
php_register_variable("PHP_SELF", ((request_rec *) SG(server_context))->uri, 
track_vars_array TSRMLS_CC);
+#if defined(NETWARE) && defined(NETWARE_CLIB_BROKER)
+   ExitClib();
+#endif
 }
 /* }}} */
 
@@ -291,6 +355,9 @@
 {
TSRMLS_FETCH();
 
+#if defined(NETWARE) && defined(NETWARE_CLIB_BROKER)
+   EnterClib();
+#endif
if (SG(server_context)) {
 #if MODULE_MAGIC_NUMBER >= 19970831
aplog_error(NULL, 0, APLOG_ERR | APLOG_NOERRNO, ((request_rec *) 
SG(server_context))->server, "%s", message);
@@ -301,6 +368,9 @@
fprintf(stderr, "%s", message);
fprintf(stderr, "\n");
}
+#if defined(NETWARE) && defined(

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

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:33:39 2002 EDT

  Added files: (Branch: PHP_4_2_0)
/php4/sapi/apache   libpre.c 
  Log:
  NetWare related file.
  
  

Index: php4/sapi/apache/libpre.c
+++ php4/sapi/apache/libpre.c



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /main SAPI.h

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:30:40 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/main  SAPI.h 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/main/SAPI.h
diff -u php4/main/SAPI.h:1.80.2.1 php4/main/SAPI.h:1.80.2.2
--- php4/main/SAPI.h:1.80.2.1   Sat Jul 27 09:15:42 2002
+++ php4/main/SAPI.hThu Oct 24 07:30:40 2002
@@ -111,7 +111,11 @@
sapi_headers_struct sapi_headers;
int read_post_bytes;
unsigned char headers_sent;
+#if (defined(NETWARE) && defined(CLIB_STAT_PATCH))
+struct stat_libc global_stat;
+#else
struct stat global_stat;
+#endif
char *default_mimetype;
char *default_charset;
HashTable *rfc1867_uploaded_files;
@@ -147,7 +151,11 @@
 SAPI_API int sapi_register_default_post_reader(void (*default_post_reader)(TSRMLS_D));
 
 SAPI_API int sapi_flush(TSRMLS_D);
+#if (defined(NETWARE) && defined(CLIB_STAT_PATCH))
+SAPI_API struct stat_libc *sapi_get_stat(TSRMLS_D);
+#else
 SAPI_API struct stat *sapi_get_stat(TSRMLS_D);
+#endif
 SAPI_API char *sapi_getenv(char *name, size_t name_len TSRMLS_DC);
 
 SAPI_API char *sapi_get_default_content_type(TSRMLS_D);



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /main SAPI.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:30:27 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/main  SAPI.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/main/SAPI.c
diff -u php4/main/SAPI.c:1.129.2.4 php4/main/SAPI.c:1.129.2.5
--- php4/main/SAPI.c:1.129.2.4  Sun Sep  8 20:32:40 2002
+++ php4/main/SAPI.cThu Oct 24 07:30:26 2002
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: SAPI.c,v 1.129.2.4 2002/09/09 00:32:40 yohgaki Exp $ */
+/* $Id: SAPI.c,v 1.129.2.5 2002/10/24 11:30:26 hyanantha Exp $ */
 
 #include 
 #include 
@@ -683,10 +683,20 @@
}
 }
 
+#if (defined(NETWARE) && defined(CLIB_STAT_PATCH))
+SAPI_API struct stat_libc *sapi_get_stat(TSRMLS_D)
+#else
 SAPI_API struct stat *sapi_get_stat(TSRMLS_D)
+#endif
 {
if (sapi_module.get_stat) {
+#if (defined(NETWARE) && defined(CLIB_STAT_PATCH))
+/*  This kind of type-casting is actually wrong;
+   but doing it for now since global_stat doesn't seem to be used 
+anywhere particularly */
+return ((struct stat_libc*)sapi_module.get_stat(TSRMLS_C));
+#else
return sapi_module.get_stat(TSRMLS_C);
+#endif
} else {
if (!SG(request_info).path_translated || 
(VCWD_STAT(SG(request_info).path_translated, &SG(global_stat))==-1)) {
return NULL;



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /main safe_mode.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:30:10 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/main  safe_mode.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/main/safe_mode.c
diff -u php4/main/safe_mode.c:1.42.2.2 php4/main/safe_mode.c:1.42.2.3
--- php4/main/safe_mode.c:1.42.2.2  Wed Mar 20 04:02:54 2002
+++ php4/main/safe_mode.c   Thu Oct 24 07:30:10 2002
@@ -15,7 +15,7 @@
| Author: Rasmus Lerdorf <[EMAIL PROTECTED]>|
+--+
  */
-/* $Id: safe_mode.c,v 1.42.2.2 2002/03/20 09:02:54 sesser Exp $ */
+/* $Id: safe_mode.c,v 1.42.2.3 2002/10/24 11:30:10 hyanantha Exp $ */
 
 #include "php.h"
 
@@ -45,7 +45,11 @@
 
 PHPAPI int php_checkuid(const char *filename, char *fopen_mode, int mode)
 {
+#if (defined(NETWARE) && defined(CLIB_STAT_PATCH))
+struct stat_libc sb;
+#else
struct stat sb;
+#endif
int ret, nofile=0;
long uid=0L, gid=0L, duid=0L, dgid=0L;
char path[MAXPATHLEN];
@@ -170,7 +174,11 @@
 PHPAPI char *php_get_current_user()
 {
struct passwd *pwd;
+#if (defined(NETWARE) && defined(CLIB_STAT_PATCH))
+   struct stat_libc *pstat;
+#else
struct stat *pstat;
+#endif
TSRMLS_FETCH();
 
if (SG(request_info).current_user) {
@@ -181,7 +189,11 @@
USE_SAPI is defined, because cgi will also be
interfaced in USE_SAPI */
 
+#if (defined(NETWARE) && defined(CLIB_STAT_PATCH))
+   pstat = (struct stat_libc *)sapi_get_stat(TSRMLS_C);
+#else
pstat = sapi_get_stat(TSRMLS_C);
+#endif
 
if (!pstat) {
return empty_string;



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /main reentrancy.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:29:51 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/main  reentrancy.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/main/reentrancy.c
diff -u php4/main/reentrancy.c:1.33 php4/main/reentrancy.c:1.33.2.1
--- php4/main/reentrancy.c:1.33 Thu Feb 28 03:27:04 2002
+++ php4/main/reentrancy.c  Thu Oct 24 07:29:51 2002
@@ -28,6 +28,11 @@
 #include "win32/readdir.h"
 #endif
 
+#if defined(NETWARE) && !defined(NEW_LIBC)
+/*#include */
+#include 
+#endif
+
 #include "php_reentrancy.h"
 #include "ext/standard/php_rand.h"   /* for RAND_MAX */
 
@@ -113,6 +118,51 @@
 }
 
 #endif
+
+/*
+   Re-entrant versions of functions seem to be better for loading NLMs in 
+different address space.
+   Since we have them now in LibC, we might as well make use of them.
+*/
+#if defined(NETWARE)
+
+#define HAVE_LOCALTIME_R 1
+#define HAVE_CTIME_R 1
+#define HAVE_ASCTIME_R 1
+#define HAVE_GMTIME_R 1
+
+PHPAPI struct tm *php_localtime_r(const time_t *const timep, struct tm *p_tm)
+{
+/* Modified according to LibC definition : Venkat (1/5/02) */
+   if (localtime_r(timep, p_tm) != NULL)
+   return (p_tm);
+   return (NULL);
+}
+
+PHPAPI char *php_ctime_r(const time_t *clock, char *buf)
+{
+/* Modified according to LibC definition : Venkat (30/4/02) */
+   if (ctime_r(clock, buf) != NULL)
+   return (buf);
+   return (NULL);
+}
+
+PHPAPI char *php_asctime_r(const struct tm *tm, char *buf)
+{
+/* Modified according to LibC definition : Venkat (30/4/02) */
+   if (asctime_r(tm, buf) != NULL)
+   return (buf);
+   return (NULL);
+}
+
+PHPAPI struct tm *php_gmtime_r(const time_t *const timep, struct tm *p_tm)
+{
+/* Modified according to LibC definition : Venkat (1/5/02) */
+   if (gmtime_r(timep, p_tm) != NULL)
+   return (p_tm);
+   return (NULL);
+}
+
+#endif /* NETWARE */
 
 #if !defined(HAVE_POSIX_READDIR_R)
 



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /main php_syslog.h

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:29:26 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/main  php_syslog.h 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/main/php_syslog.h
diff -u php4/main/php_syslog.h:1.5 php4/main/php_syslog.h:1.5.8.1
--- php4/main/php_syslog.h:1.5  Sat Feb 24 16:08:15 2001
+++ php4/main/php_syslog.h  Thu Oct 24 07:29:26 2002
@@ -3,6 +3,11 @@
 
 #ifdef PHP_WIN32
 #include "win32/syslog.h"
+#elif defined(NETWARE)
+# include "config.nw.h"
+#ifdef HAVE_SYSLOG_H
+#include 
+#endif
 #else
 #include "php_config.h"
 #ifdef HAVE_SYSLOG_H



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /main php_sprintf.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:29:04 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/main  php_sprintf.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/main/php_sprintf.c
diff -u php4/main/php_sprintf.c:1.12 php4/main/php_sprintf.c:1.12.2.1
--- php4/main/php_sprintf.c:1.12Thu Feb 28 03:27:04 2002
+++ php4/main/php_sprintf.c Thu Oct 24 07:29:04 2002
@@ -16,11 +16,15 @@
+--+
  */
 
-/* $Id: php_sprintf.c,v 1.12 2002/02/28 08:27:04 sebastian Exp $ */
+/* $Id: php_sprintf.c,v 1.12.2.1 2002/10/24 11:29:04 hyanantha Exp $ */
 
 #include 
 #include 
+#ifndef NETWARE
 #include "php_config.h"
+#else
+#include "config.nw.h"
+#endif
 
 #if PHP_BROKEN_SPRINTF
 



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /main php_open_temporary_file.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:28:41 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/main  php_open_temporary_file.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/main/php_open_temporary_file.c
diff -u php4/main/php_open_temporary_file.c:1.14 
php4/main/php_open_temporary_file.c:1.14.2.1
--- php4/main/php_open_temporary_file.c:1.14Thu Feb 28 03:27:03 2002
+++ php4/main/php_open_temporary_file.c Thu Oct 24 07:28:40 2002
@@ -29,6 +29,19 @@
 #define O_RDONLY _O_RDONLY
 #include "win32/param.h"
 #include "win32/winutil.h"
+#elif defined(NETWARE)
+#ifdef USE_WINSOCK
+/*#include */
+#include 
+#else
+#include 
+#endif
+#ifdef NEW_LIBC
+#include 
+#else
+#include "netware/param.h"
+#endif
+#include "netware/mktemp.h"
 #else
 #include 
 #include 
@@ -95,6 +108,9 @@
 #ifndef PHP_WIN32
int fd;
 #endif
+#ifdef NETWARE
+char *file_path = NULL;
+#endif
 
if (!path) {
return NULL;
@@ -115,6 +131,14 @@
 #ifdef PHP_WIN32
if (GetTempFileName(path, pfx, 0, opened_path)) {
fp = VCWD_FOPEN(opened_path, "wb");
+   } else {
+   fp = NULL;
+   }
+#elif defined(NETWARE)
+/* Using standard mktemp() implementation for NetWare */
+file_path = mktemp(opened_path);
+   if (file_path) {
+   fp = VCWD_FOPEN(file_path, "wb");
} else {
fp = NULL;
}



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /main php_logos.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:28:10 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/main  php_logos.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/main/php_logos.c
diff -u php4/main/php_logos.c:1.13 php4/main/php_logos.c:1.13.2.1
--- php4/main/php_logos.c:1.13  Thu Feb 28 03:27:03 2002
+++ php4/main/php_logos.c   Thu Oct 24 07:28:10 2002
@@ -84,7 +84,7 @@
sapi_add_header(content_header, len, 1);
free(content_header);
 
-   PHPWRITE(logo_image->data, logo_image->size);
+   PHPWRITE((const char*)logo_image->data, logo_image->size);  /* 
+Type-casting done due to NetWare */
return 1;
 }
 



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /main php_ini.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:27:55 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/main  php_ini.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/main/php_ini.c
diff -u php4/main/php_ini.c:1.80 php4/main/php_ini.c:1.80.2.1
--- php4/main/php_ini.c:1.80Mon Mar  4 19:21:28 2002
+++ php4/main/php_ini.c Thu Oct 24 07:27:55 2002
@@ -16,10 +16,10 @@
+--+
  */
 
-/* $Id: php_ini.c,v 1.80 2002/03/05 00:21:28 fmk Exp $ */
+/* $Id: php_ini.c,v 1.80.2.1 2002/10/24 11:27:55 hyanantha Exp $ */
 
 #include "php.h"
-#ifndef PHP_WIN32
+#if !defined(PHP_WIN32) && !defined(NETWARE)
 #include "build-defs.h"
 #endif
 #include "ext/standard/info.h"



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /main php_compat.h

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:27:39 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/main  php_compat.h 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/main/php_compat.h
diff -u php4/main/php_compat.h:1.10 php4/main/php_compat.h:1.10.4.1
--- php4/main/php_compat.h:1.10 Mon Jul 30 11:10:15 2001
+++ php4/main/php_compat.h  Thu Oct 24 07:27:39 2002
@@ -3,6 +3,8 @@
 
 #ifdef PHP_WIN32
 #include "config.w32.h"
+#elif defined(NETWARE)
+# include "config.nw.h"
 #else
 #include "php_config.h"
 #endif



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /main php.h

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:27:24 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/main  php.h 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/main/php.h
diff -u php4/main/php.h:1.159 php4/main/php.h:1.159.2.1
--- php4/main/php.h:1.159   Thu Feb 28 19:16:58 2002
+++ php4/main/php.h Thu Oct 24 07:27:23 2002
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: php.h,v 1.159 2002/03/01 00:16:58 shane Exp $ */
+/* $Id: php.h,v 1.159.2.1 2002/10/24 11:27:23 hyanantha Exp $ */
 
 #ifndef PHP_H
 #define PHP_H
@@ -61,6 +61,13 @@
 #define PHP_DIR_SEPARATOR '/'
 #endif
 
+#ifdef NETWARE
+/*#include */
+#define PHP_UNAME  "NetWare"/* For php_get_uname() function */
+#define PHP_OS  PHP_UNAME  /* This is obtained using 'uname' on Unix and assigned 
+in the case of Windows.
+ For NetWare, we'll 
+do it this way atleast for now */
+#endif
+
 #include "php_regex.h"
 
 
@@ -171,6 +178,13 @@
 # ifdef PHP_WIN32
 #include "win32/pwd.h"
 #include "win32/param.h"
+#elif defined(NETWARE)
+#ifdef NEW_LIBC
+#include 
+#else
+#include "NetWare/param.h"
+#endif
+#include "NetWare/pwd.h"
 # else
 #include 
 #include 
@@ -212,7 +226,17 @@
 extern pval *data;
 #if !defined(PHP_WIN32)
 extern char **environ;
+#ifdef NETWARE
+#ifdef NEW_LIBC
+/*#undef environ*/  /* For now, so that our 'environ' implementation is used */
 #define php_sleep sleep
+#else
+#define php_sleep   delay   /* sleep() and usleep() are not available */
+#define usleep  delay
+#endif
+#else
+#define php_sleep sleep
+#endif
 #endif
 
 #ifdef PHP_PWRITE_64
@@ -291,7 +315,7 @@
 #include "main/php_output.h"
 #define PHPWRITE(str, str_len) php_body_write((str), (str_len) TSRMLS_CC)
 #define PUTS(str)  php_body_write((str), 
strlen((str)) TSRMLS_CC)
-#define PUTC(c)(php_body_write(&(c), 
1 TSRMLS_CC), (c))
+#define PUTC(c)(php_body_write((const 
+char*)(&(c)), 1 TSRMLS_CC), (c)) /* Type-casting done due to NetWare */
 #define PHPWRITE_H(str, str_len)   php_header_write((str), (str_len) TSRMLS_CC)
 #define PUTS_H(str)php_header_write((str), 
strlen((str)) TSRMLS_CC)
 #define PUTC_H(c)  (php_header_write(&(c), 1 
TSRMLS_CC), (c))



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /main network.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:27:00 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/main  network.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/main/network.c
diff -u php4/main/network.c:1.30 php4/main/network.c:1.30.2.1
--- php4/main/network.c:1.30Thu Feb 28 03:27:03 2002
+++ php4/main/network.c Thu Oct 24 07:27:00 2002
@@ -15,7 +15,7 @@
| Author: Stig Venaas <[EMAIL PROTECTED]>  |
+--+
  */
-/* $Id: network.c,v 1.30 2002/02/28 08:27:03 sebastian Exp $ */
+/* $Id: network.c,v 1.30.2.1 2002/10/24 11:27:00 hyanantha Exp $ */
 
 #include "php.h"
 
@@ -24,6 +24,13 @@
 #include 
 #define O_RDONLY _O_RDONLY
 #include "win32/param.h"
+#elif defined(NETWARE)
+#ifdef NEW_LIBC
+#include 
+#include 
+#else
+#include "netware/time_nw.h"
+#endif
 #else
 #include 
 #endif
@@ -41,7 +48,21 @@
 #include 
 #endif
 
-#ifndef PHP_WIN32
+/* Rearranging... */
+#if defined(NETWARE)
+#ifdef USE_WINSOCK
+/*#include */
+#include 
+#else
+/* New headers for socket stuff */
+#ifdef NEW_LIBC
+#include 
+#include 
+#include 
+#endif
+#include 
+#endif
+#elif !defined(PHP_WIN32)
 #include 
 #include 
 #if HAVE_ARPA_INET_H
@@ -49,13 +70,14 @@
 #endif
 #endif
 
+
 #ifndef HAVE_INET_ATON
 int inet_aton(const char *, struct in_addr *);
 #endif
 
 #include "php_network.h"
 
-#if defined(PHP_WIN32) || defined(__riscos__)
+#if defined(PHP_WIN32) || defined(__riscos__) || defined(NETWARE)
 #undef AF_UNIX
 #endif
 



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /main mergesort.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:26:31 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/main  mergesort.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/main/mergesort.c
diff -u php4/main/mergesort.c:1.11 php4/main/mergesort.c:1.11.2.1
--- php4/main/mergesort.c:1.11  Mon Sep 17 17:02:53 2001
+++ php4/main/mergesort.c   Thu Oct 24 07:26:31 2002
@@ -64,6 +64,11 @@
 #include  /* Includes definition for u_char */
 #endif
 
+#if defined(NETWARE) && !defined(NEW_LIBC)
+/*#include */
+#include 
+#endif
+
 static void setup(u_char *list1, u_char *list2, size_t n, size_t size, int 
(*cmp)(const void *, const void * TSRMLS_DC) TSRMLS_DC);
 static void insertionsort(u_char *a, size_t n, size_t size, int (*cmp)(const void *, 
const void * TSRMLS_DC) TSRMLS_DC);
 



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /main main.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:26:12 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/main  main.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/main/main.c
diff -u php4/main/main.c:1.429.2.4 php4/main/main.c:1.429.2.5
--- php4/main/main.c:1.429.2.4  Tue Sep 17 07:01:05 2002
+++ php4/main/main.cThu Oct 24 07:26:12 2002
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.429.2.4 2002/09/17 11:01:05 zeev Exp $ */
+/* $Id: main.c,v 1.429.2.5 2002/10/24 11:26:12 hyanantha Exp $ */
 
 /* {{{ includes
  */
@@ -28,6 +28,18 @@
 #include "win32/time.h"
 #include "win32/signal.h"
 #include 
+#elif defined(NETWARE)
+#ifdef NEW_LIBC
+#include 
+#else
+#include "netware/time_nw.h"
+#endif
+/*#include "netware/signal_nw.h"*/
+/*#include "netware/env.h"*//* Temporary */
+/*#include */
+#ifdef USE_WINSOCK
+#include 
+#endif
 #else
 #include "build-defs.h"
 #endif
@@ -857,7 +869,7 @@
php_core_globals *core_globals;
sapi_globals_struct *sapi_globals = ts_resource(sapi_globals_id);
 #endif
-#ifdef PHP_WIN32
+#if defined(PHP_WIN32) || (defined(NETWARE) && (USE_WINSOCK))
WORD wVersionRequested = MAKEWORD(2, 0);
WSADATA wsaData;
 #endif
@@ -923,7 +935,7 @@
setlocale(LC_CTYPE, "");
 #endif
 
-#ifdef PHP_WIN32
+#if defined(PHP_WIN32) || (defined(NETWARE) && (USE_WINSOCK))
/* start up winsock services */
if (WSAStartup(wVersionRequested, &wsaData) != 0) {
php_printf("\nwinsock.dll unusable. %d\n", WSAGetLastError());
@@ -1045,7 +1057,7 @@
return;
}
 
-#ifdef PHP_WIN32
+#if defined(PHP_WIN32) || (defined(NETWARE) && (USE_WINSOCK))
/*close winsock */
WSACleanup();
 #endif
@@ -1421,7 +1433,7 @@
char *pass;
char *user;
 
-   user = php_base64_decode(auth + 6, strlen(auth) - 6, NULL);
+   user = (char*)php_base64_decode((const unsigned char*)auth + 6, 
+strlen(auth) - 6, NULL);/* Type-casting done due to NetWare */
if (user) {
pass = strchr(user, ':');
if (pass) {



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /main internal_functions_nw.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:25:42 2002 EDT

  Added files: (Branch: PHP_4_2_0)
/php4/main  internal_functions_nw.c 
  Log:
  NetWare related file.
  
  

Index: php4/main/internal_functions_nw.c
+++ php4/main/internal_functions_nw.c



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /main fopen_wrappers.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:24:45 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/main  fopen_wrappers.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/main/fopen_wrappers.c
diff -u php4/main/fopen_wrappers.c:1.142.2.4 php4/main/fopen_wrappers.c:1.142.2.5
--- php4/main/fopen_wrappers.c:1.142.2.4Sat Sep 28 12:27:53 2002
+++ php4/main/fopen_wrappers.c  Thu Oct 24 07:24:44 2002
@@ -16,7 +16,7 @@
|  Jim Winstead <[EMAIL PROTECTED]> |
+--+
  */
-/* $Id: fopen_wrappers.c,v 1.142.2.4 2002/09/28 16:27:53 rasmus Exp $ */
+/* $Id: fopen_wrappers.c,v 1.142.2.5 2002/10/24 11:24:44 hyanantha Exp $ */
 
 /* {{{ includes
  */
@@ -36,7 +36,15 @@
 #include 
 #define O_RDONLY _O_RDONLY
 #include "win32/param.h"
+#elif defined(NETWARE)
+/*#include */
+/*#include */
+#ifdef NEW_LIBC
+#include 
 #else
+#include "netware/param.h"
+#endif
+#else  /* NETWARE */
 #include 
 #endif
 
@@ -49,6 +57,8 @@
 #if HAVE_PWD_H
 #ifdef PHP_WIN32
 #include "win32/pwd.h"
+#elif defined(NETWARE)
+#include "netware/pwd.h"
 #else
 #include 
 #endif
@@ -65,6 +75,9 @@
 
 #ifdef PHP_WIN32
 #include 
+#elif defined(NETWARE) && defined(USE_WINSOCK)
+/*#include */
+#include 
 #else
 #include 
 #include 
@@ -73,7 +86,7 @@
 #endif
 #endif
 
-#if defined(PHP_WIN32) || defined(__riscos__)
+#if defined(PHP_WIN32) || defined(__riscos__) || defined(NETWARE)
 #undef AF_UNIX
 #endif
 
@@ -426,7 +439,11 @@
char *pathbuf, *ptr, *end;
char *exec_fname;
char trypath[MAXPATHLEN];
+#if defined(NETWARE) && defined(CLIB_STAT_PATCH)
+struct stat_libc sb;
+#else
struct stat sb;
+#endif
FILE *fp;
int path_length;
int filename_length;



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /main config.nw.h

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:24:10 2002 EDT

  Added files: (Branch: PHP_4_2_0)
/php4/main  config.nw.h 
  Log:
  NetWare related file.
  
  

Index: php4/main/config.nw.h
+++ php4/main/config.nw.h
/* 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

/* dns functions found in resolv.lib */
#define HAVE_LIBBIND 1

#define HAVE_GETSERVBYNAME 1
#define HAVE_GETSERVBYPORT 1
#define HAVE_GETPROTOBYNAME 1
#define HAVE_GETPROTOBYNUMBER 1

/* set to enable bcmath */
#define WITH_BCMATH 1

/* set to enable mysql */
#define HAVE_MYSQL 1

/* set to enable FTP support */
#define HAVE_FTP 1

/* set to enable bundled PCRE library */
#define HAVE_BUNDLED_PCRE   1

/* set to enable bundled expat library */
/* #define HAVE_LIBEXPAT 1 */ /* For now */
#define HAVE_WDDX 0

/* set to enable the crypt command */
/* #define HAVE_CRYPT 1 */
/* #define HAVE_CRYPT_H 1 */

/* set to enable force cgi redirect */
#define FORCE_CGI_REDIRECT 0

/* should be added to runtime config*/
#define PHP_URL_FOPEN 1

#define STDIN_FILENO 0
#define STDOUT_FILENO 1
#define STDERR_FILENO 2

/* 
   The following are defaults for run-time configuration
   ---*/

#define PHP_SAFE_MODE 0
#define MAGIC_QUOTES 0
/* This is the default configuration file to read */
#define CONFIGURATION_FILE_PATH "php.ini"
#define USE_CONFIG_FILE 1

#define PHP_INCLUDE_PATHNULL


/* Undefine if you want stricter XML/SGML compliance by default */
/* this disables "" and "" */
#define DEFAULT_SHORT_OPEN_TAG "1"


/* 
   The following defines are for those modules which require
   external libraries to compile.  These will be removed from 
   here in a future beta, as these modules will be moved out to dll's 
   ---*/
#define HAVE_ERRMSG_H 0 /*needed for mysql 3.21.17 and up*/
#undef HAVE_ADABAS
#undef HAVE_SOLID


/* 
   The following may or may not be (or need to be) ported to the
   windows environment.
   ---*/

/* Define if you have the link function.  */
#undef HAVE_LINK

/* Define if you have the symlink function.  */
#undef HAVE_SYMLINK

/* Define if you have the usleep function.  */
#undef HAVE_USLEEP

#define HAVE_GETCWD 1
/* #define HAVE_POSIX_READDIR_R 1 */  /* We will use readdir() from LibC */

#define NEED_ISBLANK 1

/* 
   The following should never need to be played with
   Functions defined to 0 or remarked out are either already
   handled by the standard VC libraries, or are no longer needed, or
   simply will/can not be ported.

   DONT TOUCH!  Unless you realy know what your messing with!
   ---*/

#define DISCARD_PATH 0
#undef HAVE_SETITIMER
#undef HAVE_IODBC
#define HAVE_UODBC 1
#define HAVE_LIBDL 1
#define HAVE_SENDMAIL 1
#define HAVE_GETTIMEOFDAY 1
#define HAVE_PUTENV 1
#define HAVE_LIMITS_H 1

#define HAVE_TZSET 1
#define HAVE_TZNAME 1

/* Define if you have the flock function.  */
#undef HAVE_FLOCK

/* Define if you have alloca, as a function or macro.  */
/* Though we have alloca(), this seems to be causing some problem with the stack 
pointer -- hence not using it */
/* #define HAVE_ALLOCA 1 */

/* Define if you have  */
#undef HAVE_SYS_TIME_H

/* Define if you have  */
#define HAVE_SIGNAL_H 1

/* Define if your struct stat has st_blksize.  */
#define HAVE_ST_BLKSIZE

/* Define if your struct stat has st_blocks.  */
#define HAVE_ST_BLOCKS

/* Define if your struct stat has st_rdev.  */
#define HAVE_ST_RDEV 1

/* Define if utime(file, NULL) sets file's timestamp to the present.  */
#define HAVE_UTIME_NULL 1

/* Define if you have the vprintf function.  */
#define HAVE_VPRINTF 1

/* Define if you have the ANSI C header files.  */
#define STDC_HEADERS 1

/* Define both of these if you want the bundled REGEX library */
#define REGEX 1
#define HSREGEX 1

#define HAVE_PCRE 1

#define HAVE_LDAP 1

/* Define if you have the gcvt function.  */
/* #define HAVE_GCVT 1 */

/* Define if you have the getlogin function.  */
/* #define HAVE_GETLOGIN 1 */

/* Define if you have the gettimeofday function.  */
#define HAVE_GETTIMEOFDAY 1

/* Define if you have the memcpy function.  */
#define HAVE_MEMCPY 1

/* Define if you have the memmove function.  */
#define HAVE_MEMMOVE 1

/* Define if you have the putenv function.  */
/* #define HAVE_PUTENV 1 */   /* Why are such things defined in more than one place ? 
*/

/* Define if 

[PHP-CVS] cvs: php4(PHP_4_2_0) /ext/xml/expat xmltok_impl.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:23:11 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/ext/xml/expat xmltok_impl.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/ext/xml/expat/xmltok_impl.c
diff -u php4/ext/xml/expat/xmltok_impl.c:1.1 php4/ext/xml/expat/xmltok_impl.c:1.1.4.1
--- php4/ext/xml/expat/xmltok_impl.c:1.1Fri May 11 13:57:35 2001
+++ php4/ext/xml/expat/xmltok_impl.cThu Oct 24 07:23:11 2002
@@ -3,6 +3,11 @@
 See the file COPYING for copying permission.
 */
 
+#ifdef NETWARE  /* Check whether these two files are really required for NetWare */
+#include "xmltok.h"
+#include "xmltok_impl.h"
+#endif
+
 #include "php_compat.h"
 
 #ifndef IS_INVALID_CHAR



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /ext/xml xml.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:22:43 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/ext/xml   xml.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/ext/xml/xml.c
diff -u php4/ext/xml/xml.c:1.104 php4/ext/xml/xml.c:1.104.2.1
--- php4/ext/xml/xml.c:1.104Thu Feb 28 03:26:57 2002
+++ php4/ext/xml/xml.c  Thu Oct 24 07:22:42 2002
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: xml.c,v 1.104 2002/02/28 08:26:57 sebastian Exp $ */
+/* $Id: xml.c,v 1.104.2.1 2002/10/24 11:22:42 hyanantha Exp $ */
 
 #define IS_EXT_MODULE
 
@@ -35,7 +35,7 @@
 
 #if HAVE_LIBEXPAT
 
-#ifndef PHP_WIN32
+#if !defined(PHP_WIN32) && !defined(NETWARE)
 #  include "build-defs.h"
 # endif
 # include "ext/standard/head.h"



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /ext/standard var_unserializer.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:22:11 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/ext/standard  var_unserializer.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/ext/standard/var_unserializer.c
diff -u php4/ext/standard/var_unserializer.c:1.6.2.3 
php4/ext/standard/var_unserializer.c:1.6.2.4
--- php4/ext/standard/var_unserializer.c:1.6.2.3Tue Aug 20 15:45:44 2002
+++ php4/ext/standard/var_unserializer.cThu Oct 24 07:22:11 2002
@@ -217,7 +217,12 @@
 
 PHPAPI int php_var_unserialize(UNSERIALIZE_PARAMETER)
 {
+#ifndef NETWARE
const unsigned char *cursor, *limit, *marker, *start;
+#else
+   const char *cursor, *start;
+   const char *limit=NULL, *marker=NULL;
+#endif /* NETWARE */
zval **rval_ref;
 
cursor = *p;



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /ext/standard syslog.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:21:43 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/ext/standard  syslog.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/ext/standard/syslog.c
diff -u php4/ext/standard/syslog.c:1.38 php4/ext/standard/syslog.c:1.38.2.1
--- php4/ext/standard/syslog.c:1.38 Thu Feb 28 03:26:49 2002
+++ php4/ext/standard/syslog.c  Thu Oct 24 07:21:42 2002
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: syslog.c,v 1.38 2002/02/28 08:26:49 sebastian Exp $ */
+/* $Id: syslog.c,v 1.38.2.1 2002/10/24 11:21:42 hyanantha Exp $ */
 
 #include "php.h"
 
@@ -75,7 +75,7 @@
/* AIX doesn't have LOG_AUTHPRIV */
REGISTER_LONG_CONSTANT("LOG_AUTHPRIV", LOG_AUTHPRIV, CONST_CS | 
CONST_PERSISTENT);
 #endif
-#if !defined(PHP_WIN32)
+#if !defined(PHP_WIN32) && !defined(NETWARE)
REGISTER_LONG_CONSTANT("LOG_LOCAL0", LOG_LOCAL0, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("LOG_LOCAL1", LOG_LOCAL1, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("LOG_LOCAL2", LOG_LOCAL2, CONST_CS | CONST_PERSISTENT);
@@ -159,7 +159,7 @@
/* AIX doesn't have LOG_AUTHPRIV */
SET_VAR_LONG("LOG_AUTHPRIV", LOG_AUTHPRIV);
 #endif
-#if !defined(PHP_WIN32)
+#if !defined(PHP_WIN32) && !defined(NETWARE)
SET_VAR_LONG("LOG_LOCAL0", LOG_LOCAL0);
SET_VAR_LONG("LOG_LOCAL1", LOG_LOCAL1);
SET_VAR_LONG("LOG_LOCAL2", LOG_LOCAL2);



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




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

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:20:21 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/ext/standard  string.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/ext/standard/string.c
diff -u php4/ext/standard/string.c:1.263.2.6 php4/ext/standard/string.c:1.263.2.7
--- php4/ext/standard/string.c:1.263.2.6Mon Jun 24 04:19:43 2002
+++ php4/ext/standard/string.c  Thu Oct 24 07:20:21 2002
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: string.c,v 1.263.2.6 2002/06/24 08:19:43 derick Exp $ */
+/* $Id: string.c,v 1.263.2.7 2002/10/24 11:20:21 hyanantha Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -105,9 +105,9 @@
register unsigned char *result = NULL;
size_t i, j;
 
-   result = (char *) emalloc(oldlen * 2 * sizeof(char) + 1);
+   result = (unsigned char*) emalloc(oldlen * 2 * sizeof(char) + 1);   /* 
+Type-casting done due to NetWare */
if(!result) {
-   return result;
+   return (char*)result;   /* Type-casting done due to NetWare */
}

for(i = j = 0; i < oldlen; i++) {
@@ -119,7 +119,7 @@
if (newlen) 
*newlen = oldlen * 2 * sizeof(char);
 
-   return result;
+   return (char *)result;  /* Type-casting done due to NetWare */
 }
 /* }}} */
 
@@ -183,7 +183,7 @@
}
convert_to_string_ex(data);
 
-   result = php_bin2hex(Z_STRVAL_PP(data), Z_STRLEN_PP(data), &newlen);
+   result = php_bin2hex((const unsigned char*)Z_STRVAL_PP(data), 
+Z_STRLEN_PP(data), &newlen);  /* Type-casting done due to NetWare */

if (!result) {
RETURN_FALSE;
@@ -514,9 +514,9 @@
char mask[256];
 
if (what) {
-   php_charmask(Z_STRVAL_PP(what), Z_STRLEN_PP(what), mask TSRMLS_CC);
+   php_charmask((unsigned char*)Z_STRVAL_PP(what), Z_STRLEN_PP(what), 
+mask TSRMLS_CC); /* Type-casting done due to NetWare */
} else {
-   php_charmask(" \n\r\t\v\0", 6, mask TSRMLS_CC);
+   php_charmask((unsigned char*)" \n\r\t\v\0", 6, mask TSRMLS_CC); /* 
+Type-casting done due to NetWare */
}
 
if (mode & 1) {
@@ -1238,9 +1238,9 @@
 PHPAPI char *php_stristr(unsigned char *s, unsigned char *t,
  size_t s_len, size_t t_len)
 {
-   php_strtolower(s, s_len);
-   php_strtolower(t, t_len);
-   return php_memnstr(s, t, t_len, s + s_len);
+   php_strtolower((char*)s, s_len);/* Type-casting done due to NetWare */
+   php_strtolower((char*)t, t_len);/* Type-casting done due to NetWare */
+   return php_memnstr((char*)s, (char*)t, t_len, (char*)(s + s_len));  /* 
+Type-casting done due to NetWare */
 }
 /* }}} */
 
@@ -1313,7 +1313,7 @@
RETURN_FALSE;
}
 
-   found = php_stristr(Z_STRVAL_PP(haystack), Z_STRVAL_PP(needle),
+   found = php_stristr((unsigned char*)Z_STRVAL_PP(haystack), (unsigned 
+char*)Z_STRVAL_PP(needle), /* Type-casting done due to NetWare */
Z_STRLEN_PP(haystack), Z_STRLEN_PP(needle));
}
else {
@@ -1321,7 +1321,7 @@
needle_char[0] = (char) Z_LVAL_PP(needle);
needle_char[1] = 0;
 
-   found = php_stristr(Z_STRVAL_PP(haystack), needle_char, 
+   found = php_stristr((unsigned char*)Z_STRVAL_PP(haystack), (unsigned 
+char*)needle_char, /* Type-casting done due to NetWare */
Z_STRLEN_PP(haystack), 1);
}

@@ -2367,7 +2367,7 @@
length = strlen(str);
}
 
-   php_charmask(what, wlength, flags TSRMLS_CC);
+   php_charmask((unsigned char*)what, wlength, flags TSRMLS_CC);   /* 
+Type-casting done due to NetWare */
 
for (source=str, end=source+length, target=new_str; (c=*source) || sourcehttp://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4(PHP_4_2_0) /ext/standard rand.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:19:57 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/ext/standard  rand.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/ext/standard/rand.c
diff -u php4/ext/standard/rand.c:1.58 php4/ext/standard/rand.c:1.58.2.1
--- php4/ext/standard/rand.c:1.58   Thu Feb 28 03:26:48 2002
+++ php4/ext/standard/rand.cThu Oct 24 07:19:56 2002
@@ -20,7 +20,7 @@
| Based on code from: Shawn Cokus <[EMAIL PROTECTED]>  |
+--+
  */
-/* $Id: rand.c,v 1.58 2002/02/28 08:26:48 sebastian Exp $ */
+/* $Id: rand.c,v 1.58.2.1 2002/10/24 11:19:56 hyanantha Exp $ */
 
 #include 
 
@@ -29,6 +29,10 @@
 #  define WIN32_LEAN_AND_MEAN
 # endif
 # include 
+#endif
+
+#if defined(NETWARE) && !defined(NEW_LIBC)  /* For getpid() */
+#include "netware/pwd.h"
 #endif
 
 #include "php.h"



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /ext/standard pageinfo.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:19:43 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/ext/standard  pageinfo.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/ext/standard/pageinfo.c
diff -u php4/ext/standard/pageinfo.c:1.30 php4/ext/standard/pageinfo.c:1.30.2.1
--- php4/ext/standard/pageinfo.c:1.30   Thu Feb 28 03:26:46 2002
+++ php4/ext/standard/pageinfo.cThu Oct 24 07:19:43 2002
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: pageinfo.c,v 1.30 2002/02/28 08:26:46 sebastian Exp $ */
+/* $Id: pageinfo.c,v 1.30.2.1 2002/10/24 11:19:43 hyanantha Exp $ */
 
 #include "php.h"
 #include "pageinfo.h"
@@ -27,6 +27,11 @@
 #if HAVE_PWD_H
 #ifdef PHP_WIN32
 #include "win32/pwd.h"
+#elif defined(NETWARE)
+#ifdef ZTS
+extern int basic_globals_id;
+#endif
+#include "netware/pwd.h"
 #else
 #include 
 #endif
@@ -45,7 +50,11 @@
  */
 PHPAPI void php_statpage(TSRMLS_D)
 {
+#if (defined(NETWARE) && defined(CLIB_STAT_PATCH))
+   struct stat_libc *pstat;
+#else
struct stat *pstat;
+#endif
 
pstat = sapi_get_stat(TSRMLS_C);
 
@@ -54,7 +63,11 @@
BG(page_uid)   = pstat->st_uid;
BG(page_gid)   = pstat->st_gid;
BG(page_inode) = pstat->st_ino;
+#if defined(NETWARE) && defined(NEW_LIBC)
+   BG(page_mtime) = (pstat->st_mtime).tv_nsec;
+#else
BG(page_mtime) = pstat->st_mtime;
+#endif
} 
}
 }



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /ext/standard pack.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:19:29 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/ext/standard  pack.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/ext/standard/pack.c
diff -u php4/ext/standard/pack.c:1.37.2.1 php4/ext/standard/pack.c:1.37.2.2
--- php4/ext/standard/pack.c:1.37.2.1   Sat Aug 17 12:47:54 2002
+++ php4/ext/standard/pack.cThu Oct 24 07:19:29 2002
@@ -15,7 +15,7 @@
| Author: Chris Schneider <[EMAIL PROTECTED]>  |
+--+
  */
-/* $Id: pack.c,v 1.37.2.1 2002/08/17 16:47:54 iliaa Exp $ */
+/* $Id: pack.c,v 1.37.2.2 2002/10/24 11:19:29 hyanantha Exp $ */
 
 #include "php.h"
 
@@ -30,6 +30,18 @@
 #include 
 #define O_RDONLY _O_RDONLY
 #include "win32/param.h"
+#elif defined(NETWARE)
+#ifdef USE_WINSOCK
+/*#include */
+#include 
+#else
+#include 
+#endif
+#ifdef NEW_LIBC
+#include 
+#else
+#include "netware/param.h"
+#endif
 #else
 #include 
 #endif
@@ -40,6 +52,8 @@
 #if HAVE_PWD_H
 #ifdef PHP_WIN32
 #include "win32/pwd.h"
+#elif defined(NETWARE)
+#include "netware/pwd.h"
 #else
 #include 
 #endif



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /ext/standard microtime.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:19:14 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/ext/standard  microtime.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/ext/standard/microtime.c
diff -u php4/ext/standard/microtime.c:1.36 php4/ext/standard/microtime.c:1.36.2.1
--- php4/ext/standard/microtime.c:1.36  Thu Feb 28 03:26:46 2002
+++ php4/ext/standard/microtime.c   Thu Oct 24 07:19:14 2002
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: microtime.c,v 1.36 2002/02/28 08:26:46 sebastian Exp $ */
+/* $Id: microtime.c,v 1.36.2.1 2002/10/24 11:19:14 hyanantha Exp $ */
 
 #include "php.h"
 
@@ -25,6 +25,12 @@
 #endif
 #ifdef PHP_WIN32
 #include "win32/time.h"
+#elif defined(NETWARE)
+#ifdef NEW_LIBC
+#include 
+#else
+#include "netware/time_nw.h"
+#endif
 #else
 #include 
 #endif



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /ext/standard md5.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:18:58 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/ext/standard  md5.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/ext/standard/md5.c
diff -u php4/ext/standard/md5.c:1.26 php4/ext/standard/md5.c:1.26.2.1
--- php4/ext/standard/md5.c:1.26Thu Feb 28 03:26:46 2002
+++ php4/ext/standard/md5.c Thu Oct 24 07:18:57 2002
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: md5.c,v 1.26 2002/02/28 08:26:46 sebastian Exp $ */
+/* $Id: md5.c,v 1.26.2.1 2002/10/24 11:18:57 hyanantha Exp $ */
 
 /* 
  * md5.c - Copyright 1997 Lachlan Roche 
@@ -56,7 +56,7 @@
 
md5str[0] = '\0';
PHP_MD5Init(&context);
-   PHP_MD5Update(&context, Z_STRVAL_PP(arg), Z_STRLEN_PP(arg));
+   PHP_MD5Update(&context, (const unsigned char*)Z_STRVAL_PP(arg), 
+Z_STRLEN_PP(arg));  /* Type-casting done due to NetWare */
PHP_MD5Final(digest, &context);
make_digest(md5str, digest);
RETVAL_STRING(md5str, 1);



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /ext/standard math.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:18:40 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/ext/standard  math.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/ext/standard/math.c
diff -u php4/ext/standard/math.c:1.80.2.4 php4/ext/standard/math.c:1.80.2.5
--- php4/ext/standard/math.c:1.80.2.4   Mon Jun 24 04:18:54 2002
+++ php4/ext/standard/math.cThu Oct 24 07:18:40 2002
@@ -19,7 +19,7 @@
+--+
 */
 
-/* $Id: math.c,v 1.80.2.4 2002/06/24 08:18:54 derick Exp $ */
+/* $Id: math.c,v 1.80.2.5 2002/10/24 11:18:40 hyanantha Exp $ */
 
 #include "php.h"
 #include "php_math.h"
@@ -314,7 +314,7 @@
 
 /* }}} */
 
-#ifndef PHP_WIN32
+#if !defined(PHP_WIN32) && !defined(NETWARE)
 /* {{{ proto float asinh(float number)
Returns the inverse hyperbolic sine of the number, i.e. the value whose hyperbolic 
sine is number */
 
@@ -471,7 +471,7 @@
 /* }}} */
 
 
-#ifndef PHP_WIN32
+#if !defined(PHP_WIN32) && !defined(NETWARE)
 /* {{{ proto float expm1(float number)
Returns exp(number) - 1, computed in a way that accurate even when the value of 
number is close to zero */
 



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /ext/standard mail.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:18:24 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/ext/standard  mail.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/ext/standard/mail.c
diff -u php4/ext/standard/mail.c:1.48.2.3 php4/ext/standard/mail.c:1.48.2.4
--- php4/ext/standard/mail.c:1.48.2.3   Sat Aug 24 07:38:13 2002
+++ php4/ext/standard/mail.cThu Oct 24 07:18:24 2002
@@ -16,14 +16,14 @@
+--+
  */
 
-/* $Id: mail.c,v 1.48.2.3 2002/08/24 11:38:13 sesser Exp $ */
+/* $Id: mail.c,v 1.48.2.4 2002/10/24 11:18:24 hyanantha Exp $ */
 
 #include 
 #include 
 #include 
 #include "php.h"
 #include "ext/standard/info.h"
-#if !defined(PHP_WIN32)
+#if !defined(PHP_WIN32) && !defined(NETWARE)
 #include "build-defs.h"
 #if HAVE_SYSEXITS_H
 #include 
@@ -42,6 +42,12 @@
 #include "win32/sendmail.h"
 #endif
 
+/* Additional headers for NetWare */
+#ifdef NETWARE
+#include "netware/pipe.h"/* For popen(), pclose() */
+#include "netware/sysexits.h"   /* For exit status codes like EX_OK */
+#endif
+
 /* {{{ proto int ezmlm_hash(string addr)
Calculate EZMLM list hash value. */
 PHP_FUNCTION(ezmlm_hash)
@@ -128,7 +134,7 @@
  */
 PHPAPI int php_mail(char *to, char *subject, char *message, char *headers, char 
*extra_cmd)
 {
-#ifdef PHP_WIN32
+#if (defined PHP_WIN32) || (defined NETWARE)
int tsm_err;
 #endif
FILE *sendmail;
@@ -137,10 +143,10 @@
char *sendmail_cmd = NULL;
 
if (!sendmail_path) {
-#ifdef PHP_WIN32
+#if (defined PHP_WIN32) || (defined NETWARE)
/* handle old style win smtp sending */
if (TSendMail(INI_STR("SMTP"), &tsm_err, headers, subject, to, 
message) != SUCCESS){
-   php_error(E_WARNING, GetSMErrorText(tsm_err));
+   php_error(E_WARNING, (const char *)GetSMErrorText(tsm_err));   
+ /* Type-casting done due to NetWare */
return 0;
}
return 1;



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /ext/standard link.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:18:06 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/ext/standard  link.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/ext/standard/link.c
diff -u php4/ext/standard/link.c:1.37.2.1 php4/ext/standard/link.c:1.37.2.2
--- php4/ext/standard/link.c:1.37.2.1   Sun Jun 23 13:18:17 2002
+++ php4/ext/standard/link.cThu Oct 24 07:18:06 2002
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: link.c,v 1.37.2.1 2002/06/23 17:18:17 sesser Exp $ */
+/* $Id: link.c,v 1.37.2.2 2002/10/24 11:18:06 hyanantha Exp $ */
 
 #include "php.h"
 #include "php_filestat.h"
@@ -33,6 +33,8 @@
 #if HAVE_PWD_H
 #ifdef PHP_WIN32
 #include "win32/pwd.h"
+#elif defined(NETWARE)
+#include "netware/pwd.h"
 #else
 #include 
 #endif



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




Re: [PHP-CVS] cvs: php4(PHP_4_2_0) /ext/standard image.c

2002-10-24 Thread Derick Rethans
On Thu, 24 Oct 2002, Anantha Kesari H Y wrote:

> hyanantha Thu Oct 24 07:16:57 2002 EDT
> 
>   Modified files:  (Branch: PHP_4_2_0)
> /php4/ext/standardimage.c 
>   Log:
>   NetWare related changes/modifications.

You can also commit all files in one run ... please :)

Derick

>   
>   
> Index: php4/ext/standard/image.c
> diff -u php4/ext/standard/image.c:1.44.2.2 php4/ext/standard/image.c:1.44.2.3
> --- php4/ext/standard/image.c:1.44.2.2Tue Mar 12 00:57:28 2002
> +++ php4/ext/standard/image.c Thu Oct 24 07:16:57 2002
> @@ -16,7 +16,7 @@
> |  Marcus Boerger <[EMAIL PROTECTED]>  |
> +--+
>   */
> -/* $Id: image.c,v 1.44.2.2 2002/03/12 05:57:28 helly Exp $ */
> +/* $Id: image.c,v 1.44.2.3 2002/10/24 11:16:57 hyanantha Exp $ */
>  /*
>   * Based on Daniel Schmitt's imageinfo.c which carried the following
>   * Copyright notice.
> @@ -39,6 +39,11 @@
>  
>  #include "php.h"
>  #include 
> +
> +#if defined(NETWARE) && !defined(NEW_LIBC)
> +#include 
> +#endif
> +
>  #if HAVE_FCNTL_H
>  #include 
>  #endif
> @@ -82,10 +87,10 @@
>  
>   FP_FREAD(temp, 3, socketd, fp, issock);  /* fseek(fp, 6L, SEEK_SET); */
>  
> - FP_FREAD(a, sizeof(a), socketd, fp, issock); /* fread(a, sizeof(a), 1, fp); */
> + FP_FREAD((char*)a, sizeof(a), socketd, fp, issock); /*  fread(a, sizeof(a), 1, 
>fp); */  /* Type-casting done due to NetWare */
>   result->width = (unsigned short)a[0] | (((unsigned short)a[1])<<8);
>  
> - FP_FREAD(a, sizeof(a), socketd, fp, issock); /* fread(a, sizeof(a), 1, fp); */
> + FP_FREAD((char *)a, sizeof(a), socketd, fp, issock); /* fread(a, sizeof(a), 1, 
>fp); */  /* Type-casting done due to NetWare */
>   result->height = (unsigned short)a[0] | (((unsigned short)a[1])<<8);
>  
>   return result;
> @@ -104,7 +109,7 @@
>   result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo));
>   FP_FREAD(temp, sizeof(temp), socketd, fp, issock);
>  
> - if((FP_FREAD(a, sizeof(a), socketd, fp, issock)) <= 0) {
> + if((FP_FREAD((char *)a, sizeof(a), socketd, fp, issock)) <= 0) {/* 
>Type-casting done due to NetWare */
>   in_height = 0;
>   in_width  = 0;
>   } else {
> @@ -169,7 +174,7 @@
>   result = (struct gfxinfo *) ecalloc (1, sizeof (struct gfxinfo));
>   FP_FREAD(temp, 5, socketd, fp, issock); /*  fseek(fp, 8L, SEEK_SET); */
>  
> - FP_FREAD(a, sizeof(a), socketd, fp, issock); /* fread(a, sizeof(a), 1, fp); */
> + FP_FREAD((char *)a, sizeof(a), socketd, fp, issock); /* fread(a, sizeof(a), 1, 
>fp); */  /* Type-casting done due to NetWare */
>   bits = php_swf_get_bits (a, 0, 5);
>   result->width = (php_swf_get_bits (a, 5 + bits, bits) -
>   php_swf_get_bits (a, 5, bits)) / 20;
> @@ -192,7 +197,7 @@
>  
>   FP_FREAD(temp, sizeof(temp), socketd, fp, issock);  /* fseek(fp, 16L, 
>SEEK_SET); */
>  
> - if((FP_FREAD(a, sizeof(a), socketd, fp, issock)) <= 0) {
> + if((FP_FREAD((char *)a, sizeof(a), socketd, fp, issock)) <= 0) {/* 
>Type-casting done due to NetWare */
>   in_width  = 0;
>   in_height = 0;
>   } else {
> @@ -249,8 +254,7 @@
>   unsigned char a[2];
>  
>   /* just return 0 if we hit the end-of-file */
> - if((FP_FREAD(a, sizeof(a), socketd, fp, issock)) <= 0) return 0;
> -
> + if((FP_FREAD((char *)a, sizeof(a), socketd, fp, issock)) <= 0) return 0;   
> /* Type-casting done due to NetWare */
>   return (((unsigned short) a[ 0 ]) << 8) + ((unsigned short) a[ 1 ]);
>  }
>  /* }}} */
> @@ -316,16 +320,16 @@
>   buffer = emalloc(length);
>   if ( !buffer) return;
>  
> - if (FP_FREAD(buffer, (long) length, socketd, fp, issock) <= 0) {
> + if (FP_FREAD((char *)buffer, (long) length, socketd, fp, issock) <= 0) {   
> /* Type-casting done due to NetWare */
>   efree(buffer);
>   return;
>   }
>  
> - sprintf(markername, "APP%d", marker - M_APP0);
> + sprintf((char *)markername, "APP%d", marker - M_APP0);  /* Type-casting done 
>due to NetWare */
>  
> - if (zend_hash_find(Z_ARRVAL_P(info), markername, strlen(markername)+1, (void 
>**) &tmp) == FAILURE) {
> + if (zend_hash_find(Z_ARRVAL_P(info), (char *)markername, strlen((char 
>*)markername)+1, (void **) &tmp) == FAILURE) {/* Type-casting done due to NetWare 
>*/
>   /* XXX we onyl catch the 1st tag of it's kind! */
> - add_assoc_stringl(info, markername, buffer, length, 1);
> + add_assoc_stringl(info, (char *)markername, (char *)buffer, length, 
>1); /* Type-casting done due to NetWare */
>   }
>  
>   efree(buffer);
> @@ -362,7 +366,7 @@
>   result = (struct gfxinfo *) ecalloc(1, 
>sizeof(struct gfxinfo));
>   length 

[PHP-CVS] cvs: php4(PHP_4_2_0) /ext/standard lcg.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:17:53 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/ext/standard  lcg.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/ext/standard/lcg.c
diff -u php4/ext/standard/lcg.c:1.32 php4/ext/standard/lcg.c:1.32.2.1
--- php4/ext/standard/lcg.c:1.32Thu Feb 28 03:26:46 2002
+++ php4/ext/standard/lcg.c Thu Oct 24 07:17:52 2002
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: lcg.c,v 1.32 2002/02/28 08:26:46 sebastian Exp $ */
+/* $Id: lcg.c,v 1.32.2.1 2002/10/24 11:17:52 hyanantha Exp $ */
 
 #include "php.h"
 #include "php_lcg.h"
@@ -27,6 +27,12 @@
 
 #ifdef PHP_WIN32
 #include "win32/time.h"
+#elif defined(NETWARE)
+#ifdef NEW_LIBC
+#include 
+#else
+#include "netware/time_nw.h"
+#endif
 #else
 #include 
 #endif



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /ext/standard iptc.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:17:37 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/ext/standard  iptc.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/ext/standard/iptc.c
diff -u php4/ext/standard/iptc.c:1.37 php4/ext/standard/iptc.c:1.37.2.1
--- php4/ext/standard/iptc.c:1.37   Thu Feb 28 03:26:46 2002
+++ php4/ext/standard/iptc.cThu Oct 24 07:17:37 2002
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: iptc.c,v 1.37 2002/02/28 08:26:46 sebastian Exp $ */
+/* $Id: iptc.c,v 1.37.2.1 2002/10/24 11:17:37 hyanantha Exp $ */
 
 /*
  * Functions to parse & compse IPTC data.
@@ -184,7 +184,11 @@
unsigned int marker;
unsigned int spool = 0, done = 0, inx, len; 
unsigned char *spoolbuf=0, *poi=0;
+#if (defined(NETWARE) && defined(CLIB_STAT_PATCH))
+struct stat_libc sb;
+#else
struct stat sb;
+#endif
 
 switch(ZEND_NUM_ARGS()){
 case 3:
@@ -222,9 +226,15 @@
len = Z_STRLEN_PP(iptcdata);
 
if (spool < 2) {
+#if (defined(NETWARE) && defined(CLIB_STAT_PATCH))
+   fstat(fileno(fp), ((struct stat*)&sb));
+
+   poi = spoolbuf = emalloc(len + sizeof(psheader) + ((struct 
+stat*)&sb)->st_size + 1024);
+#else
fstat(fileno(fp), &sb);
 
poi = spoolbuf = emalloc(len + sizeof(psheader) + sb.st_size + 1024);
+#endif
 
if (! spoolbuf) {
fclose(fp);
@@ -293,7 +303,7 @@
fclose(fp);
 
if (spool < 2) {
-   RETVAL_STRINGL(spoolbuf, poi - spoolbuf, 0);
+   RETVAL_STRINGL((char*)spoolbuf, poi - spoolbuf, 0); /* 
+Type-casting done due to NetWare */
} else {
RETURN_TRUE;
}
@@ -317,7 +327,7 @@
 
inx = 0;
length = Z_STRLEN_PP(str);
-   buffer = Z_STRVAL_PP(str);
+   buffer = (unsigned char *)Z_STRVAL_PP(str); /* Type-casting done due to 
+NetWare */
 
inheader = 0; /* have we already found the IPTC-Header??? */
tagsfound = 0; /* number of tags already found */
@@ -350,7 +360,7 @@
inx += 2;
}
 
-   sprintf(key, "%d#%03d", (unsigned int) dataset, (unsigned int) recnum);
+   sprintf((char*)key, "%d#%03d", (unsigned int) dataset, (unsigned int) 
+recnum);  /* Type-casting done due to NetWare */
 
if ((len > length) || (inx + len) > length)
break;
@@ -362,7 +372,7 @@
}
}
 
-   if (zend_hash_find(Z_ARRVAL_P(return_value), key, strlen(key) + 1, 
(void **) &element) == FAILURE) {
+   if (zend_hash_find(Z_ARRVAL_P(return_value), (char*)key, 
+strlen((char*)key) + 1, (void **) &element) == FAILURE) {  /* Type-casting done 
+due to NetWare */
ALLOC_ZVAL(values);
INIT_PZVAL(values);
if (array_init(values) == FAILURE) {
@@ -370,10 +380,10 @@
RETURN_FALSE;
}

-   zend_hash_update(Z_ARRVAL_P(return_value), key, strlen(key)+1, 
(void *) &values, sizeof(pval*), (void **) &element);
-   } 
-   
-   add_next_index_stringl(*element, buffer+inx, len, 1);
+   zend_hash_update(Z_ARRVAL_P(return_value), (char*)key, 
+strlen((char*)key)+1, (void *) &values, sizeof(pval*), (void **) &element);  /* 
+Type-casting done due to NetWare */
+   }
+
+   add_next_index_stringl(*element, (char*)(buffer+inx), len, 1);  /* 
+Type-casting done due to NetWare */
 
inx += len;
 



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /ext/standard info.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:17:13 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/ext/standard  info.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/ext/standard/info.c
diff -u php4/ext/standard/info.c:1.167.2.1 php4/ext/standard/info.c:1.167.2.2
--- php4/ext/standard/info.c:1.167.2.1  Thu Mar 14 13:39:37 2002
+++ php4/ext/standard/info.cThu Oct 24 07:17:13 2002
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: info.c,v 1.167.2.1 2002/03/14 18:39:37 zeev Exp $ */
+/* $Id: info.c,v 1.167.2.2 2002/10/24 11:17:13 hyanantha Exp $ */
 
 #include "php.h"
 #include "php_ini.h"
@@ -28,11 +28,15 @@
 #include "SAPI.h"
 #include 
 #include "php_main.h"
-#if !defined(PHP_WIN32)
+#if !defined(PHP_WIN32) && !defined(NETWARE)
 #include "build-defs.h"
 #endif
 #include "zend_globals.h"  /* needs ELS */
 #include "zend_highlight.h"
+
+/*#ifdef NETWARE*/
+/*#include "netware/env.h"*/   /* Temporary */
+/*#endif*/
 
 #define SECTION(name)  PUTS("" name "\n")
 



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /ext/standard image.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:16:57 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/ext/standard  image.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/ext/standard/image.c
diff -u php4/ext/standard/image.c:1.44.2.2 php4/ext/standard/image.c:1.44.2.3
--- php4/ext/standard/image.c:1.44.2.2  Tue Mar 12 00:57:28 2002
+++ php4/ext/standard/image.c   Thu Oct 24 07:16:57 2002
@@ -16,7 +16,7 @@
|  Marcus Boerger <[EMAIL PROTECTED]>  |
+--+
  */
-/* $Id: image.c,v 1.44.2.2 2002/03/12 05:57:28 helly Exp $ */
+/* $Id: image.c,v 1.44.2.3 2002/10/24 11:16:57 hyanantha Exp $ */
 /*
  * Based on Daniel Schmitt's imageinfo.c which carried the following
  * Copyright notice.
@@ -39,6 +39,11 @@
 
 #include "php.h"
 #include 
+
+#if defined(NETWARE) && !defined(NEW_LIBC)
+#include 
+#endif
+
 #if HAVE_FCNTL_H
 #include 
 #endif
@@ -82,10 +87,10 @@
 
FP_FREAD(temp, 3, socketd, fp, issock);  /* fseek(fp, 6L, SEEK_SET); */
 
-   FP_FREAD(a, sizeof(a), socketd, fp, issock); /* fread(a, sizeof(a), 1, fp); */
+   FP_FREAD((char*)a, sizeof(a), socketd, fp, issock); /*  fread(a, sizeof(a), 1, 
+fp); */  /* Type-casting done due to NetWare */
result->width = (unsigned short)a[0] | (((unsigned short)a[1])<<8);
 
-   FP_FREAD(a, sizeof(a), socketd, fp, issock); /* fread(a, sizeof(a), 1, fp); */
+   FP_FREAD((char *)a, sizeof(a), socketd, fp, issock); /* fread(a, sizeof(a), 1, 
+fp); */  /* Type-casting done due to NetWare */
result->height = (unsigned short)a[0] | (((unsigned short)a[1])<<8);
 
return result;
@@ -104,7 +109,7 @@
result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo));
FP_FREAD(temp, sizeof(temp), socketd, fp, issock);
 
-   if((FP_FREAD(a, sizeof(a), socketd, fp, issock)) <= 0) {
+   if((FP_FREAD((char *)a, sizeof(a), socketd, fp, issock)) <= 0) {/* 
+Type-casting done due to NetWare */
in_height = 0;
in_width  = 0;
} else {
@@ -169,7 +174,7 @@
result = (struct gfxinfo *) ecalloc (1, sizeof (struct gfxinfo));
FP_FREAD(temp, 5, socketd, fp, issock); /*  fseek(fp, 8L, SEEK_SET); */
 
-   FP_FREAD(a, sizeof(a), socketd, fp, issock); /* fread(a, sizeof(a), 1, fp); */
+   FP_FREAD((char *)a, sizeof(a), socketd, fp, issock); /* fread(a, sizeof(a), 1, 
+fp); */  /* Type-casting done due to NetWare */
bits = php_swf_get_bits (a, 0, 5);
result->width = (php_swf_get_bits (a, 5 + bits, bits) -
php_swf_get_bits (a, 5, bits)) / 20;
@@ -192,7 +197,7 @@
 
FP_FREAD(temp, sizeof(temp), socketd, fp, issock);  /* fseek(fp, 16L, 
SEEK_SET); */
 
-   if((FP_FREAD(a, sizeof(a), socketd, fp, issock)) <= 0) {
+   if((FP_FREAD((char *)a, sizeof(a), socketd, fp, issock)) <= 0) {/* 
+Type-casting done due to NetWare */
in_width  = 0;
in_height = 0;
} else {
@@ -249,8 +254,7 @@
unsigned char a[2];
 
/* just return 0 if we hit the end-of-file */
-   if((FP_FREAD(a, sizeof(a), socketd, fp, issock)) <= 0) return 0;
-
+   if((FP_FREAD((char *)a, sizeof(a), socketd, fp, issock)) <= 0) return 0;   
+ /* Type-casting done due to NetWare */
return (((unsigned short) a[ 0 ]) << 8) + ((unsigned short) a[ 1 ]);
 }
 /* }}} */
@@ -316,16 +320,16 @@
buffer = emalloc(length);
if ( !buffer) return;
 
-   if (FP_FREAD(buffer, (long) length, socketd, fp, issock) <= 0) {
+   if (FP_FREAD((char *)buffer, (long) length, socketd, fp, issock) <= 0) {   
+ /* Type-casting done due to NetWare */
efree(buffer);
return;
}
 
-   sprintf(markername, "APP%d", marker - M_APP0);
+   sprintf((char *)markername, "APP%d", marker - M_APP0);  /* Type-casting done 
+due to NetWare */
 
-   if (zend_hash_find(Z_ARRVAL_P(info), markername, strlen(markername)+1, (void 
**) &tmp) == FAILURE) {
+   if (zend_hash_find(Z_ARRVAL_P(info), (char *)markername, strlen((char 
+*)markername)+1, (void **) &tmp) == FAILURE) {/* Type-casting done due to NetWare 
+*/
/* XXX we onyl catch the 1st tag of it's kind! */
-   add_assoc_stringl(info, markername, buffer, length, 1);
+   add_assoc_stringl(info, (char *)markername, (char *)buffer, length, 
+1); /* Type-casting done due to NetWare */
}
 
efree(buffer);
@@ -362,7 +366,7 @@
result = (struct gfxinfo *) ecalloc(1, 
sizeof(struct gfxinfo));
length = php_read2(socketd, fp, issock);
result->bits   = FP_FGETC(socketd, fp, issock);
-   FP_FREAD(a, sizeof(a), socketd, fp, issock);
+

[PHP-CVS] cvs: php4(PHP_4_2_0) /ext/standard html.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:16:38 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/ext/standard  html.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/ext/standard/html.c
diff -u php4/ext/standard/html.c:1.41.2.1 php4/ext/standard/html.c:1.41.2.2
--- php4/ext/standard/html.c:1.41.2.1   Wed Mar 20 11:08:04 2002
+++ php4/ext/standard/html.cThu Oct 24 07:16:38 2002
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: html.c,v 1.41.2.1 2002/03/20 16:08:04 sesser Exp $ */
+/* $Id: html.c,v 1.41.2.2 2002/10/24 11:16:38 hyanantha Exp $ */
 
 #include "php.h"
 #include "reg.h"
@@ -451,8 +451,8 @@
 
if (matches_map){
new[len++] = '&';
-   strcpy(new + len, rep);
-   len += strlen(rep);
+   strcpy(new + len, (const char*)rep);/* 
+Type-casting done due to NetWare */
+   len += strlen((const char*)rep);/* 
+Type-casting done due to NetWare */
new[len++] = ';';
}
}
@@ -503,7 +503,7 @@
return;
}
 
-   new = php_escape_html_entities(str, str_len, &len, all, quote_style, 
hint_charset);
+   new = php_escape_html_entities((unsigned char*)str, str_len, &len, all, 
+quote_style, hint_charset); /* Type-casting done due to NetWare */
RETVAL_STRINGL(new, len, 0);
 }
 /* }}} */



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /ext/standard head.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:16:25 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/ext/standard  head.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/ext/standard/head.c
diff -u php4/ext/standard/head.c:1.55.2.1 php4/ext/standard/head.c:1.55.2.2
--- php4/ext/standard/head.c:1.55.2.1   Wed Jul 24 06:03:49 2002
+++ php4/ext/standard/head.cThu Oct 24 07:16:25 2002
@@ -15,9 +15,14 @@
| Author: Rasmus Lerdorf <[EMAIL PROTECTED]>|
+--+
  */
-/* $Id: head.c,v 1.55.2.1 2002/07/24 10:03:49 derick Exp $ */
+/* $Id: head.c,v 1.55.2.2 2002/10/24 11:16:25 hyanantha Exp $ */
 
 #include 
+
+#if defined(NETWARE) && !defined(NEW_LIBC)
+#include 
+#endif
+
 #include "php.h"
 #include "ext/standard/php_standard.h"
 #include "SAPI.h"



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




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

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:16:10 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/ext/standard  http_fopen_wrapper.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/ext/standard/http_fopen_wrapper.c
diff -u php4/ext/standard/http_fopen_wrapper.c:1.23.2.2 
php4/ext/standard/http_fopen_wrapper.c:1.23.2.3
--- php4/ext/standard/http_fopen_wrapper.c:1.23.2.2 Wed Jul 10 22:41:52 2002
+++ php4/ext/standard/http_fopen_wrapper.c  Thu Oct 24 07:16:10 2002
@@ -17,7 +17,7 @@
|  Hartmut Holzgraefe <[EMAIL PROTECTED]>   |
+--+
  */
-/* $Id: http_fopen_wrapper.c,v 1.23.2.2 2002/07/11 02:41:52 sniper Exp $ */
+/* $Id: http_fopen_wrapper.c,v 1.23.2.3 2002/10/24 11:16:10 hyanantha Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -35,6 +35,14 @@
 #include 
 #define O_RDONLY _O_RDONLY
 #include "win32/param.h"
+#elif defined(NETWARE)
+/*#include */
+/*#include */
+#ifdef NEW_LIBC
+#include 
+#else
+#include "netware/param.h"
+#endif
 #else
 #include 
 #endif
@@ -48,6 +56,9 @@
 
 #ifdef PHP_WIN32
 #include 
+#elif defined(NETWARE) && defined(USE_WINSOCK)
+/*#include */
+#include 
 #else
 #include 
 #include 
@@ -56,7 +67,7 @@
 #endif
 #endif
 
-#if defined(PHP_WIN32) || defined(__riscos__)
+#if defined(PHP_WIN32) || defined(__riscos__) || defined(NETWARE)
 #undef AF_UNIX
 #endif
 



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /ext/standard ftp_fopen_wrapper.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:15:33 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/ext/standard  ftp_fopen_wrapper.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/ext/standard/ftp_fopen_wrapper.c
diff -u php4/ext/standard/ftp_fopen_wrapper.c:1.14 
php4/ext/standard/ftp_fopen_wrapper.c:1.14.2.1
--- php4/ext/standard/ftp_fopen_wrapper.c:1.14  Thu Feb 28 03:26:45 2002
+++ php4/ext/standard/ftp_fopen_wrapper.c   Thu Oct 24 07:15:33 2002
@@ -17,7 +17,7 @@
|  Hartmut Holzgraefe <[EMAIL PROTECTED]>   |
+--+
  */
-/* $Id: ftp_fopen_wrapper.c,v 1.14 2002/02/28 08:26:45 sebastian Exp $ */
+/* $Id: ftp_fopen_wrapper.c,v 1.14.2.1 2002/10/24 11:15:33 hyanantha Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -35,6 +35,14 @@
 #include 
 #define O_RDONLY _O_RDONLY
 #include "win32/param.h"
+#elif defined(NETWARE)
+/*#include */
+/*#include */
+#ifdef NEW_LIBC
+#include 
+#else
+#include "netware/param.h"
+#endif
 #else
 #include 
 #endif
@@ -48,6 +56,9 @@
 
 #ifdef PHP_WIN32
 #include 
+#elif defined(NETWARE) && defined(USE_WINSOCK)
+/*#include */
+#include 
 #else
 #include 
 #include 
@@ -56,7 +67,7 @@
 #endif
 #endif
 
-#if defined(PHP_WIN32) || defined(__riscos__)
+#if defined(PHP_WIN32) || defined(__riscos__) || defined(NETWARE)
 #undef AF_UNIX
 #endif
 



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /ext/standard fsock.h

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:15:10 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/ext/standard  fsock.h 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/ext/standard/fsock.h
diff -u php4/ext/standard/fsock.h:1.41 php4/ext/standard/fsock.h:1.41.2.1
--- php4/ext/standard/fsock.h:1.41  Thu Feb 28 03:26:45 2002
+++ php4/ext/standard/fsock.h   Thu Oct 24 07:15:09 2002
@@ -18,12 +18,20 @@
+--+
 */
 
-/* $Id: fsock.h,v 1.41 2002/02/28 08:26:45 sebastian Exp $ */
+/* $Id: fsock.h,v 1.41.2.1 2002/10/24 11:15:09 hyanantha Exp $ */
 
 /* Synced with php 3.0 revision 1.24 1999-06-18 [ssb] */
 
 #ifndef FSOCK_H
 #define FSOCK_H
+
+#ifdef NETWARE
+#ifdef NEW_LIBC
+#include "sys/timeval.h"
+#else
+#include "netware/time_nw.h"/* For 'timeval' */
+#endif
+#endif
 
 #include "file.h"
 



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /ext/standard fsock.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:14:58 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/ext/standard  fsock.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/ext/standard/fsock.c
diff -u php4/ext/standard/fsock.c:1.84.2.2 php4/ext/standard/fsock.c:1.84.2.3
--- php4/ext/standard/fsock.c:1.84.2.2  Mon Mar 18 17:12:57 2002
+++ php4/ext/standard/fsock.c   Thu Oct 24 07:14:58 2002
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: fsock.c,v 1.84.2.2 2002/03/18 22:12:57 derick Exp $ */
+/* $Id: fsock.c,v 1.84.2.3 2002/10/24 11:14:58 hyanantha Exp $ */
 
 /* Synced with php 3.0 revision 1.121 1999-06-18 [ssb] */
 /* Synced with php 3.0 revision 1.133 1999-07-21 [sas] */
@@ -45,6 +45,19 @@
 #endif
 #ifdef PHP_WIN32
 #include 
+#elif defined(NETWARE)
+#ifdef NEW_LIBC
+#ifdef USE_WINSOCK
+#include 
+#else
+#include 
+#include 
+/*#include */
+#include 
+/*#else
+#include */
+#endif
+#endif
 #else
 #include 
 #include 
@@ -52,7 +65,7 @@
 #include 
 #endif
 #endif
-#if defined(PHP_WIN32) || defined(__riscos__)
+#if defined(PHP_WIN32) || defined(__riscos__) || defined(NETWARE)
 #undef AF_UNIX
 #endif
 #if defined(AF_UNIX)
@@ -111,6 +124,10 @@
 
 #ifdef PHP_WIN32
 #define EWOULDBLOCK WSAEWOULDBLOCK
+#elif defined(NETWARE)
+#ifdef USE_WINSOCK
+#define EWOULDBLOCK WSAEWOULDBLOCK
+#endif
 #else
 #include "build-defs.h"
 #endif
@@ -320,7 +337,7 @@
 }
 
 #define TOREAD(sock) ((sock)->writepos - (sock)->readpos)
-#define READPTR(sock) ((sock)->readbuf + (sock)->readpos)
+#define READPTR(sock) ((char *)(sock)->readbuf + (sock)->readpos)  /* 
+Type-casting done due to NetWare */
 #define WRITEPTR(sock) ((sock)->readbuf + (sock)->writepos)
 #define SOCK_FIND(sock, socket) \
   php_sockbuf *sock; \
@@ -393,7 +410,7 @@
return ret;
 }
 
-#if !defined(PHP_WIN32)
+#if !defined(PHP_WIN32) && !(defined(NETWARE) && defined(USE_WINSOCK))
 #undef closesocket
 #define closesocket close
 #endif



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /ext/standard flock_compat.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:14:33 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/ext/standard  flock_compat.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/ext/standard/flock_compat.c
diff -u php4/ext/standard/flock_compat.c:1.16 php4/ext/standard/flock_compat.c:1.16.2.1
--- php4/ext/standard/flock_compat.c:1.16   Thu Feb 28 03:26:45 2002
+++ php4/ext/standard/flock_compat.cThu Oct 24 07:14:33 2002
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: flock_compat.c,v 1.16 2002/02/28 08:26:45 sebastian Exp $ */
+/* $Id: flock_compat.c,v 1.16.2.1 2002/10/24 11:14:33 hyanantha Exp $ */
 
 #include 
 #include 
@@ -30,6 +30,14 @@
 #ifdef PHP_WIN32
 #include 
 #include 
+#endif
+
+#ifdef NETWARE
+#ifdef NEW_LIBC
+#include 
+#else
+#include 
+#endif
 #endif
 
 #ifndef HAVE_FLOCK



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /ext/standard filestat.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:14:04 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/ext/standard  filestat.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/ext/standard/filestat.c
diff -u php4/ext/standard/filestat.c:1.89.2.7 php4/ext/standard/filestat.c:1.89.2.8
--- php4/ext/standard/filestat.c:1.89.2.7   Tue Sep 10 20:41:17 2002
+++ php4/ext/standard/filestat.cThu Oct 24 07:14:04 2002
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: filestat.c,v 1.89.2.7 2002/09/11 00:41:17 edink Exp $ */
+/* $Id: filestat.c,v 1.89.2.8 2002/10/24 11:14:04 hyanantha Exp $ */
 
 #include "php.h"
 #include "safe_mode.h"
@@ -54,6 +54,8 @@
 #if HAVE_PWD_H
 # ifdef PHP_WIN32
 #  include "win32/pwd.h"
+# elif defined(NETWARE)
+#  include "netware/pwd.h"
 # else
 #  include 
 # endif
@@ -335,7 +337,7 @@
Change file group */
 PHP_FUNCTION(chgrp)
 {
-#ifndef WINDOWS
+#if !defined(WINDOWS) && !defined(NETWARE) /* 'chgrp' is not available on NetWare 
+also */
pval **filename, **group;
gid_t gid;
struct group *gr=NULL;
@@ -383,7 +385,7 @@
Change file owner */
 PHP_FUNCTION(chown)
 {
-#ifndef WINDOWS
+#if !defined(WINDOWS) && !defined(NETWARE) /* 'chown' is not available on NetWare 
+also */
pval **filename, **user;
int ret;
uid_t uid;
@@ -472,7 +474,12 @@
 {
pval **filename, **filetime, **fileatime;
int ret;
+#if defined(NETWARE) && defined(CLIB_STAT_PATCH)
+struct stat_libc sb;
+#else
struct stat sb;
+#endif
+
FILE *file;
struct utimbuf newtimebuf;
struct utimbuf *newtime = NULL;
@@ -546,7 +553,11 @@
 {
zval *stat_dev, *stat_ino, *stat_mode, *stat_nlink, *stat_uid, *stat_gid, 
*stat_rdev,
*stat_size, *stat_atime, *stat_mtime, *stat_ctime, *stat_blksize, 
*stat_blocks;
+#if (defined(NETWARE) && defined(CLIB_STAT_PATCH))
+struct stat_libc *stat_sb;
+#else
struct stat *stat_sb;
+#endif
int rmask=S_IROTH, wmask=S_IWOTH, xmask=S_IXOTH; /* access rights defaults to 
other */
char *stat_sb_names[13]={"dev", "ino", "mode", "nlink", "uid", "gid", "rdev",
  "size", "atime", "mtime", "ctime", "blksize", "blocks"};
@@ -559,7 +570,11 @@
RETURN_FALSE;
}
 
+#if (defined(NETWARE) && defined(CLIB_STAT_PATCH))
+   stat_sb = (struct stat_libc *)&BG(sb);
+#else
stat_sb = &BG(sb);
+#endif
 
if (!BG(CurrentStatFile) || strcmp(filename, BG(CurrentStatFile))) {
if (!BG(CurrentStatFile) || filename_length > BG(CurrentStatLength)) {
@@ -574,7 +589,12 @@
 #if HAVE_SYMLINK
BG(lsb).st_mode = 0; /* mark lstat buf invalid */
 #endif
+
+#if (defined(NETWARE) && defined(CLIB_STAT_PATCH))
+   if (VCWD_STAT(BG(CurrentStatFile), (struct stat_libc *)&BG(sb)) == -1) 
+{
+#else
if (VCWD_STAT(BG(CurrentStatFile), &BG(sb)) == -1) {
+#endif
if (!IS_LINK_OPERATION(type) && (!IS_EXISTS_CHECK(type) || 
errno != ENOENT)) { /* fileexists() test must print no error */
php_error(E_WARNING, "stat failed for %s (errno=%d - 
%s)", BG(CurrentStatFile), errno, strerror(errno));
}
@@ -599,6 +619,7 @@
 #endif
 
 
+#ifndef NETWARE
if (type >= FS_IS_W && type <= FS_IS_X) {
if(BG(sb).st_uid==getuid()) {
rmask=S_IRUSR;
@@ -628,6 +649,7 @@
}
}
}
+#endif /* NETWARE */
 
switch (type) {
case FS_PERMS:
@@ -641,11 +663,23 @@
case FS_GROUP:
RETURN_LONG((long)BG(sb).st_gid);
case FS_ATIME:
+#if defined(NETWARE) && defined(NEW_LIBC)
+   RETURN_LONG((long)struct stat_libc *)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)struct stat_libc *)stat_sb)->st_mtime).tv_sec));
+#else
RETURN_LONG((long)BG(sb).st_mtime);
+#endif
case FS_CTIME:
+#if defined(NETWARE) && defined(NEW_LIBC)
+   RETURN_LONG((long)struct stat_libc *)stat_sb)->st_ctime).tv_sec));
+#else
RETURN_LONG((long)BG(sb).st_ctime);
+#endif
case FS_TYPE:
 #if HAVE_SYMLINK
if (S_ISLNK(BG(lsb).st_mode)) {
@@ -665,19 +699,25 @@
php_error(E_WARNING, "Unknown file type (%d)", BG(sb).st_mode&S_IFMT);
RETURN_STRING("unknown", 1);
case FS_IS_W:
+   #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:
+   #ifndef 

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

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:13:37 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/ext/standard  file.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/ext/standard/file.c
diff -u php4/ext/standard/file.c:1.205.2.5 php4/ext/standard/file.c:1.205.2.6
--- php4/ext/standard/file.c:1.205.2.5  Mon Sep  2 10:36:20 2002
+++ php4/ext/standard/file.cThu Oct 24 07:13:36 2002
@@ -21,7 +21,7 @@
+--+
  */
 
-/* $Id: file.c,v 1.205.2.5 2002/09/02 14:36:20 derick Exp $ */
+/* $Id: file.c,v 1.205.2.6 2002/10/24 11:13:36 hyanantha Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -47,11 +47,19 @@
 #define O_RDONLY _O_RDONLY
 #include "win32/param.h"
 #include "win32/winutil.h"
+#elif defined(NETWARE) && !defined(NEW_LIBC)
+/*#include */
+#include 
+#include "netware/param.h"
 #else
 #include 
+#if defined(NETWARE) && defined(USE_WINSOCK)
+#include 
+#else
 #include 
 #include 
 #include 
+#endif
 #if HAVE_ARPA_INET_H
 #include 
 #endif
@@ -63,6 +71,8 @@
 #if HAVE_PWD_H
 #ifdef PHP_WIN32
 #include "win32/pwd.h"
+#elif defined(NETWARE)
+#include "netware/pwd.h"
 #else
 #include 
 #endif
@@ -802,7 +812,7 @@
   int flags;
   int myflag = 0;
 
-#ifdef PHP_WIN32
+#if defined(PHP_WIN32) || (defined(NETWARE) && defined(USE_WINSOCK))
   /* with ioctlsocket, a non-zero sets nonblocking, a zero sets blocking */
  flags = !block;
  if (ioctlsocket(socketd, FIONBIO, &flags)==SOCKET_ERROR){
@@ -2187,7 +2197,7 @@
 /* }}} */
 
 
-#if (!defined(PHP_WIN32) && !defined(__BEOS__) && HAVE_REALPATH) || defined(ZTS)
+#if (!defined(PHP_WIN32) && !defined(__BEOS__) && !defined(NETWARE) && HAVE_REALPATH) 
+|| defined(ZTS)
 /* {{{ proto string realpath(string path)
Return the resolved path */
 PHP_FUNCTION(realpath)



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /ext/standard dns.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:13:19 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/ext/standard  dns.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/ext/standard/dns.c
diff -u php4/ext/standard/dns.c:1.38.2.2 php4/ext/standard/dns.c:1.38.2.3
--- php4/ext/standard/dns.c:1.38.2.2Thu Aug 29 11:59:54 2002
+++ php4/ext/standard/dns.c Thu Oct 24 07:13:19 2002
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: dns.c,v 1.38.2.2 2002/08/29 15:59:54 iliaa Exp $ */
+/* $Id: dns.c,v 1.38.2.3 2002/10/24 11:13:19 hyanantha Exp $ */
 
 /* {{{ includes
  */
@@ -42,7 +42,7 @@
 #endif
 #endif
 #include 
-#else
+#else  /* This holds good for NetWare too, both for Winsock and Berkeley sockets */
 #include 
 #if HAVE_ARPA_INET_H
 #include 
@@ -60,6 +60,11 @@
 #endif
 #endif
 
+/* Borrowed from SYS/SOCKET.H */
+#if defined(NETWARE) && defined(USE_WINSOCK)
+#define AF_INET 2   /* internetwork: UDP, TCP, etc. */
+#endif
+
 #include "dns.h"
 /* }}} */
 
@@ -201,7 +206,7 @@
 }
 /* }}} */
 
-#if HAVE_RES_SEARCH && !(defined(__BEOS__)||defined(PHP_WIN32))
+#if HAVE_RES_SEARCH && !(defined(__BEOS__)||defined(PHP_WIN32) || defined(NETWARE))
 
 /* {{{ proto int checkdnsrr(string host [, string type])
Check DNS records corresponding to a given Internet host name or IP address */



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /ext/standard dl.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:12:59 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/ext/standard  dl.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/ext/standard/dl.c
diff -u php4/ext/standard/dl.c:1.66.2.1 php4/ext/standard/dl.c:1.66.2.2
--- php4/ext/standard/dl.c:1.66.2.1 Mon Mar 25 18:22:05 2002
+++ php4/ext/standard/dl.c  Thu Oct 24 07:12:59 2002
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: dl.c,v 1.66.2.1 2002/03/25 23:22:05 sniper Exp $ */
+/* $Id: dl.c,v 1.66.2.2 2002/10/24 11:12:59 hyanantha Exp $ */
 
 #include "php.h"
 #include "dl.h"
@@ -26,7 +26,7 @@
 #include "ext/standard/info.h"
 #include "SAPI.h"
 
-#ifndef PHP_WIN32
+#if !defined(PHP_WIN32) && !defined(NETWARE)
 #include "build-defs.h"
 #endif
 
@@ -43,6 +43,13 @@
 #include "win32/param.h"
 #include "win32/winutil.h"
 #define GET_DL_ERROR() php_win_err()
+#elif defined(NETWARE)
+#ifdef NEW_LIBC
+#include 
+#else
+#include "netware/param.h"
+#endif
+#define GET_DL_ERROR() dlerror()
 #else
 #include 
 #define GET_DL_ERROR() dlerror()
@@ -141,7 +148,23 @@
 
efree(libpath);
 
-   
+
+#ifdef NETWARE
+   /* NetWare doesn't support two NLMs exporting same symbol */
+{
+char symbol_name[64] = "\0";
+int module_name_length = Z_STRLEN_P(file) - 4;  /* '.nlm' is 4 characters; 
+knock it off */
+
+/* Take the module name (e.g.: 'php_ldap') and append '@get_module' to it */
+strncpy(symbol_name, Z_STRVAL_P(file), module_name_length);
+symbol_name[module_name_length] = '\0';
+strcat(symbol_name, "@");
+strcat(symbol_name, "get_module");
+
+get_module = (zend_module_entry *(*)(void)) DL_FETCH_SYMBOL(handle, 
+symbol_name);
+   }
+/* NetWare doesn't prepend _ to symbol names. So, that portion of code is also 
+not necessary */
+#else  
get_module = (zend_module_entry *(*)(void)) DL_FETCH_SYMBOL(handle, 
"get_module");
 
/*
@@ -152,6 +175,7 @@
 
if (!get_module)
get_module = (zend_module_entry *(*)(void)) DL_FETCH_SYMBOL(handle, 
"_get_module");
+#endif
 
if (!get_module) {
DL_UNLOAD(handle);



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /ext/standard datetime.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:12:44 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/ext/standard  datetime.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/ext/standard/datetime.c
diff -u php4/ext/standard/datetime.c:1.83.2.1 php4/ext/standard/datetime.c:1.83.2.2
--- php4/ext/standard/datetime.c:1.83.2.1   Mon Jul 22 18:07:11 2002
+++ php4/ext/standard/datetime.cThu Oct 24 07:12:44 2002
@@ -19,7 +19,7 @@
  */
 
 
-/* $Id: datetime.c,v 1.83.2.1 2002/07/22 22:07:11 jan Exp $ */
+/* $Id: datetime.c,v 1.83.2.2 2002/10/24 11:12:44 hyanantha Exp $ */
 
 
 #include "php.h"
@@ -55,6 +55,9 @@
 };
 
 #if !defined(HAVE_TM_ZONE) && !defined(_TIMEZONE) && !defined(HAVE_DECLARED_TIMEZONE)
+#if defined(NETWARE) && (NEW_LIBC)
+#define timezone_timezone   /* Do not know why this is called '_timezone' in new 
+version of LibC */
+#endif
 extern time_t timezone;
 extern int daylight;
 #endif



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /ext/standard basic_functions.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:12:10 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/ext/standard  basic_functions.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/ext/standard/basic_functions.c
diff -u php4/ext/standard/basic_functions.c:1.447.2.7 
php4/ext/standard/basic_functions.c:1.447.2.8
--- php4/ext/standard/basic_functions.c:1.447.2.7   Fri Aug 23 20:44:03 2002
+++ php4/ext/standard/basic_functions.c Thu Oct 24 07:12:10 2002
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.447.2.7 2002/08/24 00:44:03 zeev Exp $ */
+/* $Id: basic_functions.c,v 1.447.2.8 2002/10/24 11:12:10 hyanantha Exp $ */
 
 #include "php.h"
 #include "php_main.h"
@@ -38,6 +38,20 @@
 #include 
 #include 
 
+/* Additional headers for NetWare */
+#ifdef NETWARE
+/*#include "netware/env.h"*//* Temporary */
+#ifdef NEW_LIBC /* Same headers hold good for Winsock and Berkeley sockets */
+#include 
+/*#include */
+#include 
+#else
+#include 
+#endif
+#else
+#include 
+#endif
+
 #if HAVE_ARPA_INET_H
 # include 
 #endif
@@ -415,7 +429,7 @@
PHP_FE(gethostbyname,  
 NULL)
PHP_FE(gethostbynamel, 
 NULL)
 
-#if HAVE_RES_SEARCH && !(defined(__BEOS__) || defined(PHP_WIN32))
+#if HAVE_RES_SEARCH && !(defined(__BEOS__) || defined(PHP_WIN32) || defined(NETWARE))
PHP_FE(checkdnsrr, 
 NULL)
PHP_FE(getmxrr,second_and_third_args_force_ref)
 #else
@@ -447,7 +461,7 @@
PHP_FE(cosh,   
 NULL)
PHP_FE(tanh,   
 NULL)
 
-#ifndef PHP_WIN32
+#if !defined(PHP_WIN32) && !defined(NETWARE)
PHP_FE(asinh,  
 NULL)
PHP_FE(acosh,  
 NULL)
PHP_FE(atanh,  
 NULL)
@@ -634,7 +648,7 @@
 
PHP_FE(socket_get_status,  
 NULL)
 
-#if (!defined(PHP_WIN32) && !defined(__BEOS__) && HAVE_REALPATH) || defined(ZTS)
+#if (!defined(PHP_WIN32) && !defined(__BEOS__) && HAVE_REALPATH && !defined(NETWARE)) 
+|| defined(ZTS)
PHP_FE(realpath,   
 NULL)
 #else
PHP_FALIAS(realpath,warn_not_available,
 NULL)
@@ -1001,7 +1015,9 @@
PHP_MINIT(lcg) (INIT_FUNC_ARGS_PASSTHRU);
 
PHP_MINIT(dir) (INIT_FUNC_ARGS_PASSTHRU);
+#ifdef HAVE_SYSLOG_H
PHP_MINIT(syslog) (INIT_FUNC_ARGS_PASSTHRU);
+#endif
PHP_MINIT(array) (INIT_FUNC_ARGS_PASSTHRU);
PHP_MINIT(assert) (INIT_FUNC_ARGS_PASSTHRU);
PHP_MINIT(url_scanner_ex) (INIT_FUNC_ARGS_PASSTHRU);
@@ -1082,7 +1098,9 @@
PHP_RINIT(lcg) (INIT_FUNC_ARGS_PASSTHRU);
 
PHP_RINIT(filestat) (INIT_FUNC_ARGS_PASSTHRU);
+#ifdef HAVE_SYSLOG_H
PHP_RINIT(syslog) (INIT_FUNC_ARGS_PASSTHRU);
+#endif
PHP_RINIT(dir) (INIT_FUNC_ARGS_PASSTHRU);
 
/* Reset magic_quotes_runtime */
@@ -1113,7 +1131,9 @@
 
PHP_RSHUTDOWN(fsock) (SHUTDOWN_FUNC_ARGS_PASSTHRU);
PHP_RSHUTDOWN(filestat) (SHUTDOWN_FUNC_ARGS_PASSTHRU);
+#ifdef HAVE_SYSLOG_H
PHP_RSHUTDOWN(syslog) (SHUTDOWN_FUNC_ARGS_PASSTHRU);
+#endif
PHP_RSHUTDOWN(assert) (SHUTDOWN_FUNC_ARGS_PASSTHRU);
 
if (BG(user_tick_functions)) {



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /ext/standard base64.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 07:11:42 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/ext/standard  base64.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/ext/standard/base64.c
diff -u php4/ext/standard/base64.c:1.29.2.1 php4/ext/standard/base64.c:1.29.2.2
--- php4/ext/standard/base64.c:1.29.2.1 Wed May  1 16:12:51 2002
+++ php4/ext/standard/base64.c  Thu Oct 24 07:11:41 2002
@@ -15,7 +15,7 @@
| Author: Jim Winstead <[EMAIL PROTECTED]>  |
+--+
  */
-/* $Id: base64.c,v 1.29.2.1 2002/05/01 20:12:51 derick Exp $ */
+/* $Id: base64.c,v 1.29.2.2 2002/10/24 11:11:41 hyanantha Exp $ */
 
 #include 
 
@@ -160,9 +160,9 @@
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &str, &str_len) == 
FAILURE) {
return;
}
-   result = php_base64_encode(str, str_len, &ret_length);
+   result = php_base64_encode((const unsigned char*)str, str_len, &ret_length);   
+ /* type-casting done due to NetWare */
if (result != NULL) {
-   RETVAL_STRINGL(result, ret_length, 0);
+   RETVAL_STRINGL((char*)result, ret_length, 0);   /* type-casting done 
+due to NetWare */
} else {
RETURN_FALSE;
}
@@ -181,9 +181,9 @@
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &str, &str_len) == 
FAILURE) {
return;
}
-   result = php_base64_decode(str, str_len, &ret_length);
+   result = php_base64_decode((const unsigned char*)str, str_len, &ret_length);   
+ /* type-casting done due to NetWare */
if (result != NULL) {
-   RETVAL_STRINGL(result, ret_length, 0);
+   RETVAL_STRINGL((char*)result, ret_length, 0);   /* type-casting done 
+due to NetWare */
} else {
RETURN_FALSE;
}



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




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

2002-10-24 Thread Derick Rethans
On Thu, 24 Oct 2002, Sascha Schumann wrote:

> sas   Thu Oct 24 06:40:49 2002 EDT
> 
>   Modified files:  
> /php4/ext/session session.c 
>   Log:
>   improved warning message
>   
>   # this should really link to an external page which explains the issue deeply

Use a phperror_docRef and add a FAQ to the manual?

Derick

--

---
 Derick Rethans   http://derickrethans.nl/ 
 JDI Media Solutions
--[ if you hold a unix shell to your ear, do you hear the c? ]-


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




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

2002-10-24 Thread Sascha Schumann
sas Thu Oct 24 06:41:37 2002 EDT

  Modified files:  
/php4   acinclude.m4 
  Log:
  Quote macro names in AC_DEFUN() and prefix the internal macros using
  a single underscore. Also rename AC_PHP_ONCE as PHP_RUN_ONCE.
  
  
Index: php4/acinclude.m4
diff -u php4/acinclude.m4:1.214 php4/acinclude.m4:1.215
--- php4/acinclude.m4:1.214 Sun Oct 20 23:31:52 2002
+++ php4/acinclude.m4   Thu Oct 24 06:41:36 2002
@@ -1,4 +1,4 @@
-dnl $Id: acinclude.m4,v 1.214 2002/10/21 03:31:52 sniper Exp $
+dnl $Id: acinclude.m4,v 1.215 2002/10/24 10:41:36 sas Exp $
 dnl
 dnl This file contains local autoconf functions.
 
@@ -9,7 +9,7 @@
 dnl are substituted with the proper paths. Can be used to supply
 dnl custom rules and/or additional targets.
 dnl
-AC_DEFUN(PHP_ADD_MAKEFILE_FRAGMENT,[
+AC_DEFUN([PHP_ADD_MAKEFILE_FRAGMENT],[
   ifelse($1,,src=$ext_srcdir/Makefile.frag,src=$1)
   ifelse($2,,ac_srcdir=$ext_srcdir,ac_srcdir=$2)
   ifelse($3,,ac_builddir=$ext_builddir,ac_builddir=$3)
@@ -21,13 +21,13 @@
 dnl
 dnl Creates builddir/include/what.h and in there #define WHAT value
 dnl
-AC_DEFUN(PHP_DEFINE,[
+AC_DEFUN([PHP_DEFINE],[
   [echo "#define ]$1[]ifelse([$2],,[ 1],[ $2])[" > 
include/php_]translit($1,A-Z,a-z)[.h]
 ])
 
 dnl PHP_INIT_BUILD_SYSTEM
 dnl
-AC_DEFUN(PHP_INIT_BUILD_SYSTEM,[
+AC_DEFUN([PHP_INIT_BUILD_SYSTEM],[
 mkdir include >/dev/null 2>&1
 > Makefile.objects
 > Makefile.fragments
@@ -40,7 +40,7 @@
 dnl 
 dnl Generates the global makefile.
 dnl
-AC_DEFUN(PHP_GEN_GLOBAL_MAKEFILE,[
+AC_DEFUN([PHP_GEN_GLOBAL_MAKEFILE],[
   cat >Makefile <$1 <
 #include 
@@ -401,7 +401,7 @@
   ])
 ])
 
-AC_DEFUN(PHP_DOES_PREAD_WORK,[
+AC_DEFUN([PHP_DOES_PREAD_WORK],[
   echo test > conftest_in
   AC_TRY_RUN([
 #include 
@@ -429,7 +429,7 @@
   rm -f conftest_in
 ])
 
-AC_DEFUN(PHP_PWRITE_TEST,[
+AC_DEFUN([PHP_PWRITE_TEST],[
   AC_CACHE_CHECK(whether pwrite works,ac_cv_pwrite,[
 PHP_DOES_PWRITE_WORK
 if test "$ac_cv_pwrite" = "no"; then
@@ -448,7 +448,7 @@
   fi  
 ])
 
-AC_DEFUN(PHP_PREAD_TEST,[
+AC_DEFUN([PHP_PREAD_TEST],[
   AC_CACHE_CHECK(whether pread works,ac_cv_pread,[
 PHP_DOES_PREAD_WORK
 if test "$ac_cv_pread" = "no"; then
@@ -467,7 +467,7 @@
   fi  
 ])
 
-AC_DEFUN(PHP_MISSING_TIME_R_DECL,[
+AC_DEFUN([PHP_MISSING_TIME_R_DECL],[
   AC_MSG_CHECKING([for missing declarations of reentrant functions])
   AC_TRY_COMPILE([#include ],[struct tm *(*func)() = localtime_r],[
 :
@@ -501,13 +501,13 @@
 dnl PHP_LIBGCC_LIBPATH(gcc)
 dnl Stores the location of libgcc in libgcc_libpath
 dnl
-AC_DEFUN(PHP_LIBGCC_LIBPATH,[
+AC_DEFUN([PHP_LIBGCC_LIBPATH],[
   changequote({,})
   libgcc_libpath=`$1 --print-libgcc-file-name|sed 's%/*[^/][^/]*$%%'`
   changequote([,])
 ])
 
-AC_DEFUN(PHP_ARG_ANALYZE_EX,[
+AC_DEFUN([PHP_ARG_ANALYZE_EX],[
 ext_output="yes, shared"
 ext_shared=yes
 case [$]$1 in
@@ -530,7 +530,7 @@
 PHP_ALWAYS_SHARED([$1])
 ])
 
-AC_DEFUN(PHP_ARG_ANALYZE,[
+AC_DEFUN([PHP_ARG_ANALYZE],[
 ifelse([$3],yes,[PHP_ARG_ANALYZE_EX([$1])])
 ifelse([$2],,,[AC_MSG_RESULT([$ext_output])])
 ])
@@ -543,11 +543,11 @@
 dnl If extension-or-not is yes (default), then do the ENABLE_ALL check and run
 dnl the PHP_ARG_ANALYZE_EX.
 dnl
-AC_DEFUN(PHP_ARG_WITH,[
+AC_DEFUN([PHP_ARG_WITH],[
 
PHP_REAL_ARG_WITH([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z0-9-,A-Z0-9_),[ifelse($5,,yes,$5)])
 ])
 
-AC_DEFUN(PHP_REAL_ARG_WITH,[
+AC_DEFUN([PHP_REAL_ARG_WITH],[
 ifelse([$2],,,[AC_MSG_CHECKING([$2])])
 AC_ARG_WITH($1,[$3],$5=[$]withval,
 [
@@ -568,11 +568,11 @@
 dnl If extension-or-not is yes (default), then do the ENABLE_ALL check and run
 dnl the PHP_ARG_ANALYZE_EX.
 dnl
-AC_DEFUN(PHP_ARG_ENABLE,[
+AC_DEFUN([PHP_ARG_ENABLE],[
 
PHP_REAL_ARG_ENABLE([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z-,A-Z_),[ifelse($5,,yes,$5)])
 ])
 
-AC_DEFUN(PHP_REAL_ARG_ENABLE,[
+AC_DEFUN([PHP_REAL_ARG_ENABLE],[
 ifelse([$2],,,[AC_MSG_CHECKING([$2])])
 AC_ARG_ENABLE($1,[$3],$5=[$]enableval,
 [
@@ -585,11 +585,11 @@
 PHP_ARG_ANALYZE($5,[$2],$6)
 ])
 
-AC_DEFUN(PHP_MODULE_PTR,[
+AC_DEFUN([PHP_MODULE_PTR],[
   EXTRA_MODULE_PTRS="$EXTRA_MODULE_PTRS $1,"
 ])
  
-AC_DEFUN(PHP_CONFIG_NICE,[
+AC_DEFUN([PHP_CONFIG_NICE],[
   rm -f $1
   cat >$1<
@@ -658,16 +658,16 @@
   esac
 ])
 
-AC_DEFUN(PHP_SUBST,[
+AC_DEFUN([PHP_SUBST],[
   PHP_VAR_SUBST="$PHP_VAR_SUBST $1"
 ])
 
-AC_DEFUN(PHP_SUBST_OLD,[
+AC_DEFUN([PHP_SUBST_OLD],[
   PHP_SUBST($1)
   AC_SUBST($1)
 ])
 
-AC_DEFUN(PHP_MKDIR_P_CHECK,[
+AC_DEFUN([PHP_MKDIR_P_CHECK],[
   AC_CACHE_CHECK(for working mkdir -p, ac_cv_mkdir_p,[
 test -d conftestdir && rm -rf conftestdir
 mkdir -p conftestdir/somedir >/dev/null 2>&1
@@ -682,7 +682,7 @@
   ])
 ])
 
-AC_DEFUN(PHP_TM_GMTOFF,[
+AC_DEFUN([PHP_TM_GMTOFF],[
 AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff,
 [AC_TRY_COMPILE([#include 
 #include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_gmtoff;],
@@ -695,19 +695,19 @@
 
 dnl PHP_CONFIGURE_PART(MESSAGE)
 dnl Idea borrowed from mm
-AC_DEFUN(PHP_CONFIGURE_PART,[
+AC_DEFUN([PHP_CONFIGURE_PA

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

2002-10-24 Thread Sascha Schumann
sas Thu Oct 24 06:40:49 2002 EDT

  Modified files:  
/php4/ext/session   session.c 
  Log:
  improved warning message
  
  # this should really link to an external page which explains the issue deeply
  
  
Index: php4/ext/session/session.c
diff -u php4/ext/session/session.c:1.335 php4/ext/session/session.c:1.336
--- php4/ext/session/session.c:1.335Sun Oct  6 22:37:50 2002
+++ php4/ext/session/session.c  Thu Oct 24 06:40:48 2002
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: session.c,v 1.335 2002/10/07 02:37:50 sas Exp $ */
+/* $Id: session.c,v 1.336 2002/10/24 10:40:48 sas Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -663,7 +663,7 @@
}
 
if (do_warn && PS(bug_compat_warn)) {
-   php_error(E_WARNING, "Your script possibly relies on a 
session side-effect which existed until PHP 4.2.3. Please be advised that the session 
extension does not consider global variables as a source of data, unless 
register_globals is enabled. You can disable this functionality and this warning by 
setting session.bug_compat_42 or session.bug_compat_warn.");
+   php_error(E_WARNING, "Your script possibly relies on a 
+session side-effect which existed until PHP 4.2.3. Please be advised that the session 
+extension does not consider global variables as a source of data, unless 
+register_globals is enabled. You can disable this functionality and this warning by 
+setting session.bug_compat_42 or session.bug_compat_warn to off, respectively.");
}
}
 



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /ext/snmp snmp.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 05:59:31 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/ext/snmp  snmp.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/ext/snmp/snmp.c
diff -u php4/ext/snmp/snmp.c:1.56 php4/ext/snmp/snmp.c:1.56.2.1
--- php4/ext/snmp/snmp.c:1.56   Thu Feb 28 22:31:01 2002
+++ php4/ext/snmp/snmp.cThu Oct 24 05:59:31 2002
@@ -17,7 +17,7 @@
 |  Steven Lawrance <[EMAIL PROTECTED]>|
 +--+
 */
-/* $Id: snmp.c,v 1.56 2002/03/01 03:31:01 yohgaki Exp $ */
+/* $Id: snmp.c,v 1.56.2.1 2002/10/24 09:59:31 hyanantha Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -32,6 +32,20 @@
 #include 
 #include 
 #include "win32/time.h"
+#elif defined(NETWARE)
+#ifdef USE_WINSOCK
+/*#include */
+#include 
+#else
+#include 
+#endif
+#include 
+/*#include */
+#ifdef NEW_LIBC
+#include 
+#else
+#include "netware/time_nw.h"
+#endif
 #else
 #include 
 #include 



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




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

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 05:58:48 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/ext/session   mod_files.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/ext/session/mod_files.c
diff -u php4/ext/session/mod_files.c:1.72.2.3 php4/ext/session/mod_files.c:1.72.2.4
--- php4/ext/session/mod_files.c:1.72.2.3   Wed Sep  4 09:50:38 2002
+++ php4/ext/session/mod_files.cThu Oct 24 05:58:47 2002
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: mod_files.c,v 1.72.2.3 2002/09/04 13:50:38 kalowsky Exp $ */
+/* $Id: mod_files.c,v 1.72.2.4 2002/10/24 09:58:47 hyanantha Exp $ */
 
 #include "php.h"
 
@@ -156,7 +156,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;
@@ -190,7 +194,11 @@
buf[dirname_len + entry_len + 1] = '\0';
/* check whether its last access was more than 
maxlifet ago */
if (VCWD_STAT(buf, &sbuf) == 0 && 
-   (now - sbuf.st_atime) > maxlifetime) {
+#if (defined(NETWARE) && defined(NEW_LIBC))
+   (now - sbuf.st_atime.tv_nsec) > 
+maxlifetime) {
+#else
+(now - sbuf.st_atime) > maxlifetime) {
+#endif
VCWD_UNLINK(buf);
nrdels++;
}
@@ -242,14 +250,22 @@
 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);
if (data->fd < 0)
return FAILURE;

+#if (defined(NETWARE) && defined(CLIB_STAT_PATCH))
+   if (fstat(data->fd, ((struct stat*)&sbuf)))
+#else
if (fstat(data->fd, &sbuf))
+#endif
return FAILURE;

data->st_size = *vallen = sbuf.st_size;



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /ext/session session.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 05:58:28 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/ext/session   session.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/ext/session/session.c
diff -u php4/ext/session/session.c:1.292.2.3 php4/ext/session/session.c:1.292.2.4
--- php4/ext/session/session.c:1.292.2.3Fri Aug 23 05:14:42 2002
+++ php4/ext/session/session.c  Thu Oct 24 05:58:28 2002
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: session.c,v 1.292.2.3 2002/08/23 09:14:42 zeev Exp $ */
+/* $Id: session.c,v 1.292.2.4 2002/10/24 09:58:28 hyanantha Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -509,7 +509,8 @@
PHP_MD5Init(&context);

sprintf(buf, "%ld%ld%0.8f", tv.tv_sec, tv.tv_usec, php_combined_lcg(TSRMLS_C) 
* 10);
-   PHP_MD5Update(&context, buf, strlen(buf));
+   /*PHP_MD5Update(&context, buf, strlen(buf));*/
+   PHP_MD5Update(&context, (const unsigned char*)buf, strlen(buf));
 
if (PS(entropy_length) > 0) {
int fd;
@@ -523,7 +524,8 @@
while (to_read > 0) {
n = read(fd, buf, MIN(to_read, sizeof(buf)));
if (n <= 0) break;
-   PHP_MD5Update(&context, buf, n);
+   /*PHP_MD5Update(&context, buf, n);*/
+   PHP_MD5Update(&context, (const unsigned char*)buf, n);
to_read -= n;
}
close(fd);
@@ -635,7 +637,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;
@@ -646,7 +652,11 @@
 
 #define LAST_MODIFIED "Last-Modified: "
memcpy(buf, LAST_MODIFIED, sizeof(LAST_MODIFIED) - 1);
-   strcpy_gmt(buf + sizeof(LAST_MODIFIED) - 1, &sb.st_mtime);
+#if (defined(NETWARE) && defined(NEW_LIBC))
+   strcpy_gmt(buf + sizeof(LAST_MODIFIED) - 1, &(sb.st_mtime.tv_nsec));
+#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(PHP_4_2_0) /ext/pgsql php_pgsql.h

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 05:57:26 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/ext/pgsql php_pgsql.h 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/ext/pgsql/php_pgsql.h
diff -u php4/ext/pgsql/php_pgsql.h:1.39 php4/ext/pgsql/php_pgsql.h:1.39.2.1
--- php4/ext/pgsql/php_pgsql.h:1.39 Wed Feb  6 02:25:51 2002
+++ php4/ext/pgsql/php_pgsql.h  Thu Oct 24 05:57:25 2002
@@ -17,7 +17,7 @@
+--+
  */
  
-/* $Id: php_pgsql.h,v 1.39 2002/02/06 07:25:51 yohgaki Exp $ */
+/* $Id: php_pgsql.h,v 1.39.2.1 2002/10/24 09:57:25 hyanantha Exp $ */
 
 #ifndef PHP_PGSQL_H
 #define PHP_PGSQL_H
@@ -34,6 +34,8 @@
 #ifdef PHP_WIN32
 #define INV_WRITE0x0002
 #define INV_READ 0x0004
+#elif defined NETWARE
+#include 
 #else
 #include 
 #endif



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /ext/pgsql pgsql.mak

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 05:56:44 2002 EDT

  Added files: (Branch: PHP_4_2_0)
/php4/ext/pgsql pgsql.mak 
  Log:
  NetWare related file.
  
  

Index: php4/ext/pgsql/pgsql.mak
+++ php4/ext/pgsql/pgsql.mak



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /ext/pcre/pcrelib internal.h

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 05:55:54 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/ext/pcre/pcrelib  internal.h 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/ext/pcre/pcrelib/internal.h
diff -u php4/ext/pcre/pcrelib/internal.h:1.9 php4/ext/pcre/pcrelib/internal.h:1.9.8.1
--- php4/ext/pcre/pcrelib/internal.h:1.9Tue Feb 20 17:00:30 2001
+++ php4/ext/pcre/pcrelib/internal.hThu Oct 24 05:55:54 2002
@@ -39,6 +39,8 @@
 
 #ifdef PHP_WIN32
 #include "config.w32.h"
+#elif defined(NETWARE)
+#include "config.nw.h"
 #else
 #include "php_config.h"
 #endif



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /ext/mysql php_mysql.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 05:55:18 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/ext/mysql php_mysql.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/ext/mysql/php_mysql.c
diff -u php4/ext/mysql/php_mysql.c:1.116.2.4 php4/ext/mysql/php_mysql.c:1.116.2.5
--- php4/ext/mysql/php_mysql.c:1.116.2.4Wed Aug 28 21:18:28 2002
+++ php4/ext/mysql/php_mysql.c  Thu Oct 24 05:55:17 2002
@@ -16,7 +16,7 @@
+--+
 */
  
-/* $Id: php_mysql.c,v 1.116.2.4 2002/08/29 01:18:28 sniper Exp $ */
+/* $Id: php_mysql.c,v 1.116.2.5 2002/10/24 09:55:17 hyanantha Exp $ */
 
 
 /* TODO:
@@ -37,6 +37,10 @@
 #ifdef PHP_WIN32
 #include 
 #define signal(a, b) NULL
+#elif defined(NETWARE)
+/*#include */
+#include 
+#define signal(a, b) NULL
 #else
 #include "build-defs.h"
 #if HAVE_SIGNAL_H
@@ -124,10 +128,12 @@
PHP_FE(mysql_pconnect, 
 NULL)
PHP_FE(mysql_close,
 NULL)
PHP_FE(mysql_select_db,
 NULL)
+#ifndef NETWARE/* The below two functions not supported on NetWare */
 #if MYSQL_VERSION_ID < 4
PHP_FE(mysql_create_db,
 NULL)
PHP_FE(mysql_drop_db,  
 NULL)
 #endif
+#endif /* NETWARE */
PHP_FE(mysql_query,
 NULL)
PHP_FE(mysql_unbuffered_query,  NULL)
PHP_FE(mysql_db_query, 
 NULL)
@@ -173,10 +179,12 @@
PHP_FALIAS(mysql_fieldtype, mysql_field_type,   NULL)
PHP_FALIAS(mysql_fieldflags,mysql_field_flags,  NULL)
PHP_FALIAS(mysql_selectdb,  mysql_select_db,NULL)
+#ifndef NETWARE/* The below two functions not supported on NetWare */
 #if MYSQL_VERSION_ID < 4
PHP_FALIAS(mysql_createdb,  mysql_create_db,NULL)
PHP_FALIAS(mysql_dropdb,mysql_drop_db,  NULL)
 #endif
+#endif /* NETWARE */
PHP_FALIAS(mysql_freeresult,mysql_free_result,  NULL)
PHP_FALIAS(mysql_numfields, mysql_num_fields,   NULL)
PHP_FALIAS(mysql_numrows,   mysql_num_rows, NULL)
@@ -297,7 +305,7 @@
 static PHP_INI_MH(OnMySQLPort)
 {
if (new_value==NULL) { /* default port */
-#ifndef PHP_WIN32
+#if !defined (PHP_WIN32) && ! defined (NETWARE)
struct servent *serv_ptr;
char *env;

@@ -427,7 +435,7 @@
sprintf(buf, "%ld", MySG(num_links));
php_info_print_table_row(2, "Active Links", buf);
php_info_print_table_row(2, "Client API version", mysql_get_client_info());
-#ifndef PHP_WIN32
+#if !defined (PHP_WIN32) && !defined (NETWARE)
php_info_print_table_row(2, "MYSQL_MODULE_TYPE", PHP_MYSQL_TYPE);
php_info_print_table_row(2, "MYSQL_SOCKET", MYSQL_UNIX_ADDR);
php_info_print_table_row(2, "MYSQL_INCLUDE", PHP_MYSQL_INCLUDE);
@@ -834,7 +842,7 @@
WRONG_PARAM_COUNT;
}
 
-   RETURN_STRING(mysql_get_client_info(),1);   
+   RETURN_STRING((char *)mysql_get_client_info(),1);   /* Type-casting done 
+due to NetWare */
 }
 /* }}} */
 
@@ -864,7 +872,7 @@
 
ZEND_FETCH_RESOURCE2(mysql, php_mysql_conn *, mysql_link, id, "MySQL-Link", 
le_link, le_plink);
 
-   RETURN_STRING(mysql_get_host_info(&mysql->conn),1);
+   RETURN_STRING((char *)mysql_get_host_info(&mysql->conn),1); /* 
+Type-casting done due to NetWare */
 }
 /* }}} */
 
@@ -924,12 +932,14 @@
 
ZEND_FETCH_RESOURCE2(mysql, php_mysql_conn *, mysql_link, id, "MySQL-Link", 
le_link, le_plink);
 
-   RETURN_STRING(mysql_get_server_info(&mysql->conn),1);
+   RETURN_STRING((char *)mysql_get_server_info(&mysql->conn),1);   /* 
+Type-casting done due to NetWare */
 }
 /* }}} */
 
 #endif
 
+#ifndef NETWARE/* The below two functions not supported on NetWare */
+
 #if MYSQL_VERSION_ID < 4
 /* {{{ proto bool mysql_create_db(string database_name [, int link_identifier])
Create a MySQL database */
@@ -1009,6 +1019,8 @@
 /* }}} */
 #endif
 
+#endif /* NETWARE */
+
 /* {{{ php_mysql_do_query_general
  */
 static void php_mysql_do_query_general(zval **query, zval **mysql_link, int link_id, 
zval **db, int use_store, zval *return_value TSRMLS_DC)
@@ -1310,7 +1322,7 @@

ZEND_FETCH_RESOURCE2(mysql, php_mysql_conn *, mysql_link, id, "MySQL-Link", 
le_link, le_plink);

-   RETURN_STRING(mysql_error(&mysql->conn), 1);
+   RETURN_STRING((char *)mysql_error(&mysql->conn), 1)

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

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 05:54:45 2002 EDT

  Added files: (Branch: PHP_4_2_0)
/php4/ext/mysql mysql.mak 
  Log:
  NetWare related file.
  
  

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

# Module details
MODULE_NAME = phpmysql
MODULE_DESC = "PHP MySQL Extension"
VMAJ = 0
VMIN = 60
VREV = 0

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

# MYSQL stuff
MYSQL_DIR = P:/APPS/script/sw/mysql

# Build type defaults to 'release'
ifndef BUILD
BUILD = release
endif

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

# Source files
C_SRC = php_mysql.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 = $(MYSQL_DIR)/lib/libmysqlclient.lib

# Destination directories and files
OBJ_DIR = $(BUILD)
FINAL_DIR = $(BUILD)
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 -wchar_t on -bool on -processor Pentium 
-align 1
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 += -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$(WINSOCK_DIR)/include/nlm -I$(WINSOCK_DIR)/include


# 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 
-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 -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\
 phplib
IMPORT = @$(SDK_DIR)/imports/libc.imp\
 @$(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

# 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 $($(CC) -M $< $(C_FLAGS) -o $@

$(OBJ_DIR)/%.d: %.c
@echo Building Dependencies for $($(CC) -M $< $(C_FLAGS) -o $@

$(OBJ_DIR)/%.obj: %.cpp
@echo Compiling $?...
@$(CC) $< $(C_FLAGS) -o $@

$(OBJ_DIR)/%.obj: %.c
@echo Compiling $?...
@$(CC) $< $(C_FLAGS) -o $@


$(BINARY): $(DEPDS) $(OBJECTS)
@echo Import $(IMPORT) > $(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 Linking $@...
@echo $(LD_FLAGS) -commandfile $(basename $@).def > $(basename $@).link
@echo $(LIBRARY) $(OBJECTS) >> $(basename $@).link
@$(LINK) @$(basename $@).link


PHONY: clean
clean: cleand 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, vis

[PHP-CVS] cvs: php4(PHP_4_2_0) /ext/ldap php_ldap.h

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 05:53:21 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/ext/ldap  php_ldap.h 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/ext/ldap/php_ldap.h
diff -u php4/ext/ldap/php_ldap.h:1.25 php4/ext/ldap/php_ldap.h:1.25.2.1
--- php4/ext/ldap/php_ldap.h:1.25   Fri Jan  4 15:56:03 2002
+++ php4/ext/ldap/php_ldap.hThu Oct 24 05:53:21 2002
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: php_ldap.h,v 1.25 2002/01/04 20:56:03 venaas Exp $ */
+/* $Id: php_ldap.h,v 1.25.2.1 2002/10/24 09:53:21 hyanantha Exp $ */
 
 #ifndef PHP_LDAP_H
 #define PHP_LDAP_H
@@ -89,9 +89,11 @@
 PHP_FUNCTION(ldap_rename);
 #endif
 
+#ifndef NETWARE/* The below function not supported on NetWare */
 #if LDAP_API_VERSION > 2000
 PHP_FUNCTION(ldap_start_tls);
 #endif
+#endif /* NETWARE */
 
 #if defined(LDAP_API_FEATURE_X_OPENLDAP) && defined(HAVE_3ARG_SETREBINDPROC)
 PHP_FUNCTION(ldap_set_rebind_proc);



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /ext/ldap ldap.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 05:53:01 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/ext/ldap  ldap.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/ext/ldap/ldap.c
diff -u php4/ext/ldap/ldap.c:1.116.2.2 php4/ext/ldap/ldap.c:1.116.2.3
--- php4/ext/ldap/ldap.c:1.116.2.2  Mon Sep 23 19:22:08 2002
+++ php4/ext/ldap/ldap.cThu Oct 24 05:53:01 2002
@@ -22,13 +22,19 @@
+--+
  */
  
-/* $Id: ldap.c,v 1.116.2.2 2002/09/23 23:22:08 sniper Exp $ */
+/* $Id: ldap.c,v 1.116.2.3 2002/10/24 09:53:01 hyanantha Exp $ */
 #define IS_EXT_MODULE
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+/* Additional headers for NetWare */
+#if defined(NETWARE) && (NEW_LIBC)
+#include 
+#include 
+#endif
+
 #include "php.h"
 #include "php_ini.h"
 
@@ -118,9 +124,11 @@
PHP_FE(ldap_rename,
 NULL)
 #endif
 
+#ifndef NETWARE/* The below function not supported on NetWare */
 #if LDAP_API_VERSION > 2000
PHP_FE(ldap_start_tls, 
 NULL)
 #endif
+#endif /* NETWARE */
 
 #if defined(LDAP_API_FEATURE_X_OPENLDAP) && defined(HAVE_3ARG_SETREBINDPROC)
PHP_FE(ldap_set_rebind_proc,NULL)
@@ -263,7 +271,7 @@
 
php_info_print_table_start();
php_info_print_table_row(2, "LDAP Support", "enabled" );
-   php_info_print_table_row(2, "RCS Version", "$Id: ldap.c,v 1.116.2.2 2002/09/23 
23:22:08 sniper Exp $" );
+   php_info_print_table_row(2, "RCS Version", "$Id: ldap.c,v 1.116.2.3 2002/10/24 
+09:53:01 hyanantha Exp $" );
 
if (LDAPG(max_links) == -1) {
snprintf(tmp, 31, "%ld/unlimited", LDAPG(num_links));
@@ -492,7 +500,16 @@
 
ZEND_FETCH_RESOURCE(ld, ldap_linkdata *, link, -1, "ldap link", le_link);
 
+#ifndef NETWARE
if (ldap_bind_s(ld->link, ldap_bind_rdn, ldap_bind_pw, LDAP_AUTH_SIMPLE) != 
LDAP_SUCCESS) {
+#else
+   /*  The function ldap_bind_s has been deprecated on NetWare. If it is used 
+on NetWare,
+   it gives the result, but will also result in the display of warning 
+message
+   that gets displayed on the web browser.
+   ldap_simple_bind_s removes that warning.
+   */
+   if (ldap_simple_bind_s(ld->link, (const char *)ldap_bind_rdn, (const char 
+*)ldap_bind_pw) != LDAP_SUCCESS) {
+#endif
php_error(E_WARNING, "LDAP:  Unable to bind to server: %s", 
ldap_err2string(_get_lderrno(ld->link)));
RETURN_FALSE;
} else {
@@ -1992,6 +2009,7 @@
 /* }}} */
 #endif
 
+#ifndef NETWARE/* The below function not supported on NetWare */
 #if LDAP_API_VERSION > 2000
 /* {{{ proto bool ldap_start_tls(resource link)
Start TLS */
@@ -2016,6 +2034,7 @@
 }
 /* }}} */
 #endif
+#endif /* NETWARE */
 
 
 #if defined(LDAP_API_FEATURE_X_OPENLDAP) && defined(HAVE_3ARG_SETREBINDPROC)



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




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

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 05:52:20 2002 EDT

  Added files: (Branch: PHP_4_2_0)
/php4/ext/ldap  ldap.mak 
  Log:
  NetWare related file.
  
  

Index: php4/ext/ldap/ldap.mak
+++ php4/ext/ldap/ldap.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_ldap
MODULE_DESC = "PHP LDAP Extension"
VMAJ = 0
VMIN = 60
VREV = 1

#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 = ldap.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 += -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 += -I$(PROJECT_ROOT)/zend -I$(PROJECT_ROOT)/tsrm
C_FLAGS += -I- -I$(SDK_DIR)/include -I$(MWCIncludes)
C_FLAGS += -I$(LDAP_DIR)/inc
C_FLAGS += -I$(WINSOCK_DIR)/include/nlm -I$(WINSOCK_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\
 ldapsdk \
 phplib
IMPORT = @$(SDK_DIR)/imports/libc.imp\
 @$(SDK_DIR)/imports/ws2nlm.imp  \
 @$(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


# 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 $($(CC) -M $< $(C_FLAGS) -o $@

$(OBJ_DIR)/%.d: %.c
@echo Building Dependencies for $($(CC) -M $< $(C_FLAGS) -o $@

$(OBJ_DIR)/%.obj: %.cpp
@echo Compiling $?...
@$(CC) $< $(C_FLAGS) -o $@

$(OBJ_DIR)/%.obj: %.c
@echo Compiling $?...
@$(CC) $< $(C_FLAGS) -o $@


$(BINARY): $(DEPDS) $(OBJECTS)
@echo Import $(IMPORT) > $(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

$(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: cleand 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).

[PHP-CVS] cvs: php4(PHP_4_2_0) /ext/imap imap.mak

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 05:51:40 2002 EDT

  Added files: (Branch: PHP_4_2_0)
/php4/ext/imap  imap.mak 
  Log:
  NetWare related file.
  
  

Index: php4/ext/imap/imap.mak
+++ php4/ext/imap/imap.mak



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /ext/imap php_imap.c

2002-10-24 Thread Anantha Kesari H Y
hyanantha   Thu Oct 24 05:50:36 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/ext/imap  php_imap.c 
  Log:
  NetWare related changes/modifications.
  
  
Index: php4/ext/imap/php_imap.c
diff -u php4/ext/imap/php_imap.c:1.112.2.8 php4/ext/imap/php_imap.c:1.112.2.9
--- php4/ext/imap/php_imap.c:1.112.2.8  Thu Sep 19 12:59:11 2002
+++ php4/ext/imap/php_imap.cThu Oct 24 05:50:36 2002
@@ -25,7 +25,7 @@
| PHP 4.0 updates:  Zeev Suraski <[EMAIL PROTECTED]>   |
+--+
  */
-/* $Id: php_imap.c,v 1.112.2.8 2002/09/19 16:59:11 derick Exp $ */
+/* $Id: php_imap.c,v 1.112.2.9 2002/10/24 09:50:36 hyanantha Exp $ */
 
 #define IMAP41
 
@@ -421,7 +421,7 @@
 
ZEND_INIT_MODULE_GLOBALS(imap, php_imap_init_globals, NULL)
 
-#ifndef PHP_WIN32
+#if !defined(PHP_WIN32) && !defined(NETWARE)
mail_link(&unixdriver); /* link in the unix driver */
mail_link(&mhdriver);   /* link in the mh driver */
/* mail_link(&mxdriver); */ /* According to c-client docs (internal.txt) 
this shouldn't be used. */
@@ -437,7 +437,7 @@
mail_link(&mtxdriver);  /* link in the mtx driver */
mail_link(&dummydriver);/* link in the dummy driver */
 
-#ifndef PHP_WIN32
+#if !defined(PHP_WIN32) && !defined(NETWARE)
auth_link(&auth_log);   /* link in the log authenticator */
auth_link(&auth_md5);   /* link in the cram-md5 authenticator */ 
 #ifdef  HAVE_IMAP_SSL



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




  1   2   >