-/*
+/*
* tiny-fcgi.c --
*
* FastCGI example program using fcgi_stdio library
*/
#ifndef lint
-static const char rcsid[] = "$Id: tiny-fcgi.c,v 1.3 1999/07/26 05:32:58 roberts Exp $";
+static const char rcsid[] = "$Id: tiny-fcgi.c,v 1.4 1999/07/28 00:35:28 roberts Exp $";
#endif /* not lint */
-#include "fcgi_stdio.h"
+#include "fcgi_config.h"
+
#include <stdlib.h>
-#if defined HAVE_UNISTD_H || defined __linux__
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <process.h>
#endif
+#include "fcgi_stdio.h"
+
int main(void)
{
int count = 0;
-/*
+/*
* tiny-fcgi2.c --
*
* FastCGI example program using fcgiapp library
*/
#ifndef lint
-static const char rcsid[] = "$Id: tiny-fcgi2.c,v 1.3 1999/07/26 05:32:58 roberts Exp $";
+static const char rcsid[] = "$Id: tiny-fcgi2.c,v 1.4 1999/07/28 00:36:11 roberts Exp $";
#endif /* not lint */
-#if defined HAVE_UNISTD_H || defined __linux__
+#include "fcgi_config.h"
+
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
-#include "fcgiapp.h"
-
#ifdef _WIN32
#include <process.h>
#endif
+#include "fcgiapp.h"
+
int main(void)
{
FCGX_Stream *in, *out, *err;
while (FCGX_Accept(&in, &out, &err, &envp) >= 0) {
FCGX_FPrintF(out,
- "Content-type: text/html\r\n"
- "\r\n"
- "<title>FastCGI Hello! (C, fcgiapp library)</title>"
- "<h1>FastCGI Hello! (C, fcgiapp library)</h1>"
- "Request number %d running on host <i>%s</i> "
- "Process ID: %d\n",
- ++count, FCGX_GetParam("SERVER_NAME", envp), getpid());
+ "Content-type: text/html\r\n"
+ "\r\n"
+ "<title>FastCGI Hello! (C, fcgiapp library)</title>"
+ "<h1>FastCGI Hello! (C, fcgiapp library)</h1>"
+ "Request number %d running on host <i>%s</i> "
+ "Process ID: %d\n",
+ ++count, FCGX_GetParam("SERVER_NAME", envp), getpid());
}
return 0;