]> code.citadel.org Git - citadel.git/blobdiff - citadel/rcit.c
fix all the <time.h> vs. <sys/time.h> issues, hopefully
[citadel.git] / citadel / rcit.c
index a5f6f9acf9232e965f3610dc759861e3214b5554..c34b0769343fb8e02ed4d740ac6de1a02c773717 100644 (file)
@@ -1,6 +1,4 @@
-#define UNCOMPRESS "/usr/bin/gunzip"
-
-/* Citadel/UX rcit $Id$
+/* $Id$
  *
  * This program simply feeds its standard input to the networker.  It is
  * used primarily to hook up to UUCP feeds of Citadel data.
  *     -s      Don't run netproc now, just accept the input into spoolin
  */
 
+#define UNCOMPRESS "/usr/bin/gunzip"
 #include <stdlib.h>
 #include <unistd.h>
 #include <fcntl.h>
 #include <stdio.h>
 #include <ctype.h>
 #include <string.h>
-#include <time.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
+#endif
+
 #include "citadel.h"
 
 void get_config(void);
@@ -35,7 +45,7 @@ int main(int argc, char **argv)
 
        get_config();
        sprintf(flnm,"./network/spoolin/rcit.%ld", (long)getpid());
-       sprintf(tname, tmpnam(NULL));
+       strcpy(tname, tmpnam(NULL));
 
        for (a=1; a<argc; ++a) {
                if (!strcmp(argv[a],"-z")) compressed_input = 1;