- fix library flags, includes for portability
authorNathan Bryant <loanshark@uncensored.citadel.org>
Tue, 11 Dec 2001 20:04:41 +0000 (20:04 +0000)
committerNathan Bryant <loanshark@uncensored.citadel.org>
Tue, 11 Dec 2001 20:04:41 +0000 (20:04 +0000)
 - malloc.h is deprecated
 - fix genstamp, hopefully
 - fix size_t *printf handling for portability

citadel/ChangeLog
citadel/Makefile.in
citadel/citadel.h
citadel/file_ops.c
citadel/genstamp.c
citadel/room_ops.c
citadel/server_main.c
citadel/sysdep.c

index 4dc5d6c5bb88a48a447378f741dbe8d0658c1b6f..72602733e80721ea1c95b242a11afec7251cdd47 100644 (file)
@@ -1,4 +1,10 @@
  $Log$
+ Revision 590.1  2001/12/11 20:04:41  nbryant
+  - fix library flags, includes for portability
+  - malloc.h is deprecated
+  - fix genstamp, hopefully
+  - fix size_t *printf handling for portability
+
  Revision 590.0  2001/12/08 03:31:41  ajc
  * THIS IS 5.90
 
@@ -2939,4 +2945,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import 
-
index fb1eb45ba2734c86958c2af656c14edde76dafbc..d80c7d447d8eef56e0ad5f0ddfcd0709400049ef 100644 (file)
@@ -201,7 +201,7 @@ modules/libimap.la: serv_imap.lo imap_tools.lo imap_fetch.lo \
                ../imap_fetch.lo ../imap_search.lo ../imap_store.lo ../imap_misc.lo ../libcitserver.la
 
 aidepost: aidepost.o libcitserver.la $(LIBOBJS)
-       $(LIBTOOL) $(CC) aidepost.o libcitserver.la $(LIBOBJS) $(LDFLAGS) -o aidepost
+       $(LIBTOOL) $(CC) aidepost.o libcitserver.la $(LIBOBJS) $(LDFLAGS) -o aidepost $(PTHREAD_LIBS)
 
 modules/libpas2.la: serv_pas2.lo md5.lo $(LIBTOOL) libcitserver.la
        $(LTSHARE) -o libpas2.la ../serv_pas2.lo ../md5.lo ../libcitserver.la
@@ -229,7 +229,7 @@ migratenet$(EXEEXT): migratenet.o config.o ipc_c_tcp.o tools.o $(LIBOBJS)
 
 sendcommand: sendcommand.o ipc_c_tcp.o libcitserver.la $(LIBOBJS)
        $(LIBTOOL) $(CC) sendcommand.o ipc_c_tcp.o libcitserver.la \
-        $(LIBOBJS) $(LDFLAGS) -o sendcommand $(NETLIBS)
+        $(LIBOBJS) $(LDFLAGS) -o sendcommand $(NETLIBS) $(PTHREAD_LIBS)
 
 base64: base64.o
        $(CC) base64.o $(LDFLAGS) -o base64
@@ -245,7 +245,7 @@ readlog: readlog.o config.o
        $(CC) readlog.o config.o $(LDFLAGS) -o readlog
 
 stats: stats.o ipc_c_tcp.o libcitserver.la $(LIBOBJS)
-       $(LIBTOOL) $(CC) stats.o ipc_c_tcp.o libcitserver.la $(LIBOBJS) $(LDFLAGS) -o stats $(NETLIBS)
+       $(LIBTOOL) $(CC) stats.o ipc_c_tcp.o libcitserver.la $(LIBOBJS) $(LDFLAGS) -o stats $(NETLIBS) $(PTHREAD_LIBS)
 
 .PHONY: install-data install-doc install-exec clean cleaner distclean
 
index b0a94100c03be371f69148b5aa883deb72555f49..8b1e0860247f04e2dae7bfd53ad330fc2cd579b1 100644 (file)
@@ -11,6 +11,7 @@
 #define CITADEL_H
 
 #include "sysdep.h"
+#include <limits.h>
 #include "sysconfig.h"
 #include "ipcdef.h"
 
index ea998fca259b574ffa7399d6cc0c71c19eb8b0de..1d1e8705d87ff42274370e38bbed7eed37bb0fe7 100644 (file)
@@ -780,7 +780,7 @@ void cmd_ndop(char *cmdbuf)
        CC->dl_is_net = 1;
 
        stat(pathname, &statbuf);
-       cprintf("%d %ld\n", OK, statbuf.st_size);
+       cprintf("%d %ld\n", OK, (long)statbuf.st_size);
 }
 
 /*
index ce9575559059b3965dec7ee042e8f9f271ee1b04..8915afa88ee6e5befa9845053915a6de3767a751 100644 (file)
@@ -51,7 +51,7 @@ void datestring(char *buf, time_t xtime, int which_format) {
        t = localtime(&xtime);
 
        /* Convert "seconds west of GMT" to "hours/minutes offset" */
-       offset = timezone;
+       offset = t->tm_gmtoff;
        if (offset > 0) {
                offsign = '-';
        }
index 4bab8b8d0a7f57c9e774597ccf14756a0ba5c731..228b22bab6e5a4eb8f34c04785c2715aaf709306 100644 (file)
@@ -925,7 +925,7 @@ void cmd_rdir(void)
                                            &buf[strlen(flnm) + 1],
                                            sizeof comment);
                        }
-                       cprintf("%s|%ld|%s\n", flnm, statbuf.st_size, comment);
+                       cprintf("%s|%ld|%s\n", flnm, (long)statbuf.st_size, comment);
                }
        }
        fclose(ls);
index b021b8991e3675057177e6fa3e8b7e3a68452d50..9cf80d5f59ad71240be3f2de7ede3b5eb5c0f732 100644 (file)
@@ -37,9 +37,6 @@
 #include <stdarg.h>
 #include <syslog.h>
 #include <grp.h>
-#ifdef __GNUC__
-#include <malloc.h>
-#endif
 #ifdef HAVE_PTHREAD_H
 #include <pthread.h>
 #endif
index 80427374c1dee14e5fe1ba20e15fb5ed43c15748..6a565b0a416e64dd4e633e02df4730669227c64e 100644 (file)
@@ -49,9 +49,6 @@
 #include <stdarg.h>
 #include <syslog.h>
 #include <grp.h>
-#ifdef __GNUC__
-#include <malloc.h>
-#endif
 #ifdef HAVE_PTHREAD_H
 #include <pthread.h>
 #endif