[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commits] r18223 - in /fsf/trunk/libc: ./ elf/ sysdeps/sh/ sysdeps/sparc/ sysdeps/unix/sparc/ sysdeps/unix/sysv/linux/sparc/ sysdeps/u...



Author: eglibc
Date: Thu Apr 26 00:01:33 2012
New Revision: 18223

Log:
Import glibc-mainline for 2012-04-26

Removed:
    fsf/trunk/libc/sysdeps/unix/sparc/
Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/Makeconfig
    fsf/trunk/libc/Makerules
    fsf/trunk/libc/config.make.in
    fsf/trunk/libc/configure
    fsf/trunk/libc/configure.in
    fsf/trunk/libc/elf/dl-minimal.c
    fsf/trunk/libc/sysdeps/sh/memcpy.S
    fsf/trunk/libc/sysdeps/sh/strlen.S
    fsf/trunk/libc/sysdeps/sparc/sysdep.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sysdep.h
    fsf/trunk/libc/timezone/README
    fsf/trunk/libc/timezone/zdump.c
    fsf/trunk/libc/timezone/zic.c

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Thu Apr 26 00:01:33 2012
@@ -1,3 +1,52 @@
+2012-04-25  David S. Miller  <davem@xxxxxxxxxxxxx>
+
+	* sysdeps/unix/sparc/brk.S: Delete.
+	* sysdeps/unix/sparc/dl-brk.S: Delete.
+	* sysdeps/unix/sparc/pipe.S: Delete.
+	* sysdeps/unix/sparc/sysdep.S: Delete.
+	* sysdeps/unix/sparc/sysdep.h: Delete.
+	* sysdeps/unix/sparc/vfork.S: Delete.
+	* sysdeps/sparc/sysdep.h (SPARC_PIC_THUNK, SPARC_PIC_REG,
+	SPARC_PIC_REG_LEAF, ENTRY, END, LOC): Define.
+	* sysdeps/unix/sysv/linux/sparc/sysdep.h (ret, ret_NOERRNO,
+	ret_ERRVAL, r0, r1, MOVE): Define.
+	(JUMPTARGET): Remove.
+	* sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h: Don't include
+	sysdeps/unix/sparc/sysdep.h
+	(ENTRY, END): Remove.
+	* sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h: Likewise.
+
+2012-04-25  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* Makerules (native-compile): Use $(BUILD_LDFLAGS).
+	(ALL_BUILD_CFLAGS): Use $(BUILD_CPPFLAGS) -D_GNU_SOURCE
+	-DIS_IN_build.
+
+	* timezone/README: Update upstream location and email address for
+	tzcode and tzdata.
+	* timezone/zdump.c: Update from tzcode 2012b.
+	* timezone/zic.c: Likewise.
+
+	* configure.in (libc_cv_as_needed): Remove test.
+	* configure: Regenerated.
+	* Makeconfig [$(have-as-needed) != yes] (as-needed): Remove
+	conditional definition.
+	[$(have-as-needed) != yes] (no-as-needed): Likewise.
+	[$(have-as-needed) != yes] (libgcc_eh): Likewise.
+	* config.make.in (have-as-needed): Remove variable.
+
+2012-04-25  Siddhesh Poyarekar  <siddhesh@xxxxxxxxxx>
+	    Paul Pluzhnikov  <ppluzhnikov@xxxxxxxxxx>
+
+	* elf/dl-minimal.c (__strtoul_internal): Parse hexadecimal and octal
+	strings correctly.
+
+2012-04-25  Chung-Lin Tang  <cltang@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/sh/memcpy.S: Remove include of endian.h, change
+	preprocessor endian tests to '#ifdef __BIG_ENDIAN__'.
+	* sysdeps/sh/strlen.S: Likewise.
+
 2012-04-24  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
 
 	* sysdeps/unix/fork.S: Remove file.

Modified: fsf/trunk/libc/Makeconfig
==============================================================================
--- fsf/trunk/libc/Makeconfig (original)
+++ fsf/trunk/libc/Makeconfig Thu Apr 26 00:01:33 2012
@@ -388,13 +388,8 @@
 asm-CPPFLAGS =
 endif
 
-ifeq ($(have-as-needed),yes)
 as-needed := -Wl,--as-needed
 no-as-needed := -Wl,--no-as-needed
