shane           Tue Nov 26 00:51:16 2002 EDT

  Added files:                 
    /php4/sapi/cgi/libfcgi/include      fcgi_config_win32.h 

  Modified files:              
    /php4       configure.in 
    /php4/sapi/cgi      README.FastCGI cgi_main.c config9.m4 
    /php4/sapi/cgi/libfcgi      fcgiapp.c os_unix.c 
    /php4/sapi/cgi/libfcgi/include      fcgi_config.h fcgios.h 
  Log:
  configure now supports building the cgi-fcgi module
  configure --enable-fastcgi
  
  
Index: php4/configure.in
diff -u php4/configure.in:1.401 php4/configure.in:1.402
--- php4/configure.in:1.401     Fri Nov 15 10:35:11 2002
+++ php4/configure.in   Tue Nov 26 00:51:15 2002
@@ -1,4 +1,4 @@
-dnl ## $Id: configure.in,v 1.401 2002/11/15 15:35:11 helly Exp $ -*- sh -*-
+dnl ## $Id: configure.in,v 1.402 2002/11/26 05:51:15 shane Exp $ -*- sh -*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -242,6 +242,11 @@
   PTHREADS_FLAGS
 fi
 
+if test "$PHP_ENABLE_FASTCGI" = "yes"; then
+  PHP_CONFIGURE_PART(Running FastCGI checks)
+  sinclude(sapi/cgi/libfcgi/acinclude.m4)
+  sinclude(sapi/cgi/libfcgi/libfcgi.m4)
+fi
 
 divert(3)
 
Index: php4/sapi/cgi/README.FastCGI
diff -u php4/sapi/cgi/README.FastCGI:1.1 php4/sapi/cgi/README.FastCGI:1.2
--- php4/sapi/cgi/README.FastCGI:1.1    Sun Oct 13 05:40:44 2002
+++ php4/sapi/cgi/README.FastCGI        Tue Nov 26 00:51:15 2002
@@ -1,6 +1,13 @@
 Credits:
 Ben Mansell, Stephen Landamore, Daniel Silverstone, Shane Caraveo
 
+Building PHP
+------------
+
+You must add '--enable-fastcgi' to the configure command on Linux or
+OSX based systems to get fastcgi support in the php-cgi binary.  You
+also must not use '--enable-discard-path'.
+
 Running the FastCGI PHP module
 ------------------------------
 
@@ -58,7 +65,8 @@
 Now, we'll create a fcgi-bin directory, just like you would do with normal
 CGI scripts. You'll need to create a directory somewhere to store your
 FastCGI binaries. We'll use /space/fcgi-bin/ for this example. Remember to
-copy the FastCGI-PHP binary in there. (named just 'php')
+copy the FastCGI-PHP binary in there. (named 'php-cgi')  This sets up
+php to run under mod_fastcgi as a dynamic server.
 
     ScriptAlias /fcgi-bin/ /space/fcgi-bin/
     <Location /fcgi-bin/>
@@ -66,14 +74,17 @@
         SetHandler fastcgi-script
     </Location>
 
-To have mod_fastcgi manage your php fastcgi processes for you, use the 
-configuration directive FCGIServer (see mod_fastcgi docs for more
-configuration information):
-
-    FastCgiServer /fcgi-bin/php-cgi -processes 5
-
-Next, we need to tell Apache to use the FastCGI binary /fcgi-bin/php to
-deliver PHP pages. All that is needed is:
+To setup a specific static configuration for php, you have to use
+the FastCgiServer configuration for mod_fastcgi.  For this, do not
+use the above configuration, but rather the following.
+(see mod_fastcgi docs for more configuration information):
+
+    Alias /fcgi-bin/ /space/fcgi-bin/
+    FastCgiServer /path/to/php-cgi -processes 5
+
+For either of the above configurations,  we need to tell Apache to 
+use the FastCGI binary /fcgi-bin/php to deliver PHP pages. 
+All that is needed is:
 
     AddType application/x-httpd-fastphp .php
     Action application/x-httpd-fastphp /fcgi-bin/php-cgi
