mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-06 18:22:25 +02:00
commit bash-20040816 snapshot
This commit is contained in:
+14
-1
@@ -80,6 +80,10 @@
|
||||
|
||||
#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);
|
||||
@@ -98,8 +102,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 +488,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 */
|
||||
|
||||
Reference in New Issue
Block a user