-else
-as-needed :=
-no-as-needed :=
-endif
 
 # Must be supported by the linker.
 no-whole-archive = -Wl,--no-whole-archive
@@ -534,11 +529,7 @@
 else
   libunwind = -lunwind
 endif
-ifneq ($(have-as-needed),yes)
- libgcc_eh := -lgcc_eh $(libunwind)
-else
- libgcc_eh := -Wl,--as-needed -lgcc_s $(libunwind) -Wl,--no-as-needed
-endif
+libgcc_eh := -Wl,--as-needed -lgcc_s $(libunwind) -Wl,--no-as-needed
 gnulib := -lgcc $(libgcc_eh)
 static-gnulib := -lgcc -lgcc_eh $(libunwind)
 libc.so-gnulib := -lgcc

Modified: fsf/trunk/libc/Makerules
==============================================================================
--- fsf/trunk/libc/Makerules (original)
+++ fsf/trunk/libc/Makerules Thu Apr 26 00:01:33 2012
@@ -1118,11 +1118,12 @@
 define native-compile
 $(make-target-directory)
 $(BUILD_CC) $($(basename $(<F))-CFLAGS) $(ALL_BUILD_CFLAGS) \
-	    $< $(OUTPUT_OPTION)
+	    $< $(OUTPUT_OPTION) $(BUILD_LDFLAGS)
 endef
 
 # We always want to use configuration definitions.
-ALL_BUILD_CFLAGS = $(BUILD_CFLAGS) -include $(common-objpfx)config.h
+ALL_BUILD_CFLAGS = $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) -D_GNU_SOURCE \
+		   -DIS_IN_build -include $(common-objpfx)config.h
 
 # Support the GNU standard name for this target.
 .PHONY: check

Modified: fsf/trunk/libc/config.make.in
==============================================================================
--- fsf/trunk/libc/config.make.in (original)
+++ fsf/trunk/libc/config.make.in Thu Apr 26 00:01:33 2012
@@ -49,7 +49,6 @@
 have-z-combreloc = @libc_cv_z_combreloc@
 have-z-execstack = @libc_cv_z_execstack@
 have-Bgroup = @libc_cv_Bgroup@
-have-as-needed = @libc_cv_as_needed@
 with-fp = @with_fp@
 old-glibc-headers = @old_glibc_headers@
 unwind-find-fde = @libc_cv_gcc_unwind_find_fde@

Modified: fsf/trunk/libc/configure
==============================================================================
--- fsf/trunk/libc/configure (original)
+++ fsf/trunk/libc/configure Thu Apr 26 00:01:33 2012
@@ -650,7 +650,6 @@
 libc_cv_z_execstack
 libc_cv_z_combreloc
 ASFLAGS_config
-libc_cv_as_needed
 libc_cv_Bgroup
 libc_cv_cc_with_libunwind
 VERSIONING
@@ -6304,34 +6303,6 @@
 $as_echo "$libc_cv_Bgroup" >&6; }
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --as-needed option" >&5
-$as_echo_n "checking for --as-needed option... " >&6; }
-if ${libc_cv_as_needed+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat > conftest.c <<EOF
-int main (void) { return 0; }
-EOF
-if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
-			      -fPIC -shared -o conftest.so conftest.c
-			      -lgcc_s -Wl,--as-needed
-			      -nostdlib 1>&5'
-  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }
-then
-  libc_cv_as_needed=yes
-else
-  libc_cv_as_needed=no
-fi
-rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_as_needed" >&5
-$as_echo "$libc_cv_as_needed" >&6; }
-
-
 ASFLAGS_config=
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether --noexecstack is desirable for .S files" >&5
 $as_echo_n "checking whether --noexecstack is desirable for .S files... " >&6; }

Modified: fsf/trunk/libc/configure.in
==============================================================================
--- fsf/trunk/libc/configure.in (original)
+++ fsf/trunk/libc/configure.in Thu Apr 26 00:01:33 2012
@@ -1519,23 +1519,6 @@
 rm -f conftest*])
 AC_SUBST(libc_cv_Bgroup)
 
