Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /sapi/apache2filter php_apache.h sapi_apache2.c
At 08:25 PM 1/3/2003 +0100, Sascha Schumann wrote: On Fri, 3 Jan 2003, Anantha Kesari H Y wrote: hyanantha Fri Jan 3 10:59:02 2003 EDT Modified files: /php4/sapi/apache2filter php_apache.h sapi_apache2.c Log: Modifications for NetWare. I need to say it again. These modifications are *extremely* ugly. It's like spilling a glass of wine over important documents. You won't be able to remove the spilled substance without expensive labor. These modifications lack proper factoring. They repeat the same kind of change all over our code base. Instead of hiding some of netware's properties behind appropiate macros and typedefs, you duplicate existing code in a slightly changed manner all over the place. What do you guys think about this? I agree. The novell changes are butt ugly. They are just hacking at our code instead of fixing it nicely. Andi -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: [PHP-CVS] cvs: php4 /sapi/apache2filter php_apache.h sapi_apache2.c
It doesn't make sense to me to have the following lines repeated all over PHP: +#if defined(NETWARE) defined(CLIB_STAT_PATCH) + struct stat_libc finfo; +#else struct stat finfo; +#endif You are making the PHP source tree very hard to maintain. If anything, we should probably create some kind of abstraction in TSRM and use that everywhere. These fixes might achieve your goal for making PHP work on netware but they are making our code butt ugly and hard to maintain. Andi At 03:59 PM 1/3/2003 +, Anantha Kesari H Y wrote: hyanantha Fri Jan 3 10:59:02 2003 EDT Modified files: /php4/sapi/apache2filterphp_apache.h sapi_apache2.c Log: Modifications for NetWare. Index: php4/sapi/apache2filter/php_apache.h diff -u php4/sapi/apache2filter/php_apache.h:1.19 php4/sapi/apache2filter/php_apache.h:1.20 --- php4/sapi/apache2filter/php_apache.h:1.19 Tue Dec 31 10:59:03 2002 +++ php4/sapi/apache2filter/php_apache.hFri Jan 3 10:59:02 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_apache.h,v 1.19 2002/12/31 15:59:03 sebastian Exp $ */ +/* $Id: php_apache.h,v 1.20 2003/01/03 15:59:02 hyanantha Exp $ */ #ifndef PHP_APACHE_H #define PHP_APACHE_H @@ -41,7 +41,11 @@ /* Index for reading from buffer */ int post_idx; /* stat structure of the current file */ +#if defined(NETWARE) defined(CLIB_STAT_PATCH) + struct stat_libc finfo; +#else struct stat finfo; +#endif /* Buffer for request body filter */ char *post_data; /* Whether or not we've processed PHP in the output filters yet. */ Index: php4/sapi/apache2filter/sapi_apache2.c diff -u php4/sapi/apache2filter/sapi_apache2.c:1.101 php4/sapi/apache2filter/sapi_apache2.c:1.102 --- php4/sapi/apache2filter/sapi_apache2.c:1.101Tue Dec 31 10:59:03 2002 +++ php4/sapi/apache2filter/sapi_apache2.c Fri Jan 3 10:59:02 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: sapi_apache2.c,v 1.101 2002/12/31 15:59:03 sebastian Exp $ */ +/* $Id: sapi_apache2.c,v 1.102 2003/01/03 15:59:02 hyanantha Exp $ */ #include fcntl.h @@ -29,7 +29,11 @@ #include SAPI.h #include ext/standard/php_smart_str.h +#ifndef NETWARE #include ext/standard/php_standard.h +#else +#include ext/standard/basic_functions.h +#endif #include apr_strings.h #include ap_config.h @@ -47,6 +51,10 @@ #include php_apache.h +#ifdef NETWARE +#undef shutdown /* To avoid Winsock confusion */ +#endif + /* A way to specify the location of the php.ini dir in an apache directive */ char *apache2_php_ini_path_override = NULL; @@ -160,9 +168,16 @@ ctx-finfo.st_uid = ctx-r-finfo.user; ctx-finfo.st_gid = ctx-r-finfo.group; ctx-finfo.st_ino = ctx-r-finfo.inode; +#if defined(NETWARE) defined(CLIB_STAT_PATCH) + ctx-finfo.st_atime.tv_sec = ctx-r-finfo.atime/100; + ctx-finfo.st_mtime.tv_sec = ctx-r-finfo.mtime/100; + ctx-finfo.st_ctime.tv_sec = ctx-r-finfo.ctime/100; +#else ctx-finfo.st_atime = ctx-r-finfo.atime/100; ctx-finfo.st_mtime = ctx-r-finfo.mtime/100; ctx-finfo.st_ctime = ctx-r-finfo.ctime/100; +#endif + ctx-finfo.st_size = ctx-r-finfo.size; ctx-finfo.st_nlink = ctx-r-finfo.nlink; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: [PHP-CVS] cvs: php4 /sapi/apache2filter php_apache.h sapi_apache2.c
On Fri, 3 Jan 2003, Anantha Kesari H Y wrote: hyanantha Fri Jan 3 10:59:02 2003 EDT Modified files: /php4/sapi/apache2filter php_apache.h sapi_apache2.c Log: Modifications for NetWare. I need to say it again. These modifications are *extremely* ugly. It's like spilling a glass of wine over important documents. You won't be able to remove the spilled substance without expensive labor. These modifications lack proper factoring. They repeat the same kind of change all over our code base. Instead of hiding some of netware's properties behind appropiate macros and typedefs, you duplicate existing code in a slightly changed manner all over the place. What do you guys think about this? - Sascha -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /sapi/apache2filter php_apache.h sapi_apache2.c
I think you (Sascha) need to provide a proper example of how to do it properly. It's insufficient to just say Don't do that. At least point to a place in the code where it is done properly. These changes are needed by the developer, and the developer will use them whether they're in the codebase or not (I've been using a custom build of PHP for longer than I can remember because my patches don't seem to be acceptable for inclusion into the php code base). If unacceptable, then direct the willing developer in the proper fashion, I'm sure they'll be happy to receive direction to lighten their load. Don't spill wine is not proper direction. This is also a somewhat hypocritical position since similar changes have been done for Win32 compatibility all over the code base. As far as spilling wine, it won't be the first time, nor the last. Joseph Who'd still like his register_shutdown_function patch approved, or at least some direction on how to do it properly. -Original Message- From: Sascha Schumann [mailto:[EMAIL PROTECTED]] Sent: Friday, January 03, 2003 2:25 PM Subject: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /sapi/apache2filter php_apache.h sapi_apache2.c I need to say it again. These modifications are *extremely* ugly. It's like spilling a glass of wine over important documents. You won't be able to remove the spilled substance without expensive labor. These modifications lack proper factoring. They repeat the same kind of change all over our code base. Instead of hiding some of netware's properties behind appropiate macros and typedefs, you duplicate existing code in a slightly changed manner all over the place. What do you guys think about this? - Sascha -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /sapi/apache2filter php_apache.h sapi_apache2.c
Sebastian Bergmann wrote: And now for some testing... The segfault on Win32 is gone. Thanks for helping us out here, Aaron Cliff! -- Sebastian Bergmann http://sebastian-bergmann.de/ http://phpOpenTracker.de/ Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: [PHP-CVS] cvs: php4 /sapi/apache2filter php_apache.h sapi_apache2.c
Sebastian Bergmann wrote: sebastian Thu Apr 11 02:01:55 2002 EDT Modified files: /php4/sapi/apache2filterphp_apache.h sapi_apache2.c Log: Patch by Aaron Bannert [EMAIL PROTECTED] and Cliff Woolley [EMAIL PROTECTED]. And now for some testing... -- Sebastian Bergmann http://sebastian-bergmann.de/ http://phpOpenTracker.de/ Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php