cvs: php4 /sapi/thttpd Makefile.in README config.m4 stub.c thttpd_patch

From: Date: Mon, 07 Aug 2000 13:54:35 +0000
Subject: cvs: php4 /sapi/thttpd Makefile.in README config.m4 stub.c thttpd_patch
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-1089@lists.php.net to get a copy of this message
sas Mon Aug 7 06:54:35 2000 EDT Added files: /php4/sapi/thttpd stub.c Modified files: /php4/sapi/thttpd Makefile.in README config.m4 thttpd_patch Log: Fix building thttpd SAPI module. This works now with thttpd 2.19. Thanks to Andrzej Borsuk <andrzej.borsuk@alfaelektro.com.pl> for pointing me into the right direction. Index: php4/sapi/thttpd/Makefile.in diff -u php4/sapi/thttpd/Makefile.in:1.5 php4/sapi/thttpd/Makefile.in:1.6 --- php4/sapi/thttpd/Makefile.in:1.5 Mon May 1 15:38:37 2000 +++ php4/sapi/thttpd/Makefile.in Mon Aug 7 06:54:35 2000 @@ -1,5 +1,5 @@ LTLIBRARY_NAME = libsapi.la -LTLIBRARY_SOURCES = thttpd.c +LTLIBRARY_SOURCES = stub.c include $(top_srcdir)/build/ltlib.mk Index: php4/sapi/thttpd/README diff -u php4/sapi/thttpd/README:1.2 php4/sapi/thttpd/README:1.3 --- php4/sapi/thttpd/README:1.2 Mon Jul 10 03:09:15 2000 +++ php4/sapi/thttpd/README Mon Aug 7 06:54:35 2000 @@ -1,10 +1,10 @@ README FOR THTTPD MODULE (by Sascha Schumann) -($Date: 2000/07/10 10:09:15 $) +($Date: 2000/08/07 13:54:35 $) This is a SAPI module for PHP 4.0 supporting thttpd, the tiny, turbo, throttling HTTP server by Jef Poskanzer. - The module contains a patch against version 2.10 of thttpd. The patch + The module contains a patch against version 2.19 of thttpd. The patch adds hooks to thttpd to call PHP, if a filename matches *.php. This patch will be applied when you install PHP. @@ -20,11 +20,11 @@ 2. PHP 4.0.x - Beta Versions: - http://www.php.net/version4/ + Download: + http://www.php.net/ - Snapshots: - http://va.php.net/~sas/snapshots/ + Snapshots from CVS: + http://snaps.php.net/ BUILD INSTRUCTIONS Index: php4/sapi/thttpd/config.m4 diff -u php4/sapi/thttpd/config.m4:1.2 php4/sapi/thttpd/config.m4:1.3 --- php4/sapi/thttpd/config.m4:1.2 Wed Dec 29 18:59:52 1999 +++ php4/sapi/thttpd/config.m4 Mon Aug 7 06:54:35 2000 @@ -5,6 +5,8 @@ INSTALL_IT="\ echo 'PHP_LIBS = -L. -lphp4 \$(PHP_LIBS) \$(EXTRA_LIBS)' > $THTTPD/php_makefile; \ echo 'PHP_LDFLAGS = \$(NATIVE_RPATHS) \$(PHP_LDFLAGS)' >> $THTTPD/php_makefile; \ + echo 'PHP_CFLAGS = \$(COMMON_FLAGS) \$(CFLAGS) \$(EXTRA_CFLAGS)' >> $THTTPD/php_makefile; \ + \$(LN_S) $abs_srcdir/sapi/thttpd/thttpd.c $THTTPD/php_thttpd.c; \ cp $abs_srcdir/sapi/thttpd/php_thttpd.h $SAPI_STATIC $THTTPD;\ test -f $THTTPD/php_patched || \ (cd $THTTPD && patch < $abs_srcdir/sapi/thttpd/thttpd_patch && touch php_patched)" Index: php4/sapi/thttpd/thttpd_patch diff -u php4/sapi/thttpd/thttpd_patch:1.1 php4/sapi/thttpd/thttpd_patch:1.2 --- php4/sapi/thttpd/thttpd_patch:1.1 Sun Dec 19 23:11:14 1999 +++ php4/sapi/thttpd/thttpd_patch Mon Aug 7 06:54:35 2000 @@ -1,6 +1,6 @@ -diff -ur thttpd-2.10/Makefile.in thttpd-2.10-php/Makefile.in ---- thttpd-2.10/Makefile.in Mon Oct 11 20:45:38 1999 -+++ thttpd-2.10-php/Makefile.in Mon Dec 20 01:37:49 1999 +diff -ur thttpd-2.19/Makefile.in thttpd-2.19-t/Makefile.in +--- thttpd-2.19/Makefile.in Tue Jul 4 18:21:32 2000 ++++ thttpd-2.19-t/Makefile.in Mon Aug 7 15:34:41 2000 @@ -46,13 +46,15 @@ # You shouldn't need to edit anything below here. @@ -19,9 +19,31 @@ NETLIBS = @V_NETLIBS@ INSTALL = @INSTALL@ -diff -ur thttpd-2.10/libhttpd.c thttpd-2.10-php/libhttpd.c ---- thttpd-2.10/libhttpd.c Wed Dec 15 23:22:50 1999 -+++ thttpd-2.10-php/libhttpd.c Mon Dec 20 01:05:47 1999 +@@ -62,7 +64,7 @@ + @rm -f $@ + $(CC) $(CFLAGS) -c $*.c + +-SRC = thttpd.c libhttpd.c fdwatch.c mmc.c timers.c match.c tdate_parse.c syslog.c ++SRC = thttpd.c libhttpd.c fdwatch.c mmc.c timers.c match.c tdate_parse.c syslog.c php_thttpd.c + + OBJ = $(SRC:.c=.o) @LIBOBJS@ + +@@ -151,6 +153,9 @@ + + tags: + ctags -wtd *.c *.h ++ ++php_thttpd.o: php_thttpd.c ++ $(CC) $(PHP_CFLAGS) $(CFLAGS) -c php_thttpd.c + + tar: + @name=sed -n -e '/SERVER_SOFTWARE/!d' -e 's,.*thttpd/,thttpd-,' -e 's, .*,,p' version.h ; \ +Only in thttpd-2.19-t/cgi-src: Makefile +Only in thttpd-2.19-t/: config.log +Only in thttpd-2.19-t/extras: Makefile +diff -ur thttpd-2.19/libhttpd.c thttpd-2.19-t/libhttpd.c +--- thttpd-2.19/libhttpd.c Fri Jun 23 05:43:40 2000 ++++ thttpd-2.19-t/libhttpd.c Mon Aug 7 15:27:25 2000 @@ -75,6 +75,8 @@ #include "match.h" #include "tdate_parse.h" @@ -31,36 +53,41 @@ #ifndef STDIN_FILENO #define STDIN_FILENO 0 #endif -@@ -211,7 +213,11 @@ +@@ -224,6 +226,8 @@ free( (void*) hs->cwd ); if ( hs->cgi_pattern != (char*) 0 ) free( (void*) hs->cgi_pattern ); + if ( hs->php_pattern != (char*) 0 ) -+ free( (void *) hs->php_pattern ); ++ free( (void*) hs->php_pattern ); + if ( hs->charset != (char*) 0 ) + free( (void*) hs->charset ); + if ( hs->url_pattern != (char*) 0 ) +@@ -231,6 +235,7 @@ + if ( hs->local_pattern != (char*) 0 ) + free( (void*) hs->local_pattern ); free( (void*) hs ); -+ + thttpd_php_shutdown(); } -@@ -244,6 +250,7 @@ - else - hs->hostname = strdup( hostname ); +@@ -291,6 +296,7 @@ + } + hs->port = port; + hs->php_pattern = strdup("*.php"); if ( cgi_pattern == (char*) 0 ) hs->cgi_pattern = (char*) 0; else -@@ -272,6 +279,8 @@ - hs->no_symlinks = no_symlinks; - hs->vhost = vhost; +@@ -379,6 +385,8 @@ + int listen_fd; + int on, flags; + thttpd_php_init(); + /* Create socket. */ - hs->listen_fd = socket( AF_INET, SOCK_STREAM, 0 ); - if ( hs->listen_fd < 0 ) -@@ -3129,6 +3138,11 @@ + listen_fd = socket( saP->sa.sa_family, SOCK_STREAM, 0 ); + if ( listen_fd < 0 ) +@@ -3302,6 +3310,11 @@ ( hc->sb.st_mode & S_IXOTH ) && match( hc->hs->cgi_pattern, hc->expnfilename ) ) return cgi( hc ); @@ -72,14 +99,14 @@ /* It's not CGI. If it's executable or there's pathinfo, someone's ** trying to either serve or run a non-CGI file as CGI. Either case -diff -ur thttpd-2.10/libhttpd.h thttpd-2.10-php/libhttpd.h ---- thttpd-2.10/libhttpd.h Wed Dec 8 19:53:34 1999 -+++ thttpd-2.10-php/libhttpd.h Mon Dec 20 01:06:09 1999 -@@ -57,6 +57,7 @@ - struct in_addr host_addr; +diff -ur thttpd-2.19/libhttpd.h thttpd-2.19-t/libhttpd.h +--- thttpd-2.19/libhttpd.h Tue Jun 13 20:48:56 2000 ++++ thttpd-2.19-t/libhttpd.h Mon Aug 7 15:33:08 2000 +@@ -69,6 +69,7 @@ + char* server_hostname; int port; char* cgi_pattern; + char* php_pattern; + char* charset; char* cwd; - int listen_fd; - FILE* logfp; + int listen4_fd, listen6_fd; Index: php4/sapi/thttpd/stub.c +++ php4/sapi/thttpd/stub.c

« previous php.cvs (#1089) next »