portability enhancements
authorNathan Bryant <loanshark@uncensored.citadel.org>
Sat, 5 Dec 1998 20:59:40 +0000 (20:59 +0000)
committerNathan Bryant <loanshark@uncensored.citadel.org>
Sat, 5 Dec 1998 20:59:40 +0000 (20:59 +0000)
webcit/ChangeLog
webcit/auth.c
webcit/configure.in
webcit/context_loop.c
webcit/mainmenu.c
webcit/roomops.c
webcit/serv_func.c
webcit/tcp_sockets.c
webcit/webcit.c
webcit/webserver.c
webcit/who.c

index ee8fa93ecf6ccb4fd5e6b6cf6496ffe33ada3074..42e90d5586a9ec83b33963d50edeea95f250904b 100644 (file)
@@ -2,6 +2,7 @@
        * tcp_sockets.c: removed some dead code
        * context_loop.c: oops, I made a memory leak. fix fix fix. also close
          unused ends of pipes, fix a file descriptor leak and a race condition
+       * portability enhancements
 
 1998-12-04 Nathan Bryant <bryant@cs.usm.maine.edu>
        * webserver.c, context_loop.c, webcit.c: add commandline args for host
index ebf39b55c219fe72fadce6ceebf2d06932f61e1d..0b9dbc5bd54cff22cd0434fa502343349d3cf673 100644 (file)
@@ -7,7 +7,9 @@
  */
 
 #include <stdlib.h>
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 #include <stdio.h>
 #include <ctype.h>
 #include <string.h>
index 1ce230cd0370772a86cf7c4ccc33391b596ad98b..3b199101d7a34042cdb82d4ce5edca73325051d2 100644 (file)
@@ -25,7 +25,7 @@ fi
 dnl Checks for header files.
 AC_HEADER_STDC
 dnl AC_HEADER_SYS_WAIT
-dnl AC_CHECK_HEADERS(fcntl.h limits.h sys/time.h unistd.h)
+AC_CHECK_HEADERS(fcntl.h limits.h sys/time.h unistd.h)
 
 dnl Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
@@ -34,7 +34,7 @@ AC_TYPE_SIZE_T
 dnl AC_HEADER_TIME
 
 dnl Checks for library functions.
-dnl AC_TYPE_SIGNAL
+AC_TYPE_SIGNAL
 dnl AC_FUNC_VPRINTF
 dnl AC_CHECK_FUNCS(strerror)
 AC_REPLACE_FUNCS(snprintf)
index 97eeff6ebf54fb9bda966aebe8d1675c9eb02204..722775fb3b70438b11c10395c520000864bde702 100644 (file)
 
 #include <ctype.h>
 #include <stdlib.h>
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 #include <stdio.h>
+#ifdef HAVE_FCNTL_H
 #include <fcntl.h>
+#endif
 #include <signal.h>
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <sys/socket.h>
+#ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
+#endif
+#ifdef HAVE_LIMITS_H
 #include <limits.h>
+#endif
 #include <netinet/in.h>
 #include <netdb.h>
 #include <string.h>
index e8628ff3c3d625d939e3140d3199bb2274e7aa7b..e612d42e6ea78b5151e3c31dbf859964743298d2 100644 (file)
@@ -1,7 +1,9 @@
 /* $Id$ */
 
 #include <stdlib.h>
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 #include <stdio.h>
 #include <ctype.h>
 #include <string.h>
index 1ee6258e86659872610dc068d68264fac6afa13c..449e9c6b0be107e3cb6f0a21a3443171e2569802 100644 (file)
@@ -2,7 +2,9 @@
 
 #include <stdlib.h>
 #include <string.h>
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 #include <stdio.h>
 #include <signal.h>
 #include <sys/types.h>
index fa7424f917516a5f691f63b46226de68357a4deb..9c894e03b5b728811ef87648c2e2ad816274d688 100644 (file)
@@ -3,7 +3,9 @@
 #include <ctype.h>
 #include <stdlib.h>
 #include <string.h>
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 #include <stdio.h>
 #include "webcit.h"
 #include "child.h"
index c6c58f236d2d4edb8b17fc37798e523bac2d5971..34781617d6e9fd9b590b4f12c724f92021bc5157 100644 (file)
@@ -7,7 +7,9 @@
  */
 
 #include <stdlib.h>
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 #include <stdio.h>
 #include <signal.h>
 #include <sys/types.h>
@@ -30,7 +32,7 @@ extern int errno;
 int serv_sock;
 
 
-void timeout(int signum) {
+RETSIGTYPE timeout(int signum) {
        printf("\rConnection timed out.\n");
        exit(3);
        }
index bedccdef5850e0df48582adadd554ddb63602dc4..1e80118faa2ebd8838ab24761f21a1699546b1b4 100644 (file)
@@ -9,7 +9,9 @@
  */
 
 #include <stdlib.h>
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 #include <stdio.h>
 #include <ctype.h>
 #include <string.h>
index 834e11a1a93efdb7a87333e20086dc03fe77b164..a4a68e5d43df761346addb3c5d921c3315022330 100644 (file)
 
 #include <ctype.h>
 #include <stdlib.h>
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 #include <stdio.h>
+#ifdef HAVE_FCNTL_H
 #include <fcntl.h>
+#endif
 #include <signal.h>
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <sys/socket.h>
+#ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
+#endif
+#ifdef HAVE_LIMITS_H
 #include <limits.h>
+#endif
 #include <netinet/in.h>
 #include <netdb.h>
 #include <string.h>
index 5f8937b7a1284ecad8deb30aa328bdd840108ab9..c3207f3bdb65edbc2397b744d2f42a0c307a2d88 100644 (file)
@@ -1,7 +1,9 @@
 /* $Id$ */
 
 #include <stdlib.h>
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 #include <stdio.h>
 #include <signal.h>
 #include <sys/types.h>