From: roberts Date: Sat, 30 Jan 1999 22:27:31 +0000 (+0000) Subject: Misc. updates to get a clean make on Linux. A bit of X-Git-Tag: 0.67_01~430 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2fd179abeca574b3ef6e903065c9712a35343861;p=catagits%2Ffcgi2.git Misc. updates to get a clean make on Linux. A bit of hack - I didn't bother figuring out autoconf. Modified Files: echo.c echo2.c log-dump.c sample-store.c tclHash.c tiny-fcgi.c tiny-fcgi2.c --- diff --git a/examples/echo.c b/examples/echo.c index e1aa10d..d2b3092 100644 --- a/examples/echo.c +++ b/examples/echo.c @@ -12,9 +12,13 @@ */ #ifndef lint -static const char rcsid[] = "$Id: echo.c,v 1.1 1997/09/16 15:36:28 stanleyg Exp $"; +static const char rcsid[] = "$Id: echo.c,v 1.2 1999/01/30 22:27:31 roberts Exp $"; #endif /* not lint */ +#if defined HAVE_UNISTD_H || __linux__ +#include +#endif + #include "fcgi_stdio.h" #include @@ -24,7 +28,7 @@ static const char rcsid[] = "$Id: echo.c,v 1.1 1997/09/16 15:36:28 stanleyg Exp extern char **environ; #endif -void PrintEnv(char *label, char **envp) +static void PrintEnv(char *label, char **envp) { printf("%s:
\n
\n", label);
     for(; *envp != NULL; envp++) {
diff --git a/examples/echo2.c b/examples/echo2.c
index 950cccc..0cd515d 100644
--- a/examples/echo2.c
+++ b/examples/echo2.c
@@ -12,9 +12,13 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: echo2.c,v 1.1 1997/09/16 15:36:28 stanleyg Exp $";
+static const char rcsid[] = "$Id: echo2.c,v 1.2 1999/01/30 22:27:32 roberts Exp $";
 #endif /* not lint */
 
+#if defined HAVE_UNISTD_H || __linux__
+#include 
+#endif
+
 #include 
 #include 
 #include "fcgiapp.h"
@@ -23,7 +27,7 @@ static const char rcsid[] = "$Id: echo2.c,v 1.1 1997/09/16 15:36:28 stanleyg Exp
 #include 
 #endif
 
-void PrintEnv(FCGX_Stream *out, char *label, char **envp)
+static void PrintEnv(FCGX_Stream *out, char *label, char **envp)
 {
     printf("%s:
\n
\n", label);
     FCGX_FPrintF(out, "%s:
\n
\n", label);
diff --git a/examples/log-dump.c b/examples/log-dump.c
index d2023ad..27c76a8 100644
--- a/examples/log-dump.c
+++ b/examples/log-dump.c
@@ -16,9 +16,17 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: log-dump.c,v 1.1 1997/09/16 15:36:28 stanleyg Exp $";
+static const char rcsid[] = "$Id: log-dump.c,v 1.2 1999/01/30 22:27:33 roberts 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_stdio.h"
 #include 
 #include 
diff --git a/examples/sample-store.c b/examples/sample-store.c
index 64ea60f..301bdb4 100644
--- a/examples/sample-store.c
+++ b/examples/sample-store.c
@@ -46,7 +46,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: sample-store.c,v 1.1 1997/09/16 15:36:28 stanleyg Exp $";
+static const char rcsid[] = "$Id: sample-store.c,v 1.2 1999/01/30 22:27:34 roberts Exp $";
 #endif /* not lint */
 
 #include "fcgi_stdio.h"  /* FCGI_Accept, FCGI_Finish, stdio */
@@ -59,8 +59,12 @@ static const char rcsid[] = "$Id: sample-store.c,v 1.1 1997/09/16 15:36:28 stanl
 #include       /* readdir, closedir, DIR, dirent */
 #include       /* fsync */
 
+#if defined __linux__
+int fsync(int fd);
+#endif
+
 /*
- * sample-store is designed to be configured as follows:
+ * sample-store is designed to be configured as follows (for the OM server):
  *
  * SI_Department SampleStoreDept -EnableAnonymousTicketing 1
  * Region /SampleStore/* { SI_RequireSI SampleStoreDept 1 }
@@ -126,6 +130,10 @@ static const char rcsid[] = "$Id: sample-store.c,v 1.1 1997/09/16 15:36:28 stanl
 
 #define Strlen(str) (((str) == NULL) ? 0 : strlen(str))
 
+void panic(char *format,
+        char *arg1, char *arg2, char *arg3, char *arg4,
+        char *arg5, char *arg6, char *arg7, char *arg8);
+
 static void *Malloc(size_t size);
 static void Free(void *ptr);
 static char *StringNCopy(char *str, int strLen);
@@ -218,7 +226,6 @@ static void Checkpoint(void);
  */
 static void Initialize(void)
 {
-    char *temp;
     ListOfString *fileList;
     int stateDirLen;
     /*
@@ -741,6 +748,7 @@ static int DoAddItemToCart(char *userId, char *item, int writeLog)
             WriteLog(LR_ADD_ITEM, userId, item, TRUE);
 	}
     }
+    return 0;
 }
 
 static void DisplayCart(
@@ -750,7 +758,6 @@ static void DisplayCart(
     CartObj *cart = Tcl_GetHashValue(cartEntry);
     ListOfString *items = cart->items;
     int numberOfItems = ListOfString_Length(items);
-    int i;
 
     DisplayHead("Your shopping cart", parent, "Images/cart-hd.gif");
     DisplayNumberOfItems(numberOfItems, processId);
@@ -801,6 +808,7 @@ static int DoRemoveItemFromCart(char *userId, char *item, int writeLog)
 	    }
         }
     }
+    return 0;
 }
 
 static void Purchase(
@@ -956,7 +964,8 @@ static char *StringCat4(char *str1, char *str2, char *str3, char *str4)
 static char *QueryLookup(char *query, char *name)
 {
     int nameLen = strlen(name);
-    char *queryTail, *nameFirst, *valueFirst, *valueLast, *value;
+    char *queryTail, *nameFirst, *valueFirst, *valueLast;
+
     if(query == NULL) {
         return NULL;
     }
diff --git a/examples/tclHash.c b/examples/tclHash.c
index f13690a..52b526d 100644
--- a/examples/tclHash.c
+++ b/examples/tclHash.c
@@ -40,12 +40,12 @@
  * of the Rights in Technical Data and Computer Software Clause as DFARS
  * 252.227-7013 and FAR 52.227-19.
  *
- * $Id: tclHash.c,v 1.1 1997/09/16 15:36:28 stanleyg Exp $
+ * $Id: tclHash.c,v 1.2 1999/01/30 22:27:35 roberts Exp $
  *
  */
 
 #ifndef lint
-static char sccsid[] = "@(#) tclHash.c 1.14 94/12/17 16:14:17";
+static const char rcsid[] = "$Id: tclHash.c,v 1.2 1999/01/30 22:27:35 roberts Exp $";
 #endif /* not lint */
 
 #include "tclInt.h"
diff --git a/examples/tiny-fcgi.c b/examples/tiny-fcgi.c
index 325c349..15280e4 100644
--- a/examples/tiny-fcgi.c
+++ b/examples/tiny-fcgi.c
@@ -12,12 +12,16 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: tiny-fcgi.c,v 1.1 1997/09/16 15:36:28 stanleyg Exp $";
+static const char rcsid[] = "$Id: tiny-fcgi.c,v 1.2 1999/01/30 22:27:36 roberts Exp $";
 #endif /* not lint */
 
 #include "fcgi_stdio.h"
 #include 
 
+#if defined HAVE_UNISTD_H || defined __linux__
+#include 
+#endif
+
 #ifdef _WIN32
 #include 
 #endif
diff --git a/examples/tiny-fcgi2.c b/examples/tiny-fcgi2.c
index 4b27a9a..33f34af 100644
--- a/examples/tiny-fcgi2.c
+++ b/examples/tiny-fcgi2.c
@@ -12,9 +12,13 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: tiny-fcgi2.c,v 1.1 1997/09/16 15:36:29 stanleyg Exp $";
+static const char rcsid[] = "$Id: tiny-fcgi2.c,v 1.2 1999/01/30 22:27:37 roberts Exp $";
 #endif /* not lint */
 
+#if defined HAVE_UNISTD_H || defined __linux__
+#include 
+#endif
+
 #include "fcgiapp.h"
 
 #ifdef _WIN32