-AC_CACHE_CHECK(for --as-needed option,
-	       libc_cv_as_needed, [dnl
-cat > conftest.c <<EOF
-int main (void) { return 0; }
-EOF
-if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
-			      -fPIC -shared -o conftest.so conftest.c
-			      -lgcc_s -Wl,--as-needed
-			      -nostdlib 1>&AS_MESSAGE_LOG_FD])
-then
-  libc_cv_as_needed=yes
-else
-  libc_cv_as_needed=no
-fi
-rm -f conftest*])
-AC_SUBST(libc_cv_as_needed)
-
 ASFLAGS_config=
 AC_CACHE_CHECK(whether --noexecstack is desirable for .S files,
 	       libc_cv_as_noexecstack, [dnl

Modified: fsf/trunk/libc/elf/dl-minimal.c
==============================================================================
--- fsf/trunk/libc/elf/dl-minimal.c (original)
+++ fsf/trunk/libc/elf/dl-minimal.c Thu Apr 26 00:01:33 2012
@@ -1,6 +1,5 @@
 /* Minimal replacements for basic facilities used in the dynamic linker.
-   Copyright (C) 1995-1998,2000-2002,2004-2006,2007,2009
-   Free Software Foundation, Inc.
+   Copyright (C) 1995-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -232,6 +231,7 @@
 {
   unsigned long int result = 0;
   long int sign = 1;
+  unsigned max_digit;
 
   while (*nptr == ' ' || *nptr == '\t')
     ++nptr;
@@ -253,6 +253,7 @@
 
   assert (base == 0);
   base = 10;
+  max_digit = 9;
   if (*nptr == '0')
     {
       if (nptr[1] == 'x' || nptr[1] == 'X')
@@ -261,14 +262,31 @@
 	  nptr += 2;
 	}
       else
-	base = 8;
-    }
-
-  while (*nptr >= '0' && *nptr <= '9')
-    {
-      unsigned long int digval = *nptr - '0';
-      if (result > ULONG_MAX / 10
-	  || (result == ULONG_MAX / 10 && digval > ULONG_MAX % 10))
+	{
+	  base = 8;
+	  max_digit = 7;
+	}
+    }
+
+  while (1)
+    {
+      unsigned long int digval;
+      if (*nptr >= '0' && *nptr <= '0' + max_digit)
+        digval = *nptr - '0';
+      else if (base == 16)
+        {
+	  if (*nptr >= 'a' && *nptr <= 'f')
+	    digval = *nptr - 'a' + 10;
+	  else if (*nptr >= 'A' && *nptr <= 'F')
+	    digval = *nptr - 'A' + 10;
+	  else
+	    break;
+	}
+      else
+        break;
+
+      if (result > ULONG_MAX / base
+	  || (result == ULONG_MAX / base && digval > ULONG_MAX % base))
 	{
 	  errno = ERANGE;
 	  if (endptr != NULL)

Modified: fsf/trunk/libc/sysdeps/sh/memcpy.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sh/memcpy.S (original)
+++ fsf/trunk/libc/sysdeps/sh/memcpy.S Thu Apr 26 00:01:33 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Kazumoto Kojima <kkojima@xxxxxxxxxxxxxx>
    Optimized by Toshiyasu Morita <toshiyasu.morita@xxxxxxxxxxxxxxx>
@@ -18,7 +18,6 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <sysdep.h>
-#include <endian.h>
 
 /* void *memcpy(void *dst, const void *src, size_t n);
     No overlap between the memory of DST and of SRC are assumed.  */
@@ -49,7 +48,7 @@
 
 	mov.w	@r0+,r1		/* Copy one word.  */
 	add	#-2,r6
-#if __BYTE_ORDER == __BIG_ENDIAN
+#ifdef __BIG_ENDIAN__
 	add	#1,r4
 	mov.b	r1,@r4
 	shlr8	r1
@@ -98,7 +97,7 @@
 	mov.l	@r5+,r0		/* Read first longword.  */
 	dt	r7
 	mov.l	@r5+,r1		/* Read second longword.  */
-#if __BYTE_ORDER == __BIG_ENDIAN
+#ifdef __BIG_ENDIAN__
 	/* Write first longword as byte, word, byte.  */
 	mov.b	r0,@(4,r4)
 	shlr8	r0
@@ -140,7 +139,7 @@
 	mov.l	@r5+,r0
 	dt	r7
 	mov.l	@r5+,r1
-#if __BYTE_ORDER == __BIG_ENDIAN
+#ifdef __BIG_ENDIAN__
 	mov.w	r0,@(2,r4)
 	shlr16	r0
 	mov.w	r0,@r4

Modified: fsf/trunk/libc/sysdeps/sh/strlen.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sh/strlen.S (original)
+++ fsf/trunk/libc/sysdeps/sh/strlen.S Thu Apr 26 00:01:33 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Kazumoto Kojima <kkojima@xxxxxxxxxxxxxx>
 
@@ -17,7 +17,6 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <sysdep.h>
-#include <endian.h>
 
 /* size_t strlen (const char *s)  */
 
@@ -58,7 +57,7 @@
 	add	#4, r2
 
 	add	#-4, r2
-#if __BYTE_ORDER == __BIG_ENDIAN
+#ifdef __BIG_ENDIAN__
 	swap.b	r1, r1
 	swap.w	r1, r1
 	swap.b	r1, r1

Modified: fsf/trunk/libc/sysdeps/sparc/sysdep.h
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sysdep.h (original)
+++ fsf/trunk/libc/sysdeps/sparc/sysdep.h Thu Apr 26 00:01:33 2012
@@ -42,3 +42,53 @@
 #define HWCAP_SPARC_IMA		0x00400000
 #define HWCAP_SPARC_ASI_CACHE_SPARING \
 				0x00800000
+
+#ifdef	__ASSEMBLER__
+
+#define SPARC_PIC_THUNK(reg)						\
+	.ifndef __sparc_get_pc_thunk.reg;				\
+	.section .text.__sparc_get_pc_thunk.reg,"axG",@progbits,__sparc_get_pc_thunk.reg,comdat; \
+	.align	 32;							\
+	.weak	 __sparc_get_pc_thunk.reg;				\
+	.hidden	 __sparc_get_pc_thunk.reg;				\
+	.type	 __sparc_get_pc_thunk.reg, #function;			\
+__sparc_get_pc_thunk.reg:		   				\
+	jmp	%o7 + 8;						\
+	 add	%o7, %reg, %##reg;					\
+	.previous;							\
+	.endif;
+
+/* Even when v9 we use a call sequence instead of using "rd %pc" because
+   RDPC is extremely expensive and incurs a full pipeline flush.  */
+
+#define SETUP_PIC_REG(reg)						\
+	SPARC_PIC_THUNK(reg)						\
+	sethi	%hi(_GLOBAL_OFFSET_TABLE_-4), %##reg;			\
+	call	__sparc_get_pc_thunk.reg;				\
+	 or	%##reg, %lo(_GLOBAL_OFFSET_TABLE_+4), %##reg;
+
+#define SETUP_PIC_REG_LEAF(reg, tmp)					\
+	SPARC_PIC_THUNK(reg)						\
+	sethi	%hi(_GLOBAL_OFFSET_TABLE_-4), %##reg;			\
+	mov	%o7, %##tmp;		      				\
+	call	__sparc_get_pc_thunk.reg;				\
+	 or	%##reg, %lo(_GLOBAL_OFFSET_TABLE_+4), %##reg;		\
+	mov	%##tmp, %o7;
+
+#undef ENTRY
+#define ENTRY(name)			\
+	.align	4;			\
+	.global	C_SYMBOL_NAME(name);	\
+	.type	name, @function;	\
+C_LABEL(name)				\
+	cfi_startproc;
+
+#undef END
+#define END(name)			\
+	cfi_endproc;			\
+	.size name, . - name
+
+#undef LOC
+#define LOC(name)  .L##name
+
+#endif	/* __ASSEMBLER__ */

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h Thu Apr 26 00:01:33 2012
@@ -20,7 +20,7 @@
 #ifndef _LINUX_SPARC32_SYSDEP_H
 #define _LINUX_SPARC32_SYSDEP_H 1
 
-#include <sysdeps/unix/sparc/sysdep.h>
+#include <sysdeps/unix/sysv/linux/sparc/sysdep.h>
 
 #ifdef IS_IN_rtld
 # include <dl-sysdep.h>		/* Defines RTLD_PRIVATE_ERRNO.  */
@@ -34,28 +34,7 @@
 
 #define LOADSYSCALL(x) mov __NR_##x, %g1
 
-/* Linux/SPARC uses a different trap number */
 #undef PSEUDO
-#undef PSEUDO_NOERRNO
-#undef PSEUDO_ERRVAL
-#undef PSEUDO_END
-#undef ENTRY
-#undef END
-#undef LOC
-
-#define ENTRY(name)			\
-	.align	4;			\
-	.global	C_SYMBOL_NAME(name);	\
-	.type	name, @function;	\
-C_LABEL(name)				\
-	cfi_startproc;
-
-#define END(name)			\
-	cfi_endproc;			\
-	.size name, . - name
-
-#define LOC(name)  .L##name
-
 #define PSEUDO(name, syscall_name, args)	\
 	.text;					\
 ENTRY(name);					\
@@ -66,18 +45,21 @@
 	SYSCALL_ERROR_HANDLER			\
 1:
 
+#undef PSEUDO_NOERRNO
 #define PSEUDO_NOERRNO(name, syscall_name, args)\
 	.text;					\
 ENTRY(name);					\
 	LOADSYSCALL(syscall_name);		\
 	ta		0x10;
 
+#undef PSEUDO_ERRVAL
 #define PSEUDO_ERRVAL(name, syscall_name, args)	\
 	.text;					\
 ENTRY(name);					\
 	LOADSYSCALL(syscall_name);		\
 	ta		0x10;
 
+#undef PSEUDO_END
 #define PSEUDO_END(name)			\
 	END(name)
 
@@ -141,8 +123,6 @@
 	"f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31",		\
 	"cc", "memory"
 
-#include <sysdeps/unix/sysv/linux/sparc/sysdep.h>
-
 #endif	/* __ASSEMBLER__ */
 
 /* Pointer mangling support.  */

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h Thu Apr 26 00:01:33 2012
@@ -20,7 +20,7 @@
 #ifndef _LINUX_SPARC64_SYSDEP_H
 #define _LINUX_SPARC64_SYSDEP_H 1
 
-#include <sysdeps/unix/sparc/sysdep.h>
+#include <sysdeps/unix/sysv/linux/sparc/sysdep.h>
 
 #ifdef IS_IN_rtld
 # include <dl-sysdep.h>		/* Defines RTLD_PRIVATE_ERRNO.  */
@@ -44,25 +44,7 @@
 
 #define LOADSYSCALL(x) mov __NR_##x, %g1
 
-/* Linux/SPARC uses a different trap number */
 #undef PSEUDO
-#undef PSEUDO_NOERRNO
-#undef PSEUDO_ERRVAL
-#undef PSEUDO_END
-#undef ENTRY
-#undef END
-
-#define ENTRY(name)			\
-	.align	4;			\
-	.global	C_SYMBOL_NAME(name);	\
-	.type	name, @function;	\
-C_LABEL(name)				\
-	cfi_startproc;
-
-#define END(name)			\
-	cfi_endproc;			\
-	.size name, . - name
-
 #define PSEUDO(name, syscall_name, args)	\
 	.text;					\
 ENTRY(name);					\
@@ -73,18 +55,21 @@
 	SYSCALL_ERROR_HANDLER			\
 1:
 
+#undef PSEUDO_NOERRNO
 #define	PSEUDO_NOERRNO(name, syscall_name, args)\
 	.text;					\
 ENTRY(name);					\
 	LOADSYSCALL(syscall_name);		\
 	ta		0x6d;
 
+#undef PSEUDO_ERRVAL
 #define	PSEUDO_ERRVAL(name, syscall_name, args) \
 	.text;					\
 ENTRY(name);					\
 	LOADSYSCALL(syscall_name);		\
 	ta		0x6d;
 
+#undef PSEUDO_END
 #define PSEUDO_END(name)			\
 	END(name)
 
@@ -149,8 +134,6 @@
 	"f48", "f50", "f52", "f54", "f56", "f58", "f60", "f62",		\
 	"cc", "memory"
 
-#include <sysdeps/unix/sysv/linux/sparc/sysdep.h>
-
 #endif	/* __ASSEMBLER__ */
 
 /* This is the offset from the %sp to the backing store above the

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sysdep.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sysdep.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sysdep.h Thu Apr 26 00:01:33 2012
@@ -18,6 +18,20 @@
 
 #ifndef _LINUX_SPARC_SYSDEP_H
 #define _LINUX_SPARC_SYSDEP_H 1
+
+#include <sysdeps/unix/sysdep.h>
+#include <sysdeps/sparc/sysdep.h>
+
+#ifdef __ASSEMBLER__
+
+#define	ret		retl; nop
+#define	ret_NOERRNO	retl; nop
+#define	ret_ERRVAL	retl; nop
+#define	r0		%o0
+#define	r1		%o1
+#define	MOVE(x,y)	mov x, y
+
+#else	/* __ASSEMBLER__ */
 
 #undef INLINE_SYSCALL
 #define INLINE_SYSCALL(name, nr, args...) 				\
@@ -165,9 +179,6 @@
 	__o0;								\
 })
 
