diff --git a/appl/ftp/ftp/ftp_locl.h b/appl/ftp/ftp/ftp_locl.h index 20fb3d56a..383fb7ca2 100644 --- a/appl/ftp/ftp/ftp_locl.h +++ b/appl/ftp/ftp/ftp_locl.h @@ -60,7 +60,14 @@ #include #include #include +#ifdef TIME_WITH_SYS_TIME +#include #include +#elif defined(HAVE_SYS_TIME_H) +#include +#else +#include +#endif #ifdef HAVE_UNISTD_H #include #endif @@ -71,9 +78,6 @@ #ifdef HAVE_SYS_PARAM_H #include #endif -#ifdef HAVE_SYS_TIME_H -#include -#endif #ifdef HAVE_SYS_RESOURCE_H #include #endif diff --git a/appl/ftp/ftpd/ftpd.c b/appl/ftp/ftpd/ftpd.c index c803866ad..b1077e846 100644 --- a/appl/ftp/ftpd/ftpd.c +++ b/appl/ftp/ftpd/ftpd.c @@ -58,8 +58,13 @@ RCSID("$Id$"); #if defined(HAVE_SYS_IOCTL_H) && SunOS != 4 #include #endif -#ifdef HAVE_SYS_TIME_H +#ifdef TIME_WITH_SYS_TIME #include +#include +#elif defined(HAVE_SYS_TIME_H) +#include +#else +#include #endif #ifdef HAVE_SYS_RESOURCE_H #include diff --git a/appl/ftp/ftpd/popen.c b/appl/ftp/ftpd/popen.c index 057988961..a6ca4c624 100644 --- a/appl/ftp/ftpd/popen.c +++ b/appl/ftp/ftpd/popen.c @@ -41,7 +41,14 @@ RCSID("$Id$"); #endif #include +#ifdef TIME_WITH_SYS_TIME #include +#include +#elif defined(HAVE_SYS_TIME_H) +#include +#else +#include +#endif #ifdef HAVE_SYS_RESOURCE_H #include #endif diff --git a/appl/kx/kx.h b/appl/kx/kx.h index 5189dbe91..391a68ae7 100644 --- a/appl/kx/kx.h +++ b/appl/kx/kx.h @@ -67,8 +67,13 @@ #ifdef HAVE_SYS_TYPES_H #include #endif -#ifdef HAVE_SYS_TIME_H +#ifdef TIME_WITH_SYS_TIME #include +#include +#elif defined(HAVE_SYS_TIME_H) +#include +#else +#include #endif #ifdef HAVE_SYS_RESOURCE_H #include diff --git a/appl/popper/popper.h b/appl/popper/popper.h index c1aeb0cdd..d33c1972d 100644 --- a/appl/popper/popper.h +++ b/appl/popper/popper.h @@ -55,8 +55,13 @@ #ifdef HAVE_SYS_FILE_H #include #endif -#ifdef HAVE_SYS_TIME_H +#ifdef TIME_WITH_SYS_TIME #include +#include +#elif defined(HAVE_SYS_TIME_H) +#include +#else +#include #endif #ifdef HAVE_SYS_RESOURCE_H #include diff --git a/appl/telnet/telnet/network.c b/appl/telnet/telnet/network.c index 2b2fcaf7a..30ed82692 100644 --- a/appl/telnet/telnet/network.c +++ b/appl/telnet/telnet/network.c @@ -43,7 +43,14 @@ RCSID("$Id$"); #include #endif #include +#ifdef TIME_WITH_SYS_TIME #include +#include +#elif defined(HAVE_SYS_TIME_H) +#include +#else +#include +#endif #include diff --git a/appl/telnet/telnet/sys_bsd.c b/appl/telnet/telnet/sys_bsd.c index ccda7d62c..7ce0483f0 100644 --- a/appl/telnet/telnet/sys_bsd.c +++ b/appl/telnet/telnet/sys_bsd.c @@ -53,8 +53,13 @@ RCSID("$Id$"); #ifdef HAVE_SYS_SELECT_H #include #endif -#ifdef HAVE_SYS_TIME_H +#ifdef TIME_WITH_SYS_TIME #include +#include +#elif defined(HAVE_SYS_TIME_H) +#include +#else +#include #endif #ifdef HAVE_SYS_SOCKET_H #include diff --git a/appl/telnet/telnet/utilities.c b/appl/telnet/telnet/utilities.c index 9e49d65bb..5fb1f663f 100644 --- a/appl/telnet/telnet/utilities.c +++ b/appl/telnet/telnet/utilities.c @@ -49,7 +49,14 @@ RCSID("$Id$"); #ifdef HAVE_SYS_SOCKET_H #include #endif +#ifdef TIME_WITH_SYS_TIME #include +#include +#elif defined(HAVE_SYS_TIME_H) +#include +#else +#include +#endif #include diff --git a/appl/telnet/telnetd/defs.h b/appl/telnet/telnetd/defs.h index caa77f192..80268efee 100644 --- a/appl/telnet/telnetd/defs.h +++ b/appl/telnet/telnetd/defs.h @@ -50,7 +50,14 @@ #endif #include +#ifdef TIME_WITH_SYS_TIME #include +#include +#elif defined(HAVE_SYS_TIME_H) +#include +#else +#include +#endif #ifdef HAVE_SYS_RESOURCE_H #include #endif /* HAVE_SYS_RESOURCE_H */ diff --git a/lib/des/rnd_keys.c b/lib/des/rnd_keys.c index d4cc82314..016bfc8d5 100644 --- a/lib/des/rnd_keys.c +++ b/lib/des/rnd_keys.c @@ -46,8 +46,17 @@ RCSID("$Id$"); #include #include +#include #include + +#ifdef TIME_WITH_SYS_TIME #include +#include +#elif defined(HAVE_SYS_TIME_H) +#include +#else +#include +#endif #ifdef HAVE_UNISTD_H #include @@ -56,9 +65,12 @@ RCSID("$Id$"); #include #endif +#ifdef HAVE_SIGNAL_H #include +#endif +#ifdef HAVE_FCNTL_H #include -#include +#endif /* * Generate "random" data by checksumming a file. diff --git a/lib/roken/getdtablesize.c b/lib/roken/getdtablesize.c index 9f335e85b..4a5f4ed5e 100644 --- a/lib/roken/getdtablesize.c +++ b/lib/roken/getdtablesize.c @@ -44,8 +44,17 @@ RCSID("$Id$"); #include "roken.h" #include +#ifdef TIME_WITH_SYS_TIME #include +#include +#elif defined(HAVE_SYS_TIME_H) +#include +#else +#include +#endif +#ifdef HAVE_SYS_PARAM_H #include +#endif #include #ifdef HAVE_SYS_RESOURCE_H diff --git a/lib/roken/roken.h b/lib/roken/roken.h index dca8e11a2..086d3b6a2 100644 --- a/lib/roken/roken.h +++ b/lib/roken/roken.h @@ -204,13 +204,11 @@ int rcmd(char **ahost, unsigned short inport, const char *locuser, #ifdef TIME_WITH_SYS_TIME #include #include -#else -#ifdef HAVE_SYS_TIME_H +#elif defined(HAVE_SYS_TIME_H) #include #else #include -#endif /* !HAVE_SYS_TIME_H */ -#endif /* !TIME_WITH_SYS_TIME */ +#endif time_t tm2time (struct tm tm, int local); diff --git a/lib/roken/roken.h.in b/lib/roken/roken.h.in index dca8e11a2..086d3b6a2 100644 --- a/lib/roken/roken.h.in +++ b/lib/roken/roken.h.in @@ -204,13 +204,11 @@ int rcmd(char **ahost, unsigned short inport, const char *locuser, #ifdef TIME_WITH_SYS_TIME #include #include -#else -#ifdef HAVE_SYS_TIME_H +#elif defined(HAVE_SYS_TIME_H) #include #else #include -#endif /* !HAVE_SYS_TIME_H */ -#endif /* !TIME_WITH_SYS_TIME */ +#endif time_t tm2time (struct tm tm, int local); diff --git a/lib/roken/strftime.c b/lib/roken/strftime.c index ca021e85c..aa6475efe 100644 --- a/lib/roken/strftime.c +++ b/lib/roken/strftime.c @@ -38,13 +38,11 @@ #ifdef TIME_WITH_SYS_TIME #include #include -#else -#ifdef HAVE_SYS_TIME_H +#elif defined(HAVE_SYS_TIME_H) #include #else #include -#endif /* !HAVE_SYS_TIME_H */ -#endif /* !TIME_WITH_SYS_TIME */ +#endif #define TM_YEAR_BASE 1900 /* from */ #include diff --git a/lib/roken/tm2time.c b/lib/roken/tm2time.c index 78158cd23..92ea71522 100644 --- a/lib/roken/tm2time.c +++ b/lib/roken/tm2time.c @@ -41,9 +41,13 @@ RCSID("$Id$"); #endif -#include -#ifdef HAVE_SYS_TIME_H +#ifdef TIME_WITH_SYS_TIME #include +#include +#elif defined(HAVE_SYS_TIME_H) +#include +#else +#include #endif #include "roken.h"