Index: php4/sapi/cgi/cgi_main.c
diff -u php4/sapi/cgi/cgi_main.c:1.196 php4/sapi/cgi/cgi_main.c:1.197
--- php4/sapi/cgi/cgi_main.c:1.196      Fri Nov 22 10:47:39 2002
+++ php4/sapi/cgi/cgi_main.c    Tue Nov 26 00:51:15 2002
@@ -76,12 +76,16 @@
 
 #include "php_getopt.h"
 
-#ifdef PHP_FASTCGI
+#if PHP_FASTCGI
 #include "fcgi_config.h"
 #include "fcgiapp.h"
 /* don't want to include fcgios.h, causes conflicts */
 #ifdef PHP_WIN32
 extern int OS_SetImpersonate(void);
+#else
+/* XXX this will need to change later when threaded fastcgi is 
+   implemented.  shane */
+struct sigaction act, old_term, old_quit, old_int;
 #endif
 
 static void (*php_php_import_environment_variables)(zval *array_ptr TSRMLS_DC);
@@ -179,7 +183,7 @@
        size_t ret;
 #endif
 
-#ifdef PHP_FASTCGI
+#if PHP_FASTCGI
        if (!FCGX_IsCGI()) {
                FCGX_Request *request = (FCGX_Request *)SG(server_context);
                long ret = FCGX_PutStr( str, str_length, request->out );
@@ -221,7 +225,7 @@
 
 static void sapi_cgibin_flush(void *server_context)
 {
-#ifdef PHP_FASTCGI
+#if PHP_FASTCGI
        if (!FCGX_IsCGI()) {
                FCGX_Request *request = (FCGX_Request *)server_context;
                if(!request || FCGX_FFlush( request->out ) == -1 ) {
@@ -295,13 +299,13 @@
 static int sapi_cgi_read_post(char *buffer, uint count_bytes TSRMLS_DC)
 {
        uint read_bytes=0, tmp_read_bytes;
-#ifdef PHP_FASTCGI
+#if PHP_FASTCGI
        char *pos = buffer;
 #endif
 
        count_bytes = MIN(count_bytes, 
(uint)SG(request_info).content_length-SG(read_post_bytes));
        while (read_bytes < count_bytes) {
-#ifdef PHP_FASTCGI
+#if PHP_FASTCGI
                if (!FCGX_IsCGI()) {
                        FCGX_Request *request = (FCGX_Request *)SG(server_context);
                        tmp_read_bytes = FCGX_GetStr( pos, count_bytes-read_bytes, 
request->in );
@@ -320,7 +324,7 @@
 
 static char *sapi_cgibin_getenv(char *name, size_t name_len TSRMLS_DC)
 {
-#ifdef PHP_FASTCGI
+#if PHP_FASTCGI
        /* when php is started by mod_fastcgi, no regular environment
           is provided to PHP.  It is always sent to PHP at the start
           of a request.  So we have to do our own lookup to get env
@@ -329,7 +333,7 @@
                int cgi_env_size = 0;
                FCGX_Request *request = (FCGX_Request *)SG(server_context);
                while( request->envp[ cgi_env_size ] ) { 
-                       if (strnicmp(name,request->envp[cgi_env_size],name_len) == 0) {
+                       if (strncasecmp(name,request->envp[cgi_env_size],name_len) == 
+0) {
                                return (request->envp[cgi_env_size])+name_len+1;
                        }
                        cgi_env_size++; 
@@ -346,7 +350,7 @@
        return sapi_cgibin_getenv((char *)"HTTP_COOKIE",strlen("HTTP_COOKIE") 
TSRMLS_CC);
 }
 
-#ifdef PHP_FASTCGI
+#if PHP_FASTCGI
 void cgi_php_import_environment_variables(zval *array_ptr TSRMLS_DC)
 {
        if (!FCGX_IsCGI()) {
@@ -410,7 +414,7 @@
 /* {{{ sapi_module_struct cgi_sapi_module
  */
 static sapi_module_struct cgi_sapi_module = {
-#ifdef PHP_FASTCGI
+#if PHP_FASTCGI
        "cgi-fcgi",                                             /* name */
        "CGI/FastCGI",                                  /* pretty name */
 #else
@@ -464,7 +468,7 @@
        php_printf("Usage: %s [-q] [-h] [-s [-v] [-i] [-f <file>] \n"
                           "       %s <file> [args...]\n"
                           "  -a               Run interactively\n"
-#ifdef PHP_FASTCGI
+#if PHP_FASTCGI
                           "  -b <address:port>|<port> Bind Path for external FASTCGI 
Server mode\n"
 #endif
                           "  -C               Do not chdir to the script's 
directory\n"
@@ -581,6 +585,29 @@
        efree(*arg);
 }
 
+#if PHP_FASTCGI
+/**
+ * Clean up child processes upon exit
+ */
+void fastcgi_cleanup(int signal)
+{
+
+#ifdef DEBUG_FASTCGI
+       fprintf( stderr, "FastCGI shutdown, pid %d\n", getpid() );
+#endif
+
+#ifndef PHP_WIN32
+       sigaction( SIGTERM, &old_term, 0 );
+
+       /* Kill all the processes in our process group */
+       kill( -pgroup, SIGTERM );
+#endif
+
+       /* We should exit at this point, but MacOSX doesn't seem to */
+       exit( 0 );
+}
+#endif
+
 /* {{{ main
  */
 int main(int argc, char *argv[])
@@ -614,7 +641,7 @@
        void ***tsrm_ls;
 #endif
 
-#ifdef PHP_FASTCGI
+#if PHP_FASTCGI
        int max_requests = 500;
        int requests = 0;
        int fastcgi = !FCGX_IsCGI();
@@ -623,6 +650,8 @@
        FCGX_Request request;
 #ifdef PHP_WIN32
        int impersonate = 0;
+#else
+    int status = 0;
 #endif
 #endif /* PHP_FASTCGI */
 
@@ -651,7 +680,7 @@
        setmode(_fileno(stderr), O_BINARY);             /* make the stdio mode be 
binary */
 #endif
 
-#ifdef PHP_FASTCGI
+#if PHP_FASTCGI
        if (!fastcgi) {
 #endif
        /* Make sure we detect we are a cgi - a bit redundancy here,
@@ -667,12 +696,12 @@
                        argv0 = NULL;
                }
        }
-#ifdef PHP_FASTCGI
+#if PHP_FASTCGI
        }
 #endif
 
        if (!cgi
-#ifdef PHP_FASTCGI
+#if PHP_FASTCGI
                /* allow ini override for fastcgi */
 #endif
                ) {
@@ -691,7 +720,7 @@
                ap_php_optarg = orig_optarg;
        }
 
-#ifdef PHP_FASTCGI
+#if PHP_FASTCGI
        if (!cgi && !fastcgi) {
                /* if we're started on command line, check to see if
                   we are being started as an 'external' fastcgi
@@ -768,7 +797,7 @@
        }
 #endif                                                 /* FORCE_CGI_REDIRECT */
 
-#ifdef PHP_FASTCGI
+#if PHP_FASTCGI
        if (bindpath) {
                /* Pass on the arg to the FastCGI library, with one exception.
                 * If just a port is specified, then we prepend a ':' onto the
@@ -891,7 +920,7 @@
 
        zend_first_try {
                if (!cgi
-#ifdef PHP_FASTCGI
+#if PHP_FASTCGI
                        && !fastcgi
 #endif
                        ) {
@@ -912,7 +941,7 @@
                        ap_php_optarg = orig_optarg;
                }
 
-#ifdef PHP_FASTCGI
+#if PHP_FASTCGI
                /* start of FAST CGI loop */
                /* Initialise FastCGI request structure */
 
@@ -931,7 +960,7 @@
                        || FCGX_Accept_r( &request ) >= 0) {
 #endif
 
-#ifdef PHP_FASTCGI
+#if PHP_FASTCGI
                SG(server_context) = (void *) &request;
 #else
                SG(server_context) = (void *) 1; /* avoid server_context==NULL checks 
*/
@@ -943,7 +972,7 @@
                zend_llist_init(&global_vars, sizeof(char *), NULL, 0);
 
                if (!cgi
-#ifdef PHP_FASTCGI
+#if PHP_FASTCGI
                        && !fastcgi
 #endif
                        ) { /* never execute the arguments if you are a CGI */  
@@ -1083,7 +1112,7 @@
                CG(interactive) = interactive;
 
                if (!cgi
-#ifdef PHP_FASTCGI
+#if PHP_FASTCGI
                        && !fastcgi
 #endif
                        ) {
@@ -1122,11 +1151,12 @@
                        php_module_shutdown(TSRMLS_C);
                        return FAILURE;
                }
+
                if (no_headers) {
                        SG(headers_sent) = 1;
                        SG(request_info).no_headers = 1;
                }
-#ifdef PHP_FASTCGI
+#if PHP_FASTCGI
                if (fastcgi) {
                        file_handle.type = ZEND_HANDLE_FILENAME;
                        file_handle.filename = SG(request_info).path_translated;
@@ -1135,7 +1165,7 @@
                        file_handle.filename = "-";
                        file_handle.type = ZEND_HANDLE_FP;
                        file_handle.handle.fp = stdin;
-#ifdef PHP_FASTCGI
+#if PHP_FASTCGI
                }
 #endif
                file_handle.opened_path = NULL;
@@ -1146,7 +1176,7 @@
                zend_llist_destroy(&global_vars);
 
                if (!cgi
-#ifdef PHP_FASTCGI
+#if PHP_FASTCGI
                        && !fastcgi
 #endif
                        ) {
@@ -1166,6 +1196,7 @@
 #else
                        env_path_translated = 
sapi_cgibin_getenv("PATH_TRANSLATED",strlen("PATH_TRANSLATED") TSRMLS_CC);
 #endif
+
                        if(env_path_translated) {
 #ifdef __riscos__
                                /* Convert path to unix format*/
@@ -1266,7 +1297,7 @@
                        }
                }
 
-#ifdef PHP_FASTCGI
+#if PHP_FASTCGI
                        if (!fastcgi) break;
                        /* only fastcgi will get here */
                        requests++;
Index: php4/sapi/cgi/config9.m4
diff -u php4/sapi/cgi/config9.m4:1.1 php4/sapi/cgi/config9.m4:1.2
--- php4/sapi/cgi/config9.m4:1.1        Sun Oct 20 23:12:27 2002
+++ php4/sapi/cgi/config9.m4    Tue Nov 26 00:51:15 2002
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config9.m4,v 1.1 2002/10/21 03:12:27 sniper Exp $
+dnl $Id: config9.m4,v 1.2 2002/11/26 05:51:15 shane Exp $
 dnl
 
 AC_ARG_ENABLE(cgi,
@@ -32,6 +32,14 @@
   PHP_DISCARD_PATH=no
 ])
 
+AC_ARG_ENABLE(fastcgi,
+[  --enable-fastcgi        If this is enabled, the cgi module will
+                          be built with support for fastcgi also.],
+[
+  PHP_ENABLE_FASTCGI=$enableval
+],[
+  PHP_ENABLE_FASTCGI=no
+])
 
 AC_DEFUN(PHP_TEST_WRITE_STDOUT,[
   AC_CACHE_CHECK(whether writing to stdout works,ac_cv_write_stdout,[
@@ -93,9 +101,29 @@
     AC_DEFINE_UNQUOTED(DISCARD_PATH, $DISCARD_PATH, [ ])
     AC_MSG_RESULT($PHP_DISCARD_PATH)
 
+    AC_MSG_CHECKING(whether to enable fastcgi support)
+    PHP_LIBFCGI_DIR="$abs_srcdir/sapi/cgi/libfcgi"
+    if test -z $PHP_LIBFCGI_DIR; then
+      echo "$PHP_LIBFCGI_DIR does not exist"
+      exit 1
+    fi
+    if test "$PHP_ENABLE_FASTCGI" = "yes"; then
+      PHP_FASTCGI=1
+      PHP_FCGI_FILES="libfcgi/fcgi_stdio.c libfcgi/fcgiapp.c libfcgi/os_unix.c"
+      PHP_FCGI_INCLUDE="$PHP_LIBFCGI_DIR/include"
+      PHP_FCGI_STATIC=1
+    else
+      PHP_FASTCGI=0
+      PHP_FCGI_FILES=""
+      PHP_FCGI_INCLUDE=""
+      PHP_FCGI_STATIC=0
+    fi
+    AC_DEFINE_UNQUOTED(PHP_FASTCGI, $PHP_FASTCGI, [ ])
+    AC_DEFINE_UNQUOTED(PHP_FCGI_STATIC, $PHP_FCGI_STATIC, [ ])
+    AC_MSG_RESULT($PHP_ENABLE_FASTCGI)
 
     INSTALL_IT="\$(INSTALL) -m 0755 \$(SAPI_CGI_PATH) 
\$(INSTALL_ROOT)\$(bindir)/php-cgi"
-    PHP_SELECT_SAPI(cgi, program, cgi_main.c getopt.c,,'$(SAPI_CGI_PATH)')
+    PHP_SELECT_SAPI(cgi, program, $PHP_FCGI_FILES cgi_main.c getopt.c, 
+-I$PHP_FCGI_INCLUDE,'$(SAPI_CGI_PATH)')
 
     case $host_alias in
       *darwin*)
Index: php4/sapi/cgi/libfcgi/fcgiapp.c
diff -u php4/sapi/cgi/libfcgi/fcgiapp.c:1.1 php4/sapi/cgi/libfcgi/fcgiapp.c:1.2
--- php4/sapi/cgi/libfcgi/fcgiapp.c:1.1 Sun Mar 10 16:39:28 2002
+++ php4/sapi/cgi/libfcgi/fcgiapp.c     Tue Nov 26 00:51:15 2002
@@ -11,7 +11,7 @@
  *
  */
 #ifndef lint
-static const char rcsid[] = "$Id: fcgiapp.c,v 1.1 2002/03/10 21:39:28 shane Exp $";
+static const char rcsid[] = "$Id: fcgiapp.c,v 1.2 2002/11/26 05:51:15 shane Exp $";
 #endif /* not lint */
 
 #include <assert.h>
@@ -70,7 +70,7 @@
 static int isFastCGI = -1;
 static char *webServerAddressList = NULL;
 static FCGX_Request the_request;
-void _FCGX_FreeStream(FCGX_Stream **streamPtr, BOOL freeData);
+void _FCGX_FreeStream(FCGX_Stream **streamPtr, int freeData);
 
 void FCGX_ShutdownPending(void)
 {
@@ -1814,7 +1814,7 @@
        _FCGX_FreeStream(streamPtr, TRUE);
 }
 
-void _FCGX_FreeStream(FCGX_Stream **streamPtr, BOOL freeData)
+void _FCGX_FreeStream(FCGX_Stream **streamPtr, int freeData)
 {
     FCGX_Stream *stream = *streamPtr;
     FCGX_Stream_Data *data;
Index: php4/sapi/cgi/libfcgi/os_unix.c
diff -u php4/sapi/cgi/libfcgi/os_unix.c:1.2 php4/sapi/cgi/libfcgi/os_unix.c:1.3
--- php4/sapi/cgi/libfcgi/os_unix.c:1.2 Sun Oct 13 04:34:27 2002
+++ php4/sapi/cgi/libfcgi/os_unix.c     Tue Nov 26 00:51:16 2002
@@ -17,7 +17,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: os_unix.c,v 1.2 2002/10/13 08:34:27 shane Exp $";
+static const char rcsid[] = "$Id: os_unix.c,v 1.3 2002/11/26 05:51:16 shane Exp $";
 #endif /* not lint */
 
 #include "fcgi_config.h"
@@ -498,7 +498,7 @@
  *
  *----------------------------------------------------------------------
  */
-int OS_SpawnChild(char *appPath, int listenFd, PROCESS_INFORMATION *pInfo, char *env)
+int OS_SpawnChild(char *appPath, int listenFd)
 {
     int forkResult;
 
Index: php4/sapi/cgi/libfcgi/include/fcgi_config.h
diff -u php4/sapi/cgi/libfcgi/include/fcgi_config.h:1.1 
php4/sapi/cgi/libfcgi/include/fcgi_config.h:1.2
--- php4/sapi/cgi/libfcgi/include/fcgi_config.h:1.1     Sun Mar 10 16:39:28 2002
+++ php4/sapi/cgi/libfcgi/include/fcgi_config.h Tue Nov 26 00:51:16 2002
@@ -1,111 +1,7 @@
-/* fcgi_config.h.  Generated automatically by configure.  */
-/* fcgi_config.h.in.  Generated automatically from configure.in by autoheader.  */
+/* hack workaround for libfcgi configure */
+#ifdef _WIN32
+#include "fcgi_config_win32.h"
+#else
+#include "main/php_config.h"
+#endif
 
-/* Define if you have the <arpa/inet.h> header file. */
-#define HAVE_ARPA_INET_H 1
-
-/* Define if you have the <dlfcn.h> header file. */
-#define HAVE_DLFCN_H 1
-
-/* Define if there's a fileno() prototype in stdio.h */
-#define HAVE_FILENO_PROTO 1
-
-/* Define if the fpos_t typedef is in stdio.h */
-#define HAVE_FPOS 1
-
-/* Define if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define if you have the `dnet_stub' library (-ldnet_stub). */
-/* #undef HAVE_LIBDNET_STUB */
-
-/* Define if you have the `ieee' library (-lieee). */
-/* #undef HAVE_LIBIEEE */
-
-/* Define if you have the `nsl' library (-lnsl). */
-#define HAVE_LIBNSL 1
-
-/* Define if you have the pthread library */
-#define HAVE_LIBPTHREAD 1
-
-/* Define if you have the `resolv' library (-lresolv). */
-#define HAVE_LIBRESOLV 1
-
-/* Define if you have the `socket' library (-lsocket). */
-#define HAVE_LIBSOCKET 1
-
-/* Define if you have the <limits.h> header file. */
-#define HAVE_LIMITS_H 1
-
-/* Define if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* Define if you have the <netdb.h> header file. */
-/* #define HAVE_NETDB_H 1 */
-
-/* Define if you have the <netinet/in.h> header file. */
-#define HAVE_NETINET_IN_H 1
-
-/* Define if sockaddr_un in sys/un.h contains a sun_len component */
-/* #undef HAVE_SOCKADDR_UN_SUN_LEN */
-
-/* Define if the socklen_t typedef is in sys/socket.h */
-/* #undef HAVE_SOCKLEN */
-
-/* Define if you have the <stdint.h> header file. */
-/* #undef HAVE_STDINT_H */
-
-/* Define if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define if you have the `strerror' function. */
-#define HAVE_STRERROR 1
-
-/* Define if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define if you have the <sys/param.h> header file. */
-/* #define HAVE_SYS_PARAM_H 1 */
-
-/* Define if you have the <sys/socket.h> header file. */
-/*#define HAVE_SYS_SOCKET_H 1*/
-
-/* Define if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define if you have the <sys/time.h> header file. */
-/*#define HAVE_SYS_TIME_H 1*/
-
-/* Define if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define if you have the <unistd.h> header file. */
-/*#define HAVE_UNISTD_H 1*/
-
-/* Define if va_arg(arg, long double) crashes the compiler */
-/* #undef HAVE_VA_ARG_LONG_DOUBLE_BUG */
-
-/* Name of package */
-#define PACKAGE "fcgi"
-
-/* Define if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Define if cross-process locking is required by accept() */
-#define USE_LOCKING 1
-
-/* Version number of package */
-#define VERSION "2.2.2"
-
-/* Define to empty if `const' does not conform to ANSI C. */
-/* #undef const */
-
-/* Define as `__inline' if that's what the C compiler calls it, or to nothing
-   if it is not supported. */
-/* #undef inline */
-
-/* Define to `int' if <sys/types.h> does not define. */
-#define ssize_t int
\ No newline at end of file
Index: php4/sapi/cgi/libfcgi/include/fcgios.h
diff -u php4/sapi/cgi/libfcgi/include/fcgios.h:1.2 
php4/sapi/cgi/libfcgi/include/fcgios.h:1.3
--- php4/sapi/cgi/libfcgi/include/fcgios.h:1.2  Sun Mar 17 23:48:34 2002
+++ php4/sapi/cgi/libfcgi/include/fcgios.h      Tue Nov 26 00:51:16 2002
@@ -108,7 +108,11 @@
 DLLAPI int OS_FcgiConnect(char *bindPath);
 DLLAPI int OS_Read(int fd, char * buf, size_t len);
 DLLAPI int OS_Write(int fd, char * buf, size_t len);
+#ifdef _WIN32
 DLLAPI int OS_SpawnChild(char *execPath, int listenFd, PROCESS_INFORMATION *pInfo, 
char *env);
+#else
+DLLAPI int OS_SpawnChild(char *execPath, int listenfd);
+#endif
 DLLAPI int OS_AsyncReadStdin(void *buf, int len, OS_AsyncProc procPtr,
                       ClientData clientData);
 DLLAPI int OS_AsyncRead(int fd, int offset, void *buf, int len,

Index: php4/sapi/cgi/libfcgi/include/fcgi_config_win32.h
+++ php4/sapi/cgi/libfcgi/include/fcgi_config_win32.h
/* fcgi_config.h.  Generated automatically by configure.  */
/* fcgi_config.h.in.  Generated automatically from configure.in by autoheader.  */

/* Define if you have the <arpa/inet.h> header file. */
#define HAVE_ARPA_INET_H 1

/* Define if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1

/* Define if there's a fileno() prototype in stdio.h */
#define HAVE_FILENO_PROTO 1

/* Define if the fpos_t typedef is in stdio.h */
#define HAVE_FPOS 1

/* Define if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1

/* Define if you have the `dnet_stub' library (-ldnet_stub). */
/* #undef HAVE_LIBDNET_STUB */

/* Define if you have the `ieee' library (-lieee). */
/* #undef HAVE_LIBIEEE */

/* Define if you have the `nsl' library (-lnsl). */
#define HAVE_LIBNSL 1

/* Define if you have the pthread library */
#define HAVE_LIBPTHREAD 1

/* Define if you have the `resolv' library (-lresolv). */
#define HAVE_LIBRESOLV 1

/* Define if you have the `socket' library (-lsocket). */
#define HAVE_LIBSOCKET 1

/* Define if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1

/* Define if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1

/* Define if you have the <netdb.h> header file. */
/* #define HAVE_NETDB_H 1 */

/* Define if you have the <netinet/in.h> header file. */
#define HAVE_NETINET_IN_H 1

/* Define if sockaddr_un in sys/un.h contains a sun_len component */
/* #undef HAVE_SOCKADDR_UN_SUN_LEN */

/* Define if the socklen_t typedef is in sys/socket.h */
/* #undef HAVE_SOCKLEN */

/* Define if you have the <stdint.h> header file. */
/* #undef HAVE_STDINT_H */

/* Define if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1

/* Define if you have the `strerror' function. */
#define HAVE_STRERROR 1

/* Define if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1

/* Define if you have the <string.h> header file. */
#define HAVE_STRING_H 1

/* Define if you have the <sys/param.h> header file. */
/* #define HAVE_SYS_PARAM_H 1 */

/* Define if you have the <sys/socket.h> header file. */
/*#define HAVE_SYS_SOCKET_H 1*/

/* Define if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1

/* Define if you have the <sys/time.h> header file. */
/*#define HAVE_SYS_TIME_H 1*/

/* Define if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1

/* Define if you have the <unistd.h> header file. */
/*#define HAVE_UNISTD_H 1*/

/* Define if va_arg(arg, long double) crashes the compiler */
/* #undef HAVE_VA_ARG_LONG_DOUBLE_BUG */

/* Name of package */
#define PACKAGE "fcgi"

/* Define if you have the ANSI C header files. */
#define STDC_HEADERS 1

/* Define if cross-process locking is required by accept() */
#define USE_LOCKING 1

/* Version number of package */
#define VERSION "2.2.2"

/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */

/* Define as `__inline' if that's what the C compiler calls it, or to nothing
   if it is not supported. */
/* #undef inline */

/* Define to `int' if <sys/types.h> does not define. */
#define ssize_t int
-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to