-
-#ifdef __ASSEMBLER__
-# define JUMPTARGET(sym) sym
-#endif
+#endif	/* __ASSEMBLER__ */
 
 #endif /* _LINUX_SPARC_SYSDEP_H */

Modified: fsf/trunk/libc/timezone/README
==============================================================================
--- fsf/trunk/libc/timezone/README (original)
+++ fsf/trunk/libc/timezone/README Thu Apr 26 00:01:33 2012
@@ -13,5 +13,5 @@
 Please check the ChangeLog files in the top level directory for the
 version of the tzcode and tzdata packages.
 
-These packages may be found at ftp://elsie.nci.nih.gov/pub/.  Commentary
-should be addressed to tz@xxxxxxxxxxxxxxxxxx
+These packages may be found at ftp://munnari.oz.au/pub/.  Commentary
+should be addressed to tz@xxxxxxxxx

Modified: fsf/trunk/libc/timezone/zdump.c
==============================================================================
--- fsf/trunk/libc/timezone/zdump.c (original)
+++ fsf/trunk/libc/timezone/zdump.c Thu Apr 26 00:01:33 2012
@@ -3,7 +3,7 @@
 ** 2009-05-17 by Arthur David Olson.
 */
 
-static char	elsieid[] = "@(#)zdump.c	8.9";
+static char	elsieid[] = "@(#)zdump.c	8.10";
 
 /*
 ** This code has been made independent of the rest of the time
@@ -236,7 +236,9 @@
 }
 
 static void
-usage(const char *progname, FILE *stream, int status)
+usage(stream, status)
+FILE * const	stream;
+const int	status;
 {
 	(void) fprintf(stream,
 _("%s: usage is %s [ --version ] [ --help ] [ -v ] [ -c [loyear,]hiyear ] zonename ...\n\
@@ -283,7 +285,7 @@
 			(void) printf("%s\n", elsieid);
 			exit(EXIT_SUCCESS);
 		} else if (strcmp(argv[i], "--help") == 0) {
-			usage(progname, stdout, EXIT_SUCCESS);
+			usage(stdout, EXIT_SUCCESS);
 		}
 	vflag = 0;
 	cutarg = NULL;
@@ -293,7 +295,7 @@
 		else	cutarg = optarg;
 	if ((c != EOF && c != -1) ||
 		(optind == argc - 1 && strcmp(argv[optind], "=") == 0)) {
-			usage(progname, stderr, EXIT_FAILURE);
+			usage(stderr, EXIT_FAILURE);
 	}
 	if (vflag) {
 		if (cutarg != NULL) {

Modified: fsf/trunk/libc/timezone/zic.c
==============================================================================
--- fsf/trunk/libc/timezone/zic.c (original)
+++ fsf/trunk/libc/timezone/zic.c Thu Apr 26 00:01:33 2012
@@ -3,7 +3,7 @@
 ** 2006-07-17 by Arthur David Olson.
 */
 
