From 95732b497d12c98613bb3c5db16b61f377501a59 Mon Sep 17 00:00:00 2001 From: Jari Aalto Date: Wed, 7 Dec 2005 14:08:12 +0000 Subject: Imported from ../bash-3.1.tar.gz. --- lib/sh/strftime.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'lib/sh/strftime.c') diff --git a/lib/sh/strftime.c b/lib/sh/strftime.c index 4cb542f..0783d28 100644 --- a/lib/sh/strftime.c +++ b/lib/sh/strftime.c @@ -80,15 +80,21 @@ #undef strchr /* avoid AIX weirdness */ +#if defined (SHELL) +extern char *get_string_value (const char *); +#endif + extern void tzset(void); static int weeknumber(const struct tm *timeptr, int firstweekday); static int iso8601wknum(const struct tm *timeptr); +#ifndef inline #ifdef __GNUC__ #define inline __inline__ #else #define inline /**/ #endif +#endif #define range(low, item, hi) max(low, min(item, hi)) @@ -98,8 +104,12 @@ extern int daylight; #if defined(SOLARIS) || defined(mips) || defined (M_UNIX) extern long int timezone, altzone; #else +# if defined (HPUX) +extern long int timezone; +# else extern int timezone, altzone; -#endif +# endif /* !HPUX */ +#endif /* !SOLARIS && !mips && !M_UNIX */ #endif #undef min /* just in case */ @@ -480,8 +490,13 @@ strftime(char *s, size_t maxsize, const char *format, const struct tm *timeptr) * Systems with tzname[] probably have timezone as * secs west of GMT. Convert to mins east of GMT. */ +# ifdef HPUX + off = -timezone / 60; +# else off = -(daylight ? timezone : altzone) / 60; +# endif /* !HPUX */ #else /* !HAVE_TZNAME */ + gettimeofday(& tv, & zone); off = -zone.tz_minuteswest; #endif /* !HAVE_TZNAME */ #endif /* !HAVE_TM_ZONE */ -- cgit v1.2.3