Completely remove the use of TIME_WITH_SYS_TIME.
authormarkus schnalke <meillo@marmaro.de>
Tue, 27 Mar 2012 07:10:44 +0000 (09:10 +0200)
committermarkus schnalke <meillo@marmaro.de>
Tue, 27 Mar 2012 07:10:44 +0000 (09:10 +0200)
Removed the autoconf test but never removed the code, and this caused
some problems on systems that needed some prototypes in <time.h>.

Pulled in from nmh. Thanks to Ken Hornstein.

sbr/dtimep.lex
sbr/fmt_compile.c
sbr/fmt_scan.c
sbr/lock_file.c
uip/mhbuild.c
uip/mhcachesbr.c
uip/pick.c
uip/send.c

index b5fac4f..133a9ab 100644 (file)
@@ -10,7 +10,6 @@
 %{
 #include <h/nmh.h>
 #include <h/tws.h>
-#include <time.h>
 
   /* Since we're looking at a string at a time, don't worry about
    *  wrapping to the next buffer.
@@ -144,16 +143,10 @@ static int day_map[] = {
 #define SKIPTOSP()  { while ( !isspace(*cp++) ) ; --cp; }
 
 #ifdef ADJUST_NUMERIC_ONLY_TZ_OFFSETS_WRT_DST
-# ifdef TIME_WITH_SYS_TIME
+# ifdef HAVE_SYS_TIME_H
 #  include <sys/time.h>
-#  include <time.h>
-# else
-#  ifdef HAVE_SYS_TIME_H
-#   include <sys/time.h>
-#  else
-#   include <time.h>
-#  endif
 # endif
+#include <time.h>
 
 static void
 zonehack (struct tws *tw)
index 797c192..c49a6ea 100644 (file)
 #include <h/fmt_scan.h>
 #include <h/fmt_compile.h>
 
-#ifdef TIME_WITH_SYS_TIME
+#ifdef HAVE_SYS_TIME_H
 # include <sys/time.h>
-# include <time.h>
-#else
-# ifdef TM_IN_SYS_TIME
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
 #endif
+#include <time.h>
 
 /*
 ** hash table for deciding if a component is "interesting"
index f26b02b..f727177 100644 (file)
 #include <h/tws.h>
 #include <h/fmt_compile.h>
 
-#ifdef TIME_WITH_SYS_TIME
+#ifdef HAVE_SYS_TIME_H
 # include <sys/time.h>
-# include <time.h>
-#else
-# ifdef TM_IN_SYS_TIME
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
 #endif
+#include <time.h>
+
 #ifdef MULTIBYTE_SUPPORT
 #  include <wctype.h>
 #  include <wchar.h>
index 5d0be84..d15c939 100644 (file)
 #include <h/signals.h>
 #include <h/utils.h>
 
-#ifdef TIME_WITH_SYS_TIME
+#ifdef HAVE_SYS_TIME_H
 # include <sys/time.h>
-# include <time.h>
-#else
-# ifdef TM_IN_SYS_TIME
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
 #endif
+#include <time.h>
 
 #include <errno.h>
 
index 06a353a..739aa46 100644 (file)
 #include <h/mhcachesbr.h>
 #include <h/utils.h>
 
-#ifdef TIME_WITH_SYS_TIME
+#ifdef HAVE_SYS_TIME_H
 # include <sys/time.h>
-# include <time.h>
-#else
-# ifdef TM_IN_SYS_TIME
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
 #endif
+#include <time.h>
 
 static struct swit switches[] = {
 #define CHECKSW  0
index 2d6c596..201ce51 100644 (file)
 #include <h/mhcachesbr.h>
 #include <h/utils.h>
 
-#ifdef TIME_WITH_SYS_TIME
+#ifdef HAVE_SYS_TIME_H
 # include <sys/time.h>
-# include <time.h>
-#else
-# ifdef TM_IN_SYS_TIME
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
 #endif
+#include <time.h>
 
 extern int debugsw;
 
index 73babad..896c37b 100644 (file)
 #include <h/tws.h>
 #include <h/utils.h>
 
-#ifdef TIME_WITH_SYS_TIME
+#ifdef HAVE_SYS_TIME_H
 # include <sys/time.h>
-# include <time.h>
-#else
-# ifdef TM_IN_SYS_TIME
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
 #endif
+#include <time.h>
 
 static struct swit switches[] = {
 #define ANDSW  0
index e39ab80..a2e9932 100644 (file)
 #include <h/tws.h>
 #include <h/utils.h>
 
-#ifdef TIME_WITH_SYS_TIME
+#ifdef HAVE_SYS_TIME_H
 # include <sys/time.h>
-# include <time.h>
-#else
-# ifdef TM_IN_SYS_TIME
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
 #endif
+#include <time.h>
 
 int debugsw = 0;  /* global */
 int forwsw  = 1;