-static char	elsieid[] = "@(#)zic.c	8.19";
+static char	elsieid[] = "@(#)zic.c	8.25";
 
 #include "private.h"
 #include "locale.h"
@@ -1621,6 +1621,53 @@
 			if (thistimei == 0)
 				writetype[0] = TRUE;
 		}
+#ifndef LEAVE_SOME_PRE_2011_SYSTEMS_IN_THE_LURCH
+		/*
+		** For some pre-2011 systems: if the last-to-be-written
+		** standard (or daylight) type has an offset different from the
+		** most recently used offset,
+		** append an (unused) copy of the most recently used type
+		** (to help get global "altzone" and "timezone" variables
+		** set correctly).
+		*/
+		{
+			register int	mrudst, mrustd, hidst, histd, type;
+
+			hidst = histd = mrudst = mrustd = -1;
+			for (i = thistimei; i < thistimelim; ++i)
+				if (isdsts[types[i]])
+					mrudst = types[i];
+				else	mrustd = types[i];
+			for (i = 0; i < typecnt; ++i)
+				if (writetype[i]) {
+					if (isdsts[i])
+						hidst = i;
+					else	histd = i;
+				}
+			if (hidst >= 0 && mrudst >= 0 && hidst != mrudst &&
+				gmtoffs[hidst] != gmtoffs[mrudst]) {
+					isdsts[mrudst] = -1;
+					type = addtype(gmtoffs[mrudst],
+						&chars[abbrinds[mrudst]],
+						TRUE,
+						ttisstds[mrudst],
+						ttisgmts[mrudst]);
+					isdsts[mrudst] = TRUE;
+					writetype[type] = TRUE;
+			}
+			if (histd >= 0 && mrustd >= 0 && histd != mrustd &&
+				gmtoffs[histd] != gmtoffs[mrustd]) {
+					isdsts[mrustd] = -1;
+					type = addtype(gmtoffs[mrustd],
+						&chars[abbrinds[mrustd]],
+						FALSE,
+						ttisstds[mrustd],
+						ttisgmts[mrustd]);
+					isdsts[mrustd] = FALSE;
+					writetype[type] = TRUE;
+			}
+		}
+#endif /* !defined LEAVE_SOME_PRE_2011_SYSTEMS_IN_THE_LURCH */
 		thistypecnt = 0;
 		for (i = 0; i < typecnt; ++i)
 			typemap[i] = writetype[i] ?  thistypecnt++ : -1;
