Re: cvs: php4 /ext/zlib zlib.c

From: Date: Thu, 26 Oct 2000 14:56:49 +0000
Subject: Re: cvs: php4 /ext/zlib zlib.c
References: 1 2  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-2262@lists.php.net to get a copy of this message
Andi Gutmans wrote: > > So put the #define before including "php.h". > You shouldn't directly include php_config.h because it doesn't exist on > Windows and #ifdef'ing it out isn't the right thing either. php.h does the > right thing. ... have a guess where HAVE_FOPENCOOKIE comes from :) now seriously: the experimental 'zlib:' fopen-wrapper relies on functionality only available in the GNU libc, namely the fopencookie() function so configure checks for fopencookie() and #defines HAVE_FOPENCOOKIE in php_config.h as i do not want to enable GNU extensions where they are not needed i do not #define __GNU_SOURCE when no fopencookie() is available, but i have to #define __GNU_SOURCE *before* #inlcudeing stdio.h so i have to directly include php_config.h here as php.h would alread include stdio.h and others so that checking for HAVE_FOPENCOOKIE and defining __GNU_SOURCE afterwards would have no effect, even if i re-included stdio.h i'll have another look at it tonight, my current plan is to move the fopen wrapper out of zlib.c into a seperate file, maybe to create an additional config header file in ext/zlib that only contains HAVE_FOPENCOOKIE define/undefine, and a seperate configure option that enables the fopen wrapper code which would default to off -- Hartmut Holzgraefe hartmut@six.de http://www.six.de +49-711-99091-77 Besuchen Sie uns auf der Systems in München , Halle C2, Stand 126

« previous php.cvs (#2262) next »