Cleaned defines

This commit is contained in:
Michiel Broek
2003-05-10 14:14:16 +00:00
parent 5999ae379f
commit 296e170bbd
6 changed files with 22 additions and 380 deletions

View File

@@ -83,7 +83,9 @@
#include <setjmp.h>
#include <grp.h>
#include <sys/resource.h>
#ifdef HAVE_ICONV_H
#include <iconv.h>
#endif
#pragma pack(1)

View File

@@ -27,7 +27,7 @@
#if !defined(HAVE_TM_ZONE) && !defined(_TIMEZONE) && !defined(HAVE_DECLARED_TIMEZONE)
#if !defined(HAVE_STRUCT_TM_TM_ZONE) && !defined(_TIMEZONE) && !defined(HAVE_DECLARED_TIMEZONE)
extern time_t timezone;
#endif
@@ -1418,10 +1418,10 @@ int GetTimeInfo(TIMEINFO *Now)
#if defined(HAVE_GETTIMEOFDAY)
struct timeval tv;
#endif /* defined(HAVE_GETTIMEOFDAY) */
#if !defined(HAVE_TM_ZONE)
#if !defined(HAVE_STRUCT_TM_TM_ZONE)
struct tm local;
struct tm gmt;
#endif /* !defined(HAVE_TM_ZONE) */
#endif /* !defined(HAVE_STRUCT_TM_TM_ZONE) */
/* Get the basic time. */
#if defined(HAVE_GETTIMEOFDAY)
@@ -1440,7 +1440,7 @@ int GetTimeInfo(TIMEINFO *Now)
if ((tm = localtime(&Now->time)) == NULL)
return -1;
secondsUntilNextHour = 60 * (60 - tm->tm_min) - tm->tm_sec;
#if !defined(HAVE_TM_ZONE)
#if !defined(HAVE_STRUCT_TM_TM_ZONE)
/* To get the timezone, compare localtime with GMT. */
local = *tm;
if ((tm = gmtime(&Now->time)) == NULL)
@@ -1462,7 +1462,7 @@ int GetTimeInfo(TIMEINFO *Now)
LastTzone += gmt.tm_min - local.tm_min;
#else
LastTzone = (0 - tm->tm_gmtoff) / 60;
#endif /* defined(HAVE_TM_ZONE) */
#endif /* defined(HAVE_STRUCT_TM_TM_ZONE) */
NextHour = Now->time + secondsUntilNextHour;
}
Now->tzone = LastTzone;
@@ -1743,7 +1743,7 @@ time_t parsedate(char *p, TIMEINFO *now)
yyYear = tm->tm_year + 1900;
yyMonth = tm->tm_mon + 1;
yyDay = tm->tm_mday;
#ifdef HAVE_TM_ZONE
#ifdef HAVE_STRUCT_TM_TM_ZONE
yyTimezone = tm->tm_gmtoff/60;
#else
yyTimezone = timezone/60;