From 56a0d1df6c66acebbd612b8919bffcd4dbdb3de6 Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Mon, 9 Dec 1996 01:38:21 +0000 Subject: [PATCH] more ifdefs for include files git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1086 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/roken/roken.h | 13 ++++++++++++- lib/roken/roken.h.in | 13 ++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/lib/roken/roken.h b/lib/roken/roken.h index c24e1b492..435b945f7 100644 --- a/lib/roken/roken.h +++ b/lib/roken/roken.h @@ -153,8 +153,17 @@ int setegid(int egid); #define strrchr(p, ch) rindex(p, ch) #endif -#include +#ifdef TIME_WITH_SYS_TIME #include +#include +#else +#ifdef HAVE_SYS_TIME_H +#include +#else +#include +#endif /* !HAVE_SYS_TIME_H */ +#endif /* !TIME_WITH_SYS_TIME */ + time_t tm2time (struct tm tm, int local); int unix_verify_user(char *user, char *password); @@ -187,6 +196,7 @@ void mini_inetd (int port); #define min(a,b) (((a)<(b))?(a):(b)) #endif +#ifdef HAVE_SYSLOG_H #include /* Misc definitions for old syslogs */ @@ -212,6 +222,7 @@ void vsyslog(int pri, const char *fmt, va_list ap); #ifndef LOG_AUTHPRIV #define LOG_AUTHPRIV LOG_AUTH #endif +#endif #ifdef NEED_OPTARG_DECLARATION extern char *optarg; diff --git a/lib/roken/roken.h.in b/lib/roken/roken.h.in index c24e1b492..435b945f7 100644 --- a/lib/roken/roken.h.in +++ b/lib/roken/roken.h.in @@ -153,8 +153,17 @@ int setegid(int egid); #define strrchr(p, ch) rindex(p, ch) #endif -#include +#ifdef TIME_WITH_SYS_TIME #include +#include +#else +#ifdef HAVE_SYS_TIME_H +#include +#else +#include +#endif /* !HAVE_SYS_TIME_H */ +#endif /* !TIME_WITH_SYS_TIME */ + time_t tm2time (struct tm tm, int local); int unix_verify_user(char *user, char *password); @@ -187,6 +196,7 @@ void mini_inetd (int port); #define min(a,b) (((a)<(b))?(a):(b)) #endif +#ifdef HAVE_SYSLOG_H #include /* Misc definitions for old syslogs */ @@ -212,6 +222,7 @@ void vsyslog(int pri, const char *fmt, va_list ap); #ifndef LOG_AUTHPRIV #define LOG_AUTHPRIV LOG_AUTH #endif +#endif #ifdef NEED_OPTARG_DECLARATION extern char *optarg;