about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2004-12-03 10:17:07 +0000
committerJakub Jelinek <jakub@redhat.com>2004-12-03 10:17:07 +0000
commit2a561bf1e19f064e2f5689e961ea1f8e51bc14a0 (patch)
tree91e08d15ba52846a86a5b0d7a12dcb984c28ccd9
parentaa8a3b59b1603ce0855e5130cb060318c8e8c78d (diff)
downloadglibc-2a561bf1e19f064e2f5689e961ea1f8e51bc14a0.tar.gz
glibc-2a561bf1e19f064e2f5689e961ea1f8e51bc14a0.tar.xz
glibc-2a561bf1e19f064e2f5689e961ea1f8e51bc14a0.zip
Updated to fedora-glibc-20041203T0935
-rw-r--r--ChangeLog31
-rw-r--r--extra-lib.mk26
-rw-r--r--fedora/branch.mk4
-rw-r--r--fedora/glibc.spec.in2
-rw-r--r--linuxthreads/ChangeLog13
-rw-r--r--linuxthreads/Makefile11
-rw-r--r--nptl/ChangeLog14
-rw-r--r--nptl/Makefile9
-rw-r--r--stdlib/stdlib.h2
-rw-r--r--sysdeps/gnu/Makefile3
-rw-r--r--time/Makefile3
-rw-r--r--time/mktime.c3
-rw-r--r--time/tst-mktime3.c50
13 files changed, 135 insertions, 36 deletions
diff --git a/ChangeLog b/ChangeLog
index 677fdf054c..544ae7e21a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,14 +1,37 @@
-2004-11-29  Jakub Jelinek  <jakub@redhat.com>
+2004-12-02  Roland McGrath  <roland@redhat.com>
 
-	* stdlib/strtod_l.c (INTERNAL (__STRTOF)): If densize > 2
-	and numsize < densize, always shift num up by empty + 1
-	limbs.
+	* extra-lib.mk (object-suffixes-$(lib)): Add .oS when
+	$(lib)-static-only-routines is nonempty.
+	(extra-objs, o-iterator.mk rule): Filter out .oS from generators.
+	Add a special rule for .oS objects -> _nonshared.a library.
+
+2004-12-01  Jakub Jelinek  <jakub@redhat.com>
+
+	* time/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
+	convert T2, not T.
+	* time/Makefile (tests): Add tst-mktime3.
+	* time/tst-mktime3.c: New test.
+
+2004-12-01  Jakub Jelinek  <jakub@redhat.com>
+
+	* stdlib/stdlib.h (realpath): Remove nonnull attribute.
 
 	* posix/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
 	normal_bracket label.
 
 	* time/tst-mktime2.c (bigtime_test): Initialize tm.tm_isdst to -1.
 
+2004-12-01  Roland McGrath  <roland@redhat.com>
+
+	* sysdeps/gnu/Makefile ($(objpfx)errlist-compat.c):
+	Do $(make-target-directory).
+
+2004-11-29  Jakub Jelinek  <jakub@redhat.com>
+
+	* stdlib/strtod_l.c (INTERNAL (__STRTOF)): If densize > 2
+	and numsize < densize, always shift num up by empty + 1
+	limbs.
+
 2004-11-29  Roland McGrath  <roland@redhat.com>
 
 	* posix/confstr.c: Avoid punctuation in #error text.
diff --git a/extra-lib.mk b/extra-lib.mk
index 5428523e06..775eb23cdd 100644
--- a/extra-lib.mk
+++ b/extra-lib.mk
@@ -11,6 +11,12 @@ extra-libs-left := $(filter-out $(lib),$(extra-libs-left))
 
 object-suffixes-$(lib) := $(filter-out $($(lib)-inhibit-o),$(object-suffixes))
 
+ifneq (,$($(lib)-static-only-routines))
+ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version)))
+object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS)
+endif
+endif
+
 ifneq (,$(object-suffixes-$(lib)))
 
 # Make sure these are simply-expanded variables before we append to them,
