cvs: /php4 SAPI.h configure.in php_ini.h /php4/dl phpdl.h /php4/ext/gd gd.c gdttf.c php3_gd.h /php4/ext/mysql php_mysql.c php_mysql.h
/php4/ext/standard php_output.h /php4/pear README

From: Date: Wed, 01 Dec 1999 22:59:47 +0000
Subject: cvs: /php4 SAPI.h configure.in php_ini.h /php4/dl phpdl.h /php4/ext/gd gd.c gdttf.c php3_gd.h /php4/ext/mysql php_mysql.c php_mysql.h
/php4/ext/standard php_output.h /php4/pear README
Groups: php.version4 
Request: Send a blank email to php-version4+get-7205@lists.php.net to get a copy of this message
ssb Wed Dec 1 17:59:47 1999 EDT Modified files: /php4 SAPI.h configure.in php_ini.h /php4/dl phpdl.h /php4/ext/gd gd.c gdttf.c php3_gd.h /php4/ext/mysql php_mysql.c php_mysql.h /php4/ext/standard php_output.h /php4/pear README Log: - Fixed some warnings in maintainer-mode. - Made mysql and gd work as shared extensions again by defining COMPILE_DL if PIC is defined. # We need a better solution for building .so extensions than this # PIC/COMPILE_DL hack! Index: php4/SAPI.h diff -u php4/SAPI.h:1.21 php4/SAPI.h:1.22 --- php4/SAPI.h:1.21 Thu Sep 16 19:18:15 1999 +++ php4/SAPI.h Wed Dec 1 17:59:42 1999 @@ -96,7 +96,7 @@ # define SLS_FETCH() sapi_globals_struct *sapi_globals = ts_resource(sapi_globals_id) SAPI_API extern int sapi_globals_id; #else -# define SLS_D +# define SLS_D void # define SLS_DC # define SLS_C # define SLS_CC @@ -117,7 +117,7 @@ SAPI_API void sapi_deactivate(SLS_D); SAPI_API int sapi_add_header(char *header_line, uint header_line_len); -SAPI_API int sapi_send_headers(); +SAPI_API int sapi_send_headers(void); SAPI_API int sapi_register_post_readers(sapi_post_content_type_reader *post_content_type_readers); SAPI_API int sapi_register_post_reader(sapi_post_content_type_reader *post_content_type_reader); Index: php4/configure.in diff -u php4/configure.in:1.48 php4/configure.in:1.49 --- php4/configure.in:1.48 Tue Nov 30 16:22:02 1999 +++ php4/configure.in Wed Dec 1 17:59:42 1999 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.48 1999/11/30 21:22:02 sas Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.49 1999/12/01 22:59:42 ssb Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(0) @@ -662,10 +662,8 @@ dnl If we are using gcc and the user has not specified CFLAGS, add -O2. test -n "$auto_cflags" && test -n "$GCC" && CFLAGS="$CFLAGS -O2" - - - CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS" + export CPPFLAGS if test "$PHP_THREAD_SAFETY" = "yes" || test "$PHP_EXPERIMENTAL_ZTS" = "yes"; then Index: php4/php_ini.h diff -u php4/php_ini.h:1.16 php4/php_ini.h:1.17 --- php4/php_ini.h:1.16 Sat Nov 6 05:01:52 1999 +++ php4/php_ini.h Wed Dec 1 17:59:42 1999 @@ -51,13 +51,13 @@ }; -int php_ini_mstartup(); -int php_ini_mshutdown(); -int php_ini_rshutdown(); +int php_ini_mstartup(void); +int php_ini_mshutdown(void); +int php_ini_rshutdown(void); PHPAPI int php_register_ini_entries(php_ini_entry *ini_entry, int module_number); PHPAPI void php_unregister_ini_entries(int module_number); -PHPAPI void php_ini_refresh_caches(); +PHPAPI void php_ini_refresh_caches(void); PHPAPI int php_alter_ini_entry(char *name, uint name_length, char *new_value, uint new_value_length, int modify_type); PHPAPI int php_restore_ini_entry(char *name, uint name_length); PHPAPI void display_ini_entries(zend_module_entry *module); Index: php4/dl/phpdl.h diff -u php4/dl/phpdl.h:1.1 php4/dl/phpdl.h:1.2 --- php4/dl/phpdl.h:1.1 Wed Apr 7 17:02:53 1999 +++ php4/dl/phpdl.h Wed Dec 1 17:59:43 1999 @@ -26,7 +26,7 @@ | Authors: Rasmus Lerdorf <rasmus@lerdorf.on.ca> | +----------------------------------------------------------------------+ */ -/* $Id: phpdl.h,v 1.1 1999/04/07 21:02:53 zeev Exp $ */ +/* $Id: phpdl.h,v 1.2 1999/12/01 22:59:43 ssb Exp $ */ #ifndef _PHPDL_H #define _PHPDL_H @@ -38,6 +38,8 @@ #else #define DLEXPORT #endif + +DLEXPORT php3_module_entry *get_module(void); #endif Index: php4/ext/gd/gd.c diff -u php4/ext/gd/gd.c:1.23 php4/ext/gd/gd.c:1.24 --- php4/ext/gd/gd.c:1.23 Tue Nov 30 15:18:09 1999 +++ php4/ext/gd/gd.c Wed Dec 1 17:59:44 1999 @@ -18,13 +18,17 @@ +----------------------------------------------------------------------+ */ -/* $Id: gd.c,v 1.23 1999/11/30 20:18:09 andi Exp $ */ +/* $Id: gd.c,v 1.24 1999/12/01 22:59:44 ssb Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ /* Note that there is no code from the gd package in this file */ +#ifdef PIC +# define COMPILE_DL 1 +#endif + #include "php.h" #include "ext/standard/head.h" #include <math.h> @@ -136,11 +140,7 @@ }; #if COMPILE_DL -# if PHP_31 -# include "../phpdl.h" -# else -# include "dl/phpdl.h" -# endif +# include "dl/phpdl.h" DLEXPORT php3_module_entry *get_module(void) { return &gd_module_entry; } #endif Index: php4/ext/gd/gdttf.c diff -u php4/ext/gd/gdttf.c:1.5 php4/ext/gd/gdttf.c:1.6 --- php4/ext/gd/gdttf.c:1.5 Sat Nov 20 23:07:56 1999 +++ php4/ext/gd/gdttf.c Wed Dec 1 17:59:44 1999 @@ -2,7 +2,7 @@ /* */ /* John Ellson ellson@lucent.com */ -/* $Id: gdttf.c,v 1.5 1999/11/21 04:07:56 rasmus Exp $ */ +/* $Id: gdttf.c,v 1.6 1999/12/01 22:59:44 ssb Exp $ */ #if WIN32|WINNT #include "config.w32.h" @@ -23,6 +23,10 @@ #include <freetype.h> #endif +#ifndef HAVE_GDIMAGECOLORRESOLVE +extern int gdImageColorResolve(gdImagePtr, int, int, int); +#endif + /* number of fonts cached before least recently used is replaced */ #define FONTCACHESIZE 6 @@ -148,61 +152,6 @@ /* local prototype */ char *gdttfchar(gdImage *im, int fg, font_t *font, int x, int y, TT_F26Dot6 x1, TT_F26Dot6 y1, TT_F26Dot6 *advance, TT_BBox **bbox, char **next); - -#ifndef HAVE_GDIMAGECOLORRESOLVE - -int gdImageColorResolve(gdImagePtr im, int r, int g, int b); - -/********************************************************************/ -/* gdImageColorResolve is a replacement for the old fragment: */ -/* */ -/* if ((color=gdImageColorExact(im,R,G,B)) < 0) */ -/* if ((color=gdImageColorAllocate(im,R,G,B)) < 0) */ -/* color=gdImageColorClosest(im,R,G,B); */ -/* */ -/* in a single function */ - -static int -gdImageColorResolve(gdImagePtr im, int r, int g, int b) -{ - int c; - int ct = -1; - int op = -1; - long rd, gd, bd, dist; - long mindist = 3*255*255; /* init to max poss dist */ - - for (c = 0; c < im->colorsTotal; c++) { - if (im->open[c]) { - op = c; /* Save open slot */ - continue; /* Color not in use */ - } - rd = (long)(im->red [c] - r); - gd = (long)(im->green[c] - g); - bd = (long)(im->blue [c] - b); - dist = rd * rd + gd * gd + bd * bd; - if (dist < mindist) { - if (dist == 0) { - return c; /* Return exact match color */ - } - mindist = dist; - ct = c; - } - } - /* no exact match. We now know closest, but first try to allocate exact */ - if (op == -1) { - op = im->colorsTotal; - if (op == gdMaxColors) { /* No room for more colors */ - return ct; /* Return closest available color */ - } - im->colorsTotal++; - } - im->red [op] = r; - im->green[op] = g; - im->blue [op] = b; - im->open [op] = 0; - return op; /* Return newly allocated color */ -} -#endif /******************************************************************** * gdTcl_UtfToUniChar is borrowed from ... Index: php4/ext/gd/php3_gd.h diff -u php4/ext/gd/php3_gd.h:1.10 php4/ext/gd/php3_gd.h:1.11 --- php4/ext/gd/php3_gd.h:1.10 Sun Oct 17 10:57:49 1999 +++ php4/ext/gd/php3_gd.h Wed Dec 1 17:59:44 1999 @@ -29,7 +29,7 @@ */ -/* $Id: php3_gd.h,v 1.10 1999/10/17 14:57:49 sas Exp $ */ +/* $Id: php3_gd.h,v 1.11 1999/12/01 22:59:44 ssb Exp $ */ #ifndef _PHP3_GD_H #define _PHP3_GD_H @@ -57,7 +57,9 @@ extern PHP_MINIT_FUNCTION(gd); extern PHP_MSHUTDOWN_FUNCTION(gd); +#ifndef HAVE_GDIMAGECOLORRESOLVE extern int gdImageColorResolve(gdImagePtr, int, int, int); +#endif PHP_FUNCTION(imagearc); PHP_FUNCTION(imagechar); PHP_FUNCTION(imagecharup); @@ -102,6 +104,7 @@ PHP_FUNCTION(imagettfbbox); PHP_FUNCTION(imagettftext); #endif +PHPAPI int phpi_get_le_gd(void); #else #define phpext_gd_ptr NULL Index: php4/ext/mysql/php_mysql.c diff -u php4/ext/mysql/php_mysql.c:1.7 php4/ext/mysql/php_mysql.c:1.8 --- php4/ext/mysql/php_mysql.c:1.7 Fri Nov 5 16:43:53 1999 +++ php4/ext/mysql/php_mysql.c Wed Dec 1 17:59:44 1999 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_mysql.c,v 1.7 1999/11/05 21:43:53 rasmus Exp $ */ +/* $Id: php_mysql.c,v 1.8 1999/12/01 22:59:44 ssb Exp $ */ /* TODO: @@ -24,8 +24,12 @@ * ? Safe mode implementation */ -#if COMPILE_DL -#include "dl/phpdl.h" +#ifdef PIC +# define COMPILE_DL 1 +#endif + +#ifdef COMPILE_DL +# include "dl/phpdl.h" #endif #include "php.h" Index: php4/ext/mysql/php_mysql.h diff -u php4/ext/mysql/php_mysql.h:1.2 php4/ext/mysql/php_mysql.h:1.3 --- php4/ext/mysql/php_mysql.h:1.2 Mon Oct 4 11:18:14 1999 +++ php4/ext/mysql/php_mysql.h Wed Dec 1 17:59:44 1999 @@ -17,14 +17,14 @@ */ -/* $Id: php_mysql.h,v 1.2 1999/10/04 15:18:14 sas Exp $ */ +/* $Id: php_mysql.h,v 1.3 1999/12/01 22:59:44 ssb Exp $ */ #ifndef _PHP_MYSQL_H #define _PHP_MYSQL_H -#if COMPILE_DL -#undef HAVE_MYSQL -#define HAVE_MYSQL 1 +#ifdef COMPILE_DL +# undef HAVE_MYSQL +# define HAVE_MYSQL 1 #endif #if WIN32||WINNT Index: php4/ext/standard/php_output.h diff -u php4/ext/standard/php_output.h:1.1 php4/ext/standard/php_output.h:1.2 --- php4/ext/standard/php_output.h:1.1 Wed Oct 27 14:30:41 1999 +++ php4/ext/standard/php_output.h Wed Dec 1 17:59:45 1999 @@ -22,10 +22,10 @@ #include "php.h" -PHPAPI void php_output_startup(); +PHPAPI void php_output_startup(void); PHPAPI int php_body_write(const char *str, uint str_length); PHPAPI int php_header_write(const char *str, uint str_length); -PHPAPI void php_start_ob_buffering(); +PHPAPI void php_start_ob_buffering(void); PHPAPI void php_end_ob_buffering(int send_buffer); extern zend_module_entry output_module_entry; Index: php4/pear/README diff -u php4/pear/README:1.2 php4/pear/README:1.3 --- php4/pear/README:1.2 Mon Nov 29 10:18:01 1999 +++ php4/pear/README Wed Dec 1 17:59:45 1999 @@ -1,5 +1,6 @@ PEAR - PHP Extension and Add-on Repository - ------------------------------------------ + ========================================== + Dedicated to Malin Bakken, born 1999-11-21 WHAT IS PEAR?

« previous php.version4 (#7205) next »