$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.
1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
* webserver.c: warning fix
-
*/
+#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
*
*/
-
+#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"
#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"
*
*/
+
+#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>
#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
sprintf(buf, "%s-%lx-%x-%x",
serv_info.serv_nodename,
- time(NULL),
+ (long)time(NULL),
getpid(),
(seq++)
);
{
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;
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",
* 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"
/*