From a709dd439a010a88e6e8ae94583e71296008b89e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 20 May 1998 10:50:03 +0000 Subject: Update. 1998-05-20 Andreas Jaeger * Makeconfig (rpath-link): Add resolvobjdir. (resolvobjdir): New variable. Reported by Peter Breitenlohner [fixes PR libc/633]. 1998-05-20 09:36 Ulrich Drepper * elf/dl-close.c: Call shared object terminators at the right time. Patch by Philippe Troin . 1998-05-20 Andreas Schwab * Make-dist (+tsrcs): Also add *.map for every member of $(extra-libs). * Makefile (distribute): Don't distribute scripts/printsources and scripts/=__ify. Distribute FAQ.in. (rpm/%): Don't pass subdirs to sub-make. * timezone/Makefile: Protect inclusion of z.* by $(avoid-generated) instead of $(no_deps). 1998-05-19 Andreas Schwab * sysdeps/generic/setenv.c: Protect against GNU C extension. (KNOWN_VALUE, STORE_VALUE): Do it right. (setenv): Remove unused variable. 1998-05-18 Andreas Schwab * timezone/Makefile (tz-cflags): Define TM_GMTOFF and TM_ZONE. (CFLAGS-zdump.c): Add $(tz-cflags). * timezone/zdump.c (abbr): Use TM_ZONE if defined. Add const to return type. 1998-05-18 Andreas Schwab * time/tzfile.c (__tzfile_compute): Undo last change. Instead take struct tm parameter and set tm_isdst, tm_zone and tm_offset if use_localtime. * time/tzset.c: Update prototype of __tzfile_compute. (__tz_convert): Pass tp to __tzfile_compute. Don't set tm_isdst, tm_zone and tm_offset here if __use_tzfile. 1998-05-19 Andreas Schwab * Makerules: Install libc.a even if there are no object file. 1998-05-18 Andreas Schwab * Makerules (do-makelib): Don't force creating library from scratch, to avoid wasting time and space and to get correct behaviour if $(subdirs) is incomplete. 1998-05-19 Andreas Schwab * Makerules (do-stamp): Make it work when building in source directory. --- timezone/Makefile | 7 ++++--- timezone/zdump.c | 12 ++++++++---- 2 files changed, 12 insertions(+), 7 deletions(-) (limited to 'timezone') diff --git a/timezone/Makefile b/timezone/Makefile index 3f3f944..410d383 100644 --- a/timezone/Makefile +++ b/timezone/Makefile @@ -53,7 +53,7 @@ define nl endef -ifneq ($(no_deps),t) +ifndef avoid-generated -include $(addprefix $(objpfx)z.,$(tzfiles)) endif @@ -158,9 +158,10 @@ $(objpfx)zic: $(objpfx)scheck.o $(objpfx)ialloc.o tz-cflags = -DTZDIR='"$(zonedir)"' \ -DTZDEFAULT='"$(localtime-file)"' \ - -DTZDEFRULES='"$(posixrules-file)"' + -DTZDEFRULES='"$(posixrules-file)"' \ + -DTM_GMTOFF=tm_gmtoff -DTM_ZONE=tm_zone -CFLAGS-zdump.c = -Wno-strict-prototypes -DNOID +CFLAGS-zdump.c = -Wno-strict-prototypes -DNOID $(tz-cflags) CFLAGS-zic.c = -Wno-strict-prototypes -DNOID $(tz-cflags) CFLAGS-ialloc.c = -Wno-strict-prototypes -DNOID CFLAGS-scheck.c = -Wno-strict-prototypes -DNOID diff --git a/timezone/zdump.c b/timezone/zdump.c index f6480bb..8c4f6ad 100644 --- a/timezone/zdump.c +++ b/timezone/zdump.c @@ -127,7 +127,7 @@ extern char * optarg; extern int optind; extern char * tzname[2]; -static char * abbr P((struct tm * tmp)); +static const char *abbr P((struct tm * tmp)); static long delta P((struct tm * newp, struct tm * oldp)); static time_t hunt P((char * name, time_t lot, time_t hit)); static size_t longest; @@ -358,15 +358,19 @@ int v; (void) printf("\n"); } -static char * +static const char * abbr(tmp) struct tm * tmp; { - register char * result; - static char nada; + register const char *result; + static const char nada; +#ifdef TM_ZONE + result = tmp->TM_ZONE; +#else /* !defined TM_ZONE */ if (tmp->tm_isdst != 0 && tmp->tm_isdst != 1) return &nada; result = tzname[tmp->tm_isdst]; +#endif /* !defined TM_ZONE */ return (result == NULL) ? &nada : result; } -- cgit v1.1