X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=examples%2Flog-dump.c;h=d5ef8df5a60cba00cef5db37ca04a8231f1fad7d;hb=9207929832b3e12e3dd832cefc99701529fe4ffb;hp=b3d8263f1c5f7c1b050dcd9ee59a1e73684cc4ad;hpb=3293ebdf398168b39921d4aca3a884fa54e40234;p=catagits%2Ffcgi2.git diff --git a/examples/log-dump.c b/examples/log-dump.c index b3d8263..d5ef8df 100644 --- a/examples/log-dump.c +++ b/examples/log-dump.c @@ -1,4 +1,4 @@ -/* +/* * log-dump.c -- * * FastCGI example program to illustrate both an Authorizer and a @@ -14,20 +14,13 @@ * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * */ - #ifndef lint -static const char rcsid[] = "$Id: log-dump.c,v 1.3 1999/07/26 05:33:01 roberts Exp $"; +static const char rcsid[] = "$Id: log-dump.c,v 1.5 2001/09/01 01:12:26 robs Exp $"; #endif /* not lint */ -#if defined HAVE_UNISTD_H || defined __linux__ -#include -#endif -#include -#if defined __linux__ -int kill(pid_t pid, int sig); -#endif +#include "fcgi_config.h" -#include "fcgi_stdio.h" +#include #include #include #include @@ -35,10 +28,16 @@ int kill(pid_t pid, int sig); #include #include -#ifndef NULL -#define NULL 0 +#if defined __linux__ +int kill(pid_t pid, int sig); +#endif + +#ifdef HAVE_UNISTD_H +#include #endif +#include "fcgi_stdio.h" + static int successCount = 0; static int failureCount = 0; @@ -51,7 +50,7 @@ int main(void) int fd, n, i, j; char temp[4096]; char temp2[5000]; - + while(FCGI_Accept() >= 0) { rolePtr = getenv("FCGI_ROLE"); if(rolePtr == NULL) { @@ -135,6 +134,6 @@ int main(void) continue; } } - + exit(0); }