From 20d8808116d749b626c080b2891c968f163966e6 Mon Sep 17 00:00:00 2001 From: Manuel Novoa III Date: Tue, 17 Jun 2003 19:19:39 +0000 Subject: Optionally support the struct tm extension fields. Add a few misc functions mentioned in time.h. Revert davidm's change regarding using a define for the "/etc/TZ" path, as this is eventually meant to be a configurable extension and not unconditionally supported. --- include/paths.h | 1 - include/time.h | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/paths.h b/include/paths.h index 38102d55a..90edcf8fd 100644 --- a/include/paths.h +++ b/include/paths.h @@ -67,7 +67,6 @@ #define _PATH_SHADOW "/etc/shadow" #define _PATH_PASSWD "/etc/passwd" #define _PATH_GROUP "/etc/group" -#define _PATH_TZ "/etc/TZ" /* Provide trailing slash, since mostly used for building pathnames. */ #define _PATH_DEV "/dev/" diff --git a/include/time.h b/include/time.h index bd86b40ee..5611defbb 100644 --- a/include/time.h +++ b/include/time.h @@ -127,15 +127,15 @@ struct tm int tm_yday; /* Days in year.[0-365] */ int tm_isdst; /* DST. [-1/0/1]*/ -#if 0 +#ifdef __UCLIBC_HAS_TM_EXTENSIONS__ # ifdef __USE_BSD long int tm_gmtoff; /* Seconds east of UTC. */ - __const char *tm_zone; /* Timezone abbreviation. */ + __const char tm_zone[8]; /* Timezone abbreviation. */ # else long int __tm_gmtoff; /* Seconds east of UTC. */ - __const char *__tm_zone; /* Timezone abbreviation. */ + __const char __tm_zone[8];/* Timezone abbreviation. */ # endif -#endif +#endif /* __UCLIBC_HAS_TM_EXTENSIONS__ */ }; -- cgit v1.2.3