@@ -23,7 +29,7 @@ all-$(lib)-routines := $($(lib)-routines) $($(lib)-sysdep_routines)
 
 # Add each flavor of library to the lists of things to build and install.
 install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
-extra-objs += $(foreach o,$(object-suffixes-$(lib):.os=),\
+extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\
 			$(patsubst %,%$o,$(filter-out \
 					   $($(lib)-shared-only-routines),\
 					   $(all-$(lib)-routines))))
@@ -51,7 +57,7 @@ endif
 
 
 # Use o-iterator.mk to generate a rule for each flavor of library.
-ifneq (,$(filter-out .os,$(object-suffixes-$(lib))))
+ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib))))
 define o-iterator-doit
 $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
   $(patsubst %,$(objpfx)%$o,\
@@ -59,13 +65,23 @@ $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
 			  $(all-$(lib)-routines))); \
 	$$(build-extra-lib)
 endef
-object-suffixes-left = $(object-suffixes-$(lib):.os=)
-include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-$(lib):.os=))
+object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib)))
+include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
 endif
 
 ifneq (,$(filter .os,$(object-suffixes-$(lib))))
 $(objpfx)$(patsubst %,$(libtype.os),$(lib:lib%=%)): \
-  $(all-$(lib)-routines:%=$(objpfx)%.os)
+  $(patsubst %,$(objpfx)%.os,\
+	     $(filter-out $($(lib)-static-only-routines),\
+			  $(all-$(lib)-routines)))
+	$(build-extra-lib)
+endif
+
+ifneq (,$(filter .oS,$(object-suffixes-$(lib))))
+$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \
+  $(patsubst %,$(objpfx)%.oS,\
+	     $(filter $($(lib)-static-only-routines),\
+		      $(all-$(lib)-routines)))
 	$(build-extra-lib)
 endif
 
diff --git a/fedora/branch.mk b/fedora/branch.mk
index 9b5e669da3..e1a6258d28 100644
--- a/fedora/branch.mk
+++ b/fedora/branch.mk
@@ -1,5 +1,5 @@
 # This file is updated automatically by Makefile.
 glibc-branch := fedora
 glibc-base := HEAD
-fedora-sync-date := 2004-11-30 06:24 UTC
-fedora-sync-tag := fedora-glibc-20041130T0624
+fedora-sync-date := 2004-12-03 09:35 UTC
+fedora-sync-tag := fedora-glibc-20041203T0935
diff --git a/fedora/glibc.spec.in b/fedora/glibc.spec.in
index fa2c6ccc50..fb44356dc4 100644
--- a/fedora/glibc.spec.in
+++ b/fedora/glibc.spec.in
@@ -1,4 +1,4 @@
-%define glibcrelease 86
+%define glibcrelease 87
 %define auxarches i586 i686 athlon sparcv9 alphaev6
 %define prelinkarches noarch
 %define nptlarches i386 i686 athlon x86_64 ia64 s390 s390x sparcv9 ppc ppc64
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index ca2f39ee5a..a24d734fc2 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -1,3 +1,16 @@
+2004-12-02  Roland McGrath  <roland@redhat.com>
+
+	* Makefile (libpthread-nonshared): Variable removed.
+	($(objpfx)libpthread_nonshared.a): Target removed.
+	($(inst_libdir)/libpthread_nonshared.a): Likewise.
+	These are now handled by generic magic from
+	libpthread-static-only-routines being set.
+
+2004-11-04  Roland McGrath  <roland@redhat.com>
+
+	* sysdeps/pthread/getcpuclockid.c (pthread_getcpuclockid)
+	[__NR_clock_getres]: Use kernel-supplied CPU clocks if available.
+
 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
 
 	* sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
diff --git a/linuxthreads/Makefile b/linuxthreads/Makefile
index 75e6852733..f4c9f2a916 100644
--- a/linuxthreads/Makefile
+++ b/linuxthreads/Makefile
@@ -63,8 +63,6 @@ omit-deps = $(unix-syscalls:%=ptw-%)
 libpthread-shared-only-routines = pt-allocrtsig
 libpthread-static-only-routines = pthread_atfork
 
-libpthread-nonshared = pthread_atfork
-
 linuxthreads-CPPFLAGS = -DIS_IN_linuxthreads=1
 
 CFLAGS-pthread_atfork.c = -DNOT_IN_libc
@@ -82,13 +80,6 @@ CFLAGS-tst-cancel.c = -fno-inline -fno-inline-functions
 include ../Makeconfig
 
 ifeq ($(build-shared),yes)
-others: $(objpfx)libpthread_nonshared.a
-endif
-
-$(objpfx)libpthread_nonshared.a: $(addprefix $(objpfx),$(addsuffix .os,$(libpthread-nonshared)))
-	$(AR) $(ARFLAGS) $@ $^
-
-ifeq ($(build-shared),yes)
 
 # Set the `multidir' variable by grabbing the variable from the compiler.
 # We do it once and save the result in a generated makefile.
@@ -180,8 +171,6 @@ $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
 	      ')' \
 	) > $@.new
 	mv -f $@.new $@
-$(inst_libdir)/libpthread_nonshared.a: $(objpfx)libpthread_nonshared.a
-	$(do-install)
 
 
 extra-B-pthread.so = -B$(common-objpfx)linuxthreads/
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 9e193981de..fdbfde38fb 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,17 @@
+2004-12-02  Roland McGrath  <roland@redhat.com>
+
+	* Makefile (libpthread-nonshared): Variable removed.
+	($(objpfx)libpthread_nonshared.a): Target removed.
+	($(inst_libdir)/libpthread_nonshared.a): Likewise.
+	These are now handled by generic magic from
+	libpthread-static-only-routines being set.
+
+2004-11-17  Roland McGrath  <roland@redhat.com>
+
+	* sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
+	CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
+	translating to the kernel clockid_t for our own process/thread clock.
+
 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
 
 	* sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
diff --git a/nptl/Makefile b/nptl/Makefile
index 7152144609..d677318d00 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -125,8 +125,6 @@ libpthread-routines = init vars events version \
 libpthread-shared-only-routines = version pt-allocrtsig unwind-forcedunwind
 libpthread-static-only-routines = pthread_atfork
 
-libpthread-nonshared = pthread_atfork
-
 CFLAGS-pthread_atfork.c = -DNOT_IN_libc
 
 # Since cancellation handling is in large parts handled using exceptions
@@ -301,13 +299,8 @@ $(test-modules): $(objpfx)%.so: $(objpfx)%.os $(common-objpfx)shlib.lds
 ifeq ($(build-shared),yes)
 # Build all the modules even when not actually running test programs.
 tests: $(test-modules)
-
-others: $(objpfx)libpthread_nonshared.a
 endif
 
-$(objpfx)libpthread_nonshared.a: $(addprefix $(objpfx),$(addsuffix .os,$(libpthread-nonshared)))
-	$(AR) $(ARFLAGS) $@ $^
-
 ifeq ($(build-shared),yes)
 
 # Set the `multidir' variable by grabbing the variable from the compiler.
@@ -378,8 +371,6 @@ $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
 	      ')' \
 	) > $@.new
 	mv -f $@.new $@
-$(inst_libdir)/libpthread_nonshared.a: $(objpfx)libpthread_nonshared.a
-	$(do-install)
 endif
 
 
diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index 4ef32ac782..1bda32262b 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -747,7 +747,7 @@ extern char *canonicalize_file_name (__const char *__name)
    ENAMETOOLONG; if the name fits in fewer than PATH_MAX chars, returns the
    name in RESOLVED.  */
 extern char *realpath (__const char *__restrict __name,
-		       char *__restrict __resolved) __THROW __nonnull ((1));
+		       char *__restrict __resolved) __THROW;
 #endif
 
 