@@ -1835,16 +1882,16 @@
 		register int	week;
 
 		if (rp->r_dycode == DC_DOWGEQ) {
+			if ((rp->r_dayofmonth % DAYSPERWEEK) != 1)
+				return -1;
 			week = 1 + rp->r_dayofmonth / DAYSPERWEEK;
-			if ((week - 1) * DAYSPERWEEK + 1 != rp->r_dayofmonth)
-				return -1;
 		} else if (rp->r_dycode == DC_DOWLEQ) {
 			if (rp->r_dayofmonth == len_months[1][rp->r_month])
 				week = 5;
 			else {
-				week = 1 + rp->r_dayofmonth / DAYSPERWEEK;
-				if (week * DAYSPERWEEK - 1 != rp->r_dayofmonth)
+				if ((rp->r_dayofmonth % DAYSPERWEEK) != 0)
 					return -1;
+				week = rp->r_dayofmonth / DAYSPERWEEK;
 			}
 		} else	return -1;	/* "cannot happen" */
 		(void) sprintf(result, "M%d.%d.%d",
@@ -1921,7 +1968,7 @@
 		if (stdrp != NULL && stdrp->r_hiyear == 2037)
 			return;
 	}
-	if (stdrp == NULL && zp->z_nrules != 0)
+	if (stdrp == NULL && (zp->z_nrules != 0 || zp->z_stdoff != 0))
 		return;
 	abbrvar = (stdrp == NULL) ? "" : stdrp->r_abbrvar;
 	doabbr(result, zp->z_format, abbrvar, FALSE, TRUE);
