RE: [PHP-CVS] cvs: php-src /sapi/nsapi nsapi.c

2009-01-11 Thread Uwe Schindler
Ys! I've seen this comment here:

/* vs.net 2005 has a 64-bit time_t.  This will likely break
 * 3rdParty libs that were built with older compilers; switch
 * back to 32-bit */
#ifndef _WIN64
# define _USE_32BIT_TIME_T 1
#endif

If somebody wants to remove this he should be prepared to have failures in
NSAPI :-)

Thanks,
Uwe

-
Uwe Schindler
theta...@php.net - http://www.php.net
NSAPI SAPI developer
Bremen, Germany

> -Original Message-
> From: Pierre Joye [mailto:pierre@gmail.com]
> Sent: Sunday, January 11, 2009 2:41 PM
> To: Uwe Schindler
> Cc: php-cvs@lists.php.net
> Subject: Re: [PHP-CVS] cvs: php-src /sapi/nsapi nsapi.c
> 
> On Sun, Jan 11, 2009 at 2:39 PM, Uwe Schindler  wrote:
> > thetaphiSun Jan 11 13:39:01 2009 UTC
> >
> >  Modified files:
> >/php-src/sapi/nsapi nsapi.c
> >  Log:
> >  add sanity check for time_t size of win32
> >
> > http://cvs.php.net/viewvc.cgi/php-
> src/sapi/nsapi/nsapi.c?r1=1.101&r2=1.102&diff_format=u
> > Index: php-src/sapi/nsapi/nsapi.c
> > diff -u php-src/sapi/nsapi/nsapi.c:1.101 php-
> src/sapi/nsapi/nsapi.c:1.102
> > --- php-src/sapi/nsapi/nsapi.c:1.101Tue Jan  6 13:45:30 2009
> > +++ php-src/sapi/nsapi/nsapi.c  Sun Jan 11 13:39:01 2009
> > @@ -17,7 +17,7 @@
> >+
> --+
> >  */
> >
> > -/* $Id: nsapi.c,v 1.101 2009/01/06 13:45:30 thetaphi Exp $ */
> > +/* $Id: nsapi.c,v 1.102 2009/01/11 13:39:01 thetaphi Exp $ */
> >
> >  /*
> >  * PHP includes
> > @@ -55,7 +55,14 @@
> >  #define XP_UNIX
> >  #endif
> >  #endif
> > -
> > +
> > +/*
> > + * For windows do some sanity checks, because time_t must be 32bit for
> NSAPI on win32
> > + */
> > +#if defined(PHP_WIN32) && !defined(_WIN64) && sizeof(time_t)!=4
> > +#error "NSAPI module needs time_t to have a size of 32 bits on win32"
> > +#endif
> 
> We already do this check in the main configuration file, you may want
> to rely on it instead.
> 
> --
> Pierre
> 
> http://blog.thepimp.net | http://www.libgd.org


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



Re: [PHP-CVS] cvs: php-src /sapi/nsapi nsapi.c

2009-01-11 Thread Pierre Joye
On Sun, Jan 11, 2009 at 2:39 PM, Uwe Schindler  wrote:
> thetaphiSun Jan 11 13:39:01 2009 UTC
>
>  Modified files:
>/php-src/sapi/nsapi nsapi.c
>  Log:
>  add sanity check for time_t size of win32
>
> http://cvs.php.net/viewvc.cgi/php-src/sapi/nsapi/nsapi.c?r1=1.101&r2=1.102&diff_format=u
> Index: php-src/sapi/nsapi/nsapi.c
> diff -u php-src/sapi/nsapi/nsapi.c:1.101 php-src/sapi/nsapi/nsapi.c:1.102
> --- php-src/sapi/nsapi/nsapi.c:1.101Tue Jan  6 13:45:30 2009
> +++ php-src/sapi/nsapi/nsapi.c  Sun Jan 11 13:39:01 2009
> @@ -17,7 +17,7 @@
>+--+
>  */
>
> -/* $Id: nsapi.c,v 1.101 2009/01/06 13:45:30 thetaphi Exp $ */
> +/* $Id: nsapi.c,v 1.102 2009/01/11 13:39:01 thetaphi Exp $ */
>
>  /*
>  * PHP includes
> @@ -55,7 +55,14 @@
>  #define XP_UNIX
>  #endif
>  #endif
> -
> +
> +/*
> + * For windows do some sanity checks, because time_t must be 32bit for NSAPI 
> on win32
> + */
> +#if defined(PHP_WIN32) && !defined(_WIN64) && sizeof(time_t)!=4
> +#error "NSAPI module needs time_t to have a size of 32 bits on win32"
> +#endif

We already do this check in the main configuration file, you may want
to rely on it instead.

-- 
Pierre

http://blog.thepimp.net | http://www.libgd.org

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



Re: [PHP-CVS] cvs: php-src /sapi/nsapi nsapi.c

2003-11-01 Thread Uwe Schindler
done. Would be good if the changes to mbstring in last RC which had 
problems in ZTS builds should also be mentioned in NEWS. Because it was a 
major change.

Uwe

At 11:25 01.11.2003, Jani Taskinen wrote:

Some NEWS entries about these fixes you have made might be in order?

--Jani

On Fri, 31 Oct 2003, Uwe Schindler wrote:

>thetaphi   Fri Oct 31 12:31:48 2003 EDT
>
>  Modified files:
>/php-src/sapi/nsapinsapi.c
>  Log:
>  fix header handler
>
>Index: php-src/sapi/nsapi/nsapi.c
>diff -u php-src/sapi/nsapi/nsapi.c:1.56 php-src/sapi/nsapi/nsapi.c:1.57
>--- php-src/sapi/nsapi/nsapi.c:1.56Fri Oct 31 07:20:33 2003
>+++ php-src/sapi/nsapi/nsapi.c Fri Oct 31 12:31:46 2003
>@@ -17,7 +17,7 @@
>+--+
> */
>
>-/* $Id: nsapi.c,v 1.56 2003/10/31 12:20:33 thetaphi Exp $ */
>+/* $Id: nsapi.c,v 1.57 2003/10/31 17:31:46 thetaphi Exp $ */
>
> /*
>  * PHP includes
>@@ -203,7 +203,7 @@
>   NULL,
>   NULL,
>   PHP_MINFO(nsapi),
>-  "$Revision: 1.56 $",
>+  "$Revision: 1.57 $",
>   STANDARD_MODULE_PROPERTIES
> };
> /* }}} */
>@@ -486,12 +486,15 @@
>   param_free(pblock_remove("content-type", rc->rq->srvhdrs));
>   pblock_nvinsert("content-type", header_content, 
rc->rq->srvhdrs);
>   } else {
>+  /* to lower case because NSAPI reformats the headers and 
wants lowercase */
>+  for (p=header_name; *p; p++) {
>+  *p=tolower(*p);
>+  }
>+  if (sapi_header->replace) 
param_free(pblock_remove(header_name, rc->rq->srvhdrs));
>   pblock_nvinsert(header_name, header_content, 
rc->rq->srvhdrs);
>   }
>
>-  *p = ':';   /* restore '*p' */
>-
>-  efree(sapi_header->header);
>+  sapi_free_header(sapi_header);
>
>   return 0;   /* don't use the default SAPI mechanism, NSAPI 
duplicates this functionality */
> }
>@@ -501,10 +504,6 @@
>   int retval;
>   nsapi_request_context *rc = (nsapi_request_context 
*)SG(server_context);
>
>-  /*
>-  * We could probably just do this in the header_handler. But, I
>-  * don't know what the implication of doing it there is.
>-  */
>   if (SG(sapi_headers).send_default_content_type) {
>   char *hd;
>   param_free(pblock_remove("content-type", rc->rq->srvhdrs));
>
>
-
Uwe Schindler
[EMAIL PROTECTED] - http://www.php.net
NSAPI SAPI developer
Erlangen, Germany
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-CVS] cvs: php-src /sapi/nsapi nsapi.c

2003-11-01 Thread Jani Taskinen

Some NEWS entries about these fixes you have made might be in order?

--Jani


On Fri, 31 Oct 2003, Uwe Schindler wrote:

>thetaphi   Fri Oct 31 12:31:48 2003 EDT
>
>  Modified files:  
>/php-src/sapi/nsapinsapi.c 
>  Log:
>  fix header handler
>  
>Index: php-src/sapi/nsapi/nsapi.c
>diff -u php-src/sapi/nsapi/nsapi.c:1.56 php-src/sapi/nsapi/nsapi.c:1.57
>--- php-src/sapi/nsapi/nsapi.c:1.56Fri Oct 31 07:20:33 2003
>+++ php-src/sapi/nsapi/nsapi.c Fri Oct 31 12:31:46 2003
>@@ -17,7 +17,7 @@
>+--+
> */
> 
>-/* $Id: nsapi.c,v 1.56 2003/10/31 12:20:33 thetaphi Exp $ */
>+/* $Id: nsapi.c,v 1.57 2003/10/31 17:31:46 thetaphi Exp $ */
> 
> /*
>  * PHP includes
>@@ -203,7 +203,7 @@
>   NULL,
>   NULL,
>   PHP_MINFO(nsapi),
>-  "$Revision: 1.56 $",
>+  "$Revision: 1.57 $",
>   STANDARD_MODULE_PROPERTIES
> };
> /* }}} */
>@@ -486,12 +486,15 @@
>   param_free(pblock_remove("content-type", rc->rq->srvhdrs));
>   pblock_nvinsert("content-type", header_content, rc->rq->srvhdrs);
>   } else {
>+  /* to lower case because NSAPI reformats the headers and wants 
>lowercase */
>+  for (p=header_name; *p; p++) {
>+  *p=tolower(*p);
>+  }
>+  if (sapi_header->replace) param_free(pblock_remove(header_name, 
>rc->rq->srvhdrs));
>   pblock_nvinsert(header_name, header_content, rc->rq->srvhdrs);
>   }
> 
>-  *p = ':';   /* restore '*p' */
>-
>-  efree(sapi_header->header);
>+  sapi_free_header(sapi_header);
> 
>   return 0;   /* don't use the default SAPI mechanism, NSAPI duplicates this 
> functionality */
> }
>@@ -501,10 +504,6 @@
>   int retval;
>   nsapi_request_context *rc = (nsapi_request_context *)SG(server_context);
> 
>-  /*
>-   * We could probably just do this in the header_handler. But, I
>-   * don't know what the implication of doing it there is.
>-   */
>   if (SG(sapi_headers).send_default_content_type) {
>   char *hd;
>   param_free(pblock_remove("content-type", rc->rq->srvhdrs));
>
>

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