diff --git a/sysdeps/gnu/Makefile b/sysdeps/gnu/Makefile
index 0fc33213ae..a0b3e6e420 100644
--- a/sysdeps/gnu/Makefile
+++ b/sysdeps/gnu/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1996,1997,1998,1999,2001,2002,2003
+# Copyright (C) 1996,1997,1998,1999,2001,2002,2003,2004
 #	Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 
@@ -40,6 +40,7 @@ else
 $(objpfx)errlist-compat.c: errlist.c $(..)sysdeps/gnu/errlist-compat.awk \
 			   $(before-compile)
 endif
+	$(make-target-directory)
 	$(AWK) -v maxerr=`\
 	  $(CC) -S $(CPPFLAGS) $(CFLAGS) -DNOT_IN_libc -DEMIT_ERR_MAX $< -o - \
 	  | sed -n 's/^.*@@@[^0-9]*\([0-9]*\)[^0-9]*@@@.*$$/\1/p'` \
diff --git a/time/Makefile b/time/Makefile
index cb6ce4413d..7acc964fdc 100644
--- a/time/Makefile
+++ b/time/Makefile
@@ -34,7 +34,8 @@ aux :=	    era alt_digit lc-time-cleanup
 distribute := datemsk
 
 tests	:= test_time clocktest tst-posixtz tst-strptime tst_wcsftime \
-	   tst-getdate tst-mktime tst-mktime2 tst-ftime_l tst-strftime
+	   tst-getdate tst-mktime tst-mktime2 tst-ftime_l tst-strftime \
+	   tst-mktime3
 
 include ../Rules
 
diff --git a/time/mktime.c b/time/mktime.c
index 280f5f47d5..c6ae56ee60 100644
--- a/time/mktime.c
+++ b/time/mktime.c
@@ -463,8 +463,9 @@ __mktime_internal (struct tm *tp,
       t2 = t1 + sec_adjustment;
       if (((t1 < t) != (sec_requested < 0))
 	  | ((t2 < t1) != (sec_adjustment < 0))
-	  | ! (*convert) (&t, &tm))
+	  | ! (*convert) (&t2, &tm))
 	return -1;
+      t = t2;
     }
 
   *tp = tm;
diff --git a/time/tst-mktime3.c b/time/tst-mktime3.c
new file mode 100644
index 0000000000..60d0e0b32c
--- /dev/null
+++ b/time/tst-mktime3.c
@@ -0,0 +1,50 @@
+/* Test program for mktime bugs with out-of-range tm_sec values.  */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <time.h>
+
+struct tm tests[] =
+{
+  { .tm_sec = -1, .tm_mday = 1, .tm_year = 104 },
+  { .tm_sec = 65, .tm_min = 59, .tm_hour = 23, .tm_mday = 31,
+    .tm_mon = 11, .tm_year = 101 }
+};
+struct tm expected[] =
+{
+  { .tm_sec = 59, .tm_min = 59, .tm_hour = 23, .tm_mday = 31,
+    .tm_mon = 11, .tm_year = 103, .tm_wday = 3, .tm_yday = 364 },
+  { .tm_sec = 5, .tm_mday = 1, .tm_year = 102, .tm_wday = 2 }
+};
+
+int
+main (void)
+{
+  setenv ("TZ", "UTC", 1);
+  int i;
+  for (i = 0; i < sizeof (tests) / sizeof (tests[0]); ++i)
+    {
+      if (mktime (&tests[i]) < 0)
+	{
+	  printf ("mktime %d failed\n", i);
+	  return 1;
+	}
+#define CHECK(name) \
+      if (tests[i].name != expected[i].name)			\
+	{							\
+	  printf ("test %d " #name " got %d expected %d\n",	\
+		  i, tests[i].name, expected[i].name);		\
+	  return 1;						\
+	}
+      CHECK (tm_sec)
+      CHECK (tm_min)
+      CHECK (tm_hour)
+      CHECK (tm_mday)
+      CHECK (tm_mon)
+      CHECK (tm_year)
+      CHECK (tm_wday)
+      CHECK (tm_yday)
+      CHECK (tm_isdst)
+    }
+  return 0;
+}