about summary refs log tree commit diff
path: root/time/tzset.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-05-20 10:50:03 +0000
committerUlrich Drepper <drepper@redhat.com>1998-05-20 10:50:03 +0000
commita709dd439a010a88e6e8ae94583e71296008b89e (patch)
treea0c3fe9835f3a05c1ed61ba01d98ee90bbe858f5 /time/tzset.c
parentb0a01055eb0ff324fd5e2b44fa9687035e5f3204 (diff)
downloadglibc-a709dd439a010a88e6e8ae94583e71296008b89e.tar.gz
glibc-a709dd439a010a88e6e8ae94583e71296008b89e.tar.xz
glibc-a709dd439a010a88e6e8ae94583e71296008b89e.zip
Update.
1998-05-20  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* Makeconfig (rpath-link): Add resolvobjdir.
	(resolvobjdir): New variable.
	Reported by Peter Breitenlohner <peb@mppmu.mpg.de> [fixes PR libc/633].

1998-05-20 09:36  Ulrich Drepper  <drepper@cygnus.com>

	* elf/dl-close.c: Call shared object terminators at the right time.
	Patch by Philippe Troin <phil@fifi.org>.

1998-05-20  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* 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  <schwab@issan.informatik.uni-dortmund.de>

	* 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  <schwab@issan.informatik.uni-dortmund.de>

	* 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  <schwab@issan.informatik.uni-dortmund.de>

	* 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  <schwab@issan.informatik.uni-dortmund.de>

	* Makerules: Install libc.a even if there are no object file.

1998-05-18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* 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  <schwab@issan.informatik.uni-dortmund.de>

	* Makerules (do-stamp): Make it work when building in source
	directory.
Diffstat (limited to 'time/tzset.c')
-rw-r--r--time/tzset.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/time/tzset.c b/time/tzset.c
index 251967e5c6..4b8fa41021 100644
--- a/time/tzset.c
+++ b/time/tzset.c
@@ -38,7 +38,7 @@ extern int __use_tzfile;
 extern void __tzfile_read __P ((const char *file));
 extern int __tzfile_compute __P ((time_t timer, int use_localtime,
 				  long int *leap_correct, int *leap_hit,
-				  int *isdst, long int *offset));
+				  struct tm *tp));
 extern void __tzfile_default __P ((const char *std, const char *dst,
 				   long int stdoff, long int dstoff));
 extern char *__tzstring __P ((const char *string));
@@ -595,8 +595,6 @@ __tz_convert (const time_t *timer, int use_localtime, struct tm *tp)
 {
   long int leap_correction;
   int leap_extra_secs;
-  int isdst;
-  long int offset;
 
   if (timer == NULL)
     {
@@ -615,8 +613,7 @@ __tz_convert (const time_t *timer, int use_localtime, struct tm *tp)
   if (__use_tzfile)
     {
       if (! __tzfile_compute (*timer, use_localtime,
-			      &leap_correction, &leap_extra_secs,
-			      &isdst, &offset))
+			      &leap_correction, &leap_extra_secs, tp))
 	tp = NULL;
     }
   else
@@ -625,18 +622,20 @@ __tz_convert (const time_t *timer, int use_localtime, struct tm *tp)
 	tp = NULL;
       leap_correction = 0L;
       leap_extra_secs = 0;
-
-      isdst = (*timer >= tz_rules[0].change && *timer < tz_rules[1].change);
-      offset = tz_rules[isdst].offset;
     }
 
   if (tp)
     {
       if (use_localtime)
 	{
-	  tp->tm_isdst = isdst;
-	  tp->tm_zone = __tzname[isdst];
-	  tp->tm_gmtoff = offset;
+	  if (!__use_tzfile)
+	    {
+	      int isdst = (*timer >= tz_rules[0].change
+			   && *timer < tz_rules[1].change);
+	      tp->tm_isdst = isdst;
+	      tp->tm_zone = __tzname[isdst];
+	      tp->tm_gmtoff = tz_rules[isdst].offset;
+	    }
 	}
       else
 	{