AC_SUBST(OURDEFS)
 
 AC_HEADER_STDC
-AC_HEADER_TIME
 AC_HEADER_TIOCGWINSZ
 AC_CHECK_HEADERS(errno.h fcntl.h crypt.h termcap.h \
                  langinfo.h wchar.h wctype.h iconv.h netdb.h \
 dnl ---------------
 dnl CHECK FUNCTIONS
 dnl ---------------
-AC_CHECK_FUNCS(writev lstat tzset getutent nl_langinfo)
+AC_CHECK_FUNCS(writev lstat getutent nl_langinfo)
 
 dnl Check for multibyte character set support
 if test "x$ac_cv_header_wchar_h" = "xyes" -a "x$ac_cv_header_wctype_h" = "xyes" \
 dnl CHECK STRUCTURES
 dnl ----------------
 
-AC_CHECK_MEMBERS(struct tm.tm_gmtoff,,,
-  [#ifdef TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# ifdef TM_IN_SYS_TIME
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
-#endif])
-
+AC_CHECK_MEMBERS([struct tm.tm_gmtoff],,,[#include <time.h>])
 AC_CHECK_MEMBERS(struct utmp.ut_type,,,[#include <utmp.h>])
 
 AC_STRUCT_DIRENT_D_TYPE
 
 #include <h/mh.h>   /* for snprintf() */
 #include <h/nmh.h>
 #include <h/tws.h>
+#include <time.h>
 
-#if !defined(HAVE_STRUCT_TM_TM_GMTOFF) && !defined(HAVE_TZSET)
-# include <sys/timeb.h>
-#endif
-
-#ifdef TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-# else
-#  include <time.h>
-# endif
-#endif
-
-#if !defined(HAVE_STRUCT_TM_TM_GMTOFF) && defined(HAVE_TZSET)
+#if !defined(HAVE_STRUCT_TM_TM_GMTOFF)
 extern int daylight;
 extern long timezone;
 extern char *tzname[];
     static struct tws tw;
     struct tm *tm;
 
-#if !defined(HAVE_STRUCT_TM_TM_GMTOFF) && !defined(HAVE_TZSET)
-    struct timeb tb;
-#endif
-
     if (!clock)
        return NULL;
 
     if (tm->tm_isdst)                  /* if DST is in effect */
        tw.tw_zone -= 60;               /* reset to normal offset */
 #else
-# ifdef HAVE_TZSET
     tzset();
     tw.tw_zone = -(timezone / 60);
-# else
-    ftime (&tb);
-    tw.tw_zone = -tb.timezone;
-# endif
 #endif
 
     tw.tw_flags &= ~TW_SDAY;
     }
 
     if (!(flags & TW_ZONE) && mins == 0) {
-#if defined(HAVE_TZSET) && defined(HAVE_TZNAME)
        tzset();
        return ((flags & TW_DST) ? tzname[1] : tzname[0]);
-#else
-       for (z = zones; z->std; z++)
-           if (z->shift == hours)
-               return (z->dst && (flags & TW_DST) ? z->dst : z->std);
-#endif
     }
 
 #ifdef ADJUST_NUMERIC_ONLY_TZ_OFFSETS_WRT_DST