-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.
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,
# 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))))
# 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,\
$(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
# 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
-%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
+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,
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
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.
')' \
) > $@.new
mv -f $@.new $@
-$(inst_libdir)/libpthread_nonshared.a: $(objpfx)libpthread_nonshared.a
- $(do-install)
extra-B-pthread.so = -B$(common-objpfx)linuxthreads/
+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,
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
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.
')' \
) > $@.new
mv -f $@.new $@
-$(inst_libdir)/libpthread_nonshared.a: $(objpfx)libpthread_nonshared.a
- $(do-install)
endif
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
-# 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.
$(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'` \
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
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;
--- /dev/null
+/* 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;
+}