@@ -1972,6 +2019,7 @@
 	register char *			envvar;
 	register int			max_abbr_len;
 	register int			max_envvar_len;
+	register int			prodstic; /* all rules are min to max */
 
 	max_abbr_len = 2 + max_format_len + max_abbrvar_len;
 	max_envvar_len = 2 * max_abbr_len + 5 * 9;
@@ -1986,6 +2034,7 @@
 	timecnt = 0;
 	typecnt = 0;
 	charcnt = 0;
+	prodstic = zonecount == 1;
 	/*
 	** Thanks to Earl Chew
 	** for noting the need to unconditionally initialize startttisstd.
@@ -2007,6 +2056,8 @@
 				updateminmax(rp->r_loyear);
 			if (rp->r_hiwasnum)
 				updateminmax(rp->r_hiyear);
+			if (rp->r_lowasnum || rp->r_hiwasnum)
+				prodstic = FALSE;
 		}
 	}
 	/*
@@ -2029,6 +2080,16 @@
 		if (max_year <= INT_MAX - YEARSPERREPEAT)
 			max_year += YEARSPERREPEAT;
 		else	max_year = INT_MAX;
+		/*
+		** Regardless of any of the above,
+		** for a "proDSTic" zone which specifies that its rules
+		** always have and always will be in effect,
+		** we only need one cycle to define the zone.
+		*/
+		if (prodstic) {
+			min_year = 1900;
+			max_year = min_year + YEARSPERREPEAT;
+		}
 	}
 	/*
 	** For the benefit of older systems,

_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits