* Header file adjustments to make it work on FreeBSD
authorArt Cancro <ajc@citadel.org>
Mon, 27 Jun 2005 22:15:38 +0000 (22:15 +0000)
committerArt Cancro <ajc@citadel.org>
Mon, 27 Jun 2005 22:15:38 +0000 (22:15 +0000)
webcit/ChangeLog
webcit/ical_dezonify.c
webcit/mime_parser.c
webcit/notes.c
webcit/setup.c
webcit/tools.c
webcit/userlist.c
webcit/vcard.c

index 3eb99b0860bcd9689f9fb6e099d7fca0ca0578d0..86eb8899afcdb79120639a7442c796ed1d4a7d84 100644 (file)
@@ -1,4 +1,7 @@
 $Log$
+Revision 619.14  2005/06/27 22:15:38  ajc
+* Header file adjustments to make it work on FreeBSD
+
 Revision 619.13  2005/06/27 17:38:06  ajc
 * HTML pages are now output as "Content-type: text/html; charset=utf-8"
   UTF-8 is going to be the standard character set for the Citadel system.
@@ -2658,4 +2661,3 @@ Sun Dec  6 19:50:55 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
 
 1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
        * webserver.c: warning fix
-
index 169e0f377ab0d4a07869c98bceba284ba38964c8..0748bc91766b73786170d0bc44c22af50db96c40 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>
-#include <stdio.h>
+#endif
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
 #include <string.h>
-#include <strings.h>
+#include <pwd.h>
+#include <errno.h>
+#include <stdarg.h>
+#include <pthread.h>
+#include <signal.h>
 #include "webcit.h"
+#include "webserver.h"
+
 
 #ifdef WEBCIT_WITH_CALENDAR_SERVICE
 
index 613b9258e51cccd2fa2ab5fb72fceffb2515855f..7067bb1a8d2d684ee470260cda225e7629d582b3 100644 (file)
@@ -8,18 +8,37 @@
  *
  */
 
-
+#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 <ctype.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 <arpa/inet.h>
+#include <netdb.h>
 #include <string.h>
-#include <sys/stat.h>
+#include <pwd.h>
 #include <errno.h>
-
+#include <stdarg.h>
+#include <pthread.h>
+#include <signal.h>
 #include "webcit.h"
+#include "webserver.h"
+
 #include "mime_parser.h"
 
 
index c484632284648fb675675ed2ed9f8626c8bc1764..10dfcff6aa49c931b34a6fee7ee07b627197f68a 100644 (file)
@@ -7,19 +7,32 @@
 
 #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 <arpa/inet.h>
+#include <netdb.h>
 #include <string.h>
 #include <pwd.h>
 #include <errno.h>
 #include <stdarg.h>
-#include <time.h>
+#include <pthread.h>
+#include <signal.h>
 #include "webcit.h"
 #include "webserver.h"
 
index a43aecda906094047616bcb1327fdf1f52897401..f392011122142b9e2e29a90ad90bcf19f1848a82 100644 (file)
@@ -7,23 +7,39 @@
  *
  */
 
+
+#include <ctype.h>
 #include <stdlib.h>
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 #include <stdio.h>
-#include <string.h>
-#include <ctype.h>
+#ifdef HAVE_FCNTL_H
 #include <fcntl.h>
+#endif
+#include <signal.h>
 #include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/utsname.h>
 #include <sys/wait.h>
-#include <signal.h>
-#include <netdb.h>
-#include <errno.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 <arpa/inet.h>
+#include <netdb.h>
+#include <string.h>
 #include <pwd.h>
-
+#include <errno.h>
+#include <stdarg.h>
+#include <pthread.h>
+#include <signal.h>
+#include <sys/utsname.h>
 #include "webcit.h"
+#include "webserver.h"
+
 
 #ifdef HAVE_NEWT
 #include <newt.h>
index d85e47ed7328b2bc55084ab6f18332abe80c1015..86fd68ec1e351f47eeddf8fc8e98fac886f32478 100644 (file)
@@ -6,16 +6,25 @@
 
 #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 <arpa/inet.h>
 #include <netdb.h>
 #include <string.h>
 #include <pwd.h>
 #include <stdarg.h>
 #include <pthread.h>
 #include <signal.h>
-#include <sys/time.h>
 #include "webcit.h"
 #include "webserver.h"
 
+
 typedef unsigned char byte;
 
 #define FALSE 0
@@ -479,7 +488,7 @@ void generate_uuid(char *buf) {
 
        sprintf(buf, "%s-%lx-%x-%x",
                serv_info.serv_nodename,
-               time(NULL),
+               (long)time(NULL),
                getpid(),
                (seq++)
        );
index 6ed4be0c989ca9bf75d01e614bc10c61cfbf79b6..176a175ebf5175d86f5aa4c540cd0277d0a8c7c6 100644 (file)
@@ -38,8 +38,8 @@ void userlist(void)
 {
        char buf[SIZ];
        char fl[SIZ];
-       struct tm *tmbuf;
-       long lc;
+       struct tm tmbuf;
+       time_t lc;
        struct namelist *bio = NULL;
        struct namelist *bptr;
        int has_bio;
@@ -100,11 +100,11 @@ void userlist(void)
                        extract_long(buf, 2),
                        extract_int(buf, 1));
                lc = extract_long(buf, 3);
-               tmbuf = (struct tm *) localtime(&lc);
+               localtime_r(&lc, &tmbuf);
                wprintf("%02d/%02d/%04d ",
-                       (tmbuf->tm_mon + 1),
-                       tmbuf->tm_mday,
-                       (tmbuf->tm_year + 1900));
+                       (tmbuf.tm_mon + 1),
+                       tmbuf.tm_mday,
+                       (tmbuf.tm_year + 1900));
 
 
                wprintf("</TD><TD>%ld</TD><TD>%5ld</TD></TR>\n",
index bbe0485bd67b21f4c2908823a2fff338b42aad15..2198486a3edd1b5454e6ee34e25e95640c22b68a 100644 (file)
@@ -8,31 +8,36 @@
  * Public License.  All other rights reserved.
  */
 
-
+#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>
-
-#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <sys/socket.h>
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
 #endif
-
-#include <ctype.h>
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
 #include <string.h>
+#include <pwd.h>
 #include <errno.h>
-#include <limits.h>
-#include <syslog.h>
-
+#include <stdarg.h>
+#include <pthread.h>
+#include <signal.h>
 #include "webcit.h"
+#include "webserver.h"
 #include "vcard.h"
 
 /*