[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r1279 - in /fsf/trunk/libc: ./ malloc/ posix/ stdio-common/ sysdeps/i386/bits/ sysdeps/x86_64/bits/
- To: commits@xxxxxxxxxx
- Subject: [commits] r1279 - in /fsf/trunk/libc: ./ malloc/ posix/ stdio-common/ sysdeps/i386/bits/ sysdeps/x86_64/bits/
- From: eglibc@xxxxxxxxxx
- Date: Thu, 25 Jan 2007 08:01:53 -0000
Author: eglibc
Date: Thu Jan 25 00:01:53 2007
New Revision: 1279
Log:
Import glibc-mainline for 2007-01-25
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/malloc/mtrace.c
fsf/trunk/libc/posix/wordexp.c
fsf/trunk/libc/stdio-common/_itoa.h
fsf/trunk/libc/sysdeps/i386/bits/byteswap.h
fsf/trunk/libc/sysdeps/x86_64/bits/byteswap.h
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Thu Jan 25 00:01:53 2007
@@ -1,3 +1,15 @@
+2007-01-24 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * stdio-common/_itoa.h: Define _itoa and _fitoa for 64-bit platforms.
+ * malloc/mtrace.c: Revert last change.
+ * posix/wordexp.c: Likewise.
+
+2007-01-24 Jakub Jelinek <jakub@xxxxxxxxxx>
+
+ * sysdeps/i386/bits/byteswap.h (__bswap_32): Add __nocona__, __core2__
+ and __geode__ to the list of i486+ CPUs.
+ * sysdeps/x86_64/bits/byteswap.h (__bswap_32): Likewise.
+
2007-01-23 Ulrich Drepper <drepper@xxxxxxxxxx>
* stdio-common/_itoa.c: Include <limits.h>.
Modified: fsf/trunk/libc/malloc/mtrace.c
==============================================================================
--- fsf/trunk/libc/malloc/mtrace.c (original)
+++ fsf/trunk/libc/malloc/mtrace.c Thu Jan 25 00:01:53 2007
@@ -1,5 +1,5 @@
/* More debugging hooks for `malloc'.
- Copyright (C) 1991-1994,1996-2004, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1991-1994,1996-2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written April 2, 1991 by John Gilmore of Cygnus Support.
Based on mcheck.c by Mike Haertel.
@@ -28,7 +28,6 @@
#include <dlfcn.h>
#include <fcntl.h>
-#include <limits.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -114,20 +113,15 @@
buf = alloca (len + 6 + 2 * sizeof (void *));
buf[0] = '(';
-
- char *cp = __stpcpy (__mempcpy (buf + 1, info.dli_sname, len),
- caller >= (__ptr_t) info.dli_saddr
- ? "+0x" : "-0x");
- intptr_t offset = (caller >= (const __ptr_t) info.dli_saddr
- ? caller - (const __ptr_t) info.dli_saddr
- : (const __ptr_t) info.dli_saddr - caller);
-# if LLONG_MAX == LONG_MAX
- cp = _fitoa_word (offset, cp, 16, 0);
-# else
- cp = _fitoa (offset, cp, 16, 0);
-# endif
-
- __stpcpy (cp, ")");
+ __stpcpy (_fitoa (caller >= (const __ptr_t) info.dli_saddr
+ ? caller - (const __ptr_t) info.dli_saddr
+ : (const __ptr_t) info.dli_saddr - caller,
+ __stpcpy (__mempcpy (buf + 1, info.dli_sname,
+ len),
+ caller >= (__ptr_t) info.dli_saddr
+ ? "+0x" : "-0x"),
+ 16, 0),
+ ")");
}
fprintf (mallstream, "@ %s%s%s[%p] ",
Modified: fsf/trunk/libc/posix/wordexp.c
==============================================================================
--- fsf/trunk/libc/posix/wordexp.c (original)
+++ fsf/trunk/libc/posix/wordexp.c Thu Jan 25 00:01:53 2007
@@ -1,5 +1,5 @@
/* POSIX.2 wordexp implementation.
- Copyright (C) 1997-2003, 2005, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1997-2002, 2003, 2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Tim Waugh <tim@xxxxxxxxxxxxxxxxxxxx>.
@@ -25,7 +25,6 @@
#include <fnmatch.h>
#include <glob.h>
#include <libintl.h>
-#include <limits.h>
#include <paths.h>
#include <pwd.h>
#include <signal.h>
@@ -758,13 +757,8 @@
convertme = numresult;
result[20] = '\0';
- char *numstr;
-#if LLONG_MAX == LONG_MAX
- numstr = _itoa_word (convertme, &result[20], 10, 0);
-#else
- numstr = _itoa (convertme, &result[20], 10, 0);
-#endif
- *word = w_addstr (*word, word_length, max_length, numstr);
+ *word = w_addstr (*word, word_length, max_length,
+ _itoa (convertme, &result[20], 10, 0));
free (expr);
return *word ? 0 : WRDE_NOSPACE;
}
Modified: fsf/trunk/libc/stdio-common/_itoa.h
==============================================================================
--- fsf/trunk/libc/stdio-common/_itoa.h (original)
+++ fsf/trunk/libc/stdio-common/_itoa.h Thu Jan 25 00:01:53 2007
@@ -1,5 +1,5 @@
/* Internal function for converting integers to ASCII.
- Copyright (C) 1994,95,96,97,98,99,2002,2003 Free Software Foundation, Inc.
+ Copyright (C) 1994-1999,2002,2003,2007 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
@@ -19,7 +19,8 @@
#ifndef _ITOA_H
#define _ITOA_H
-#include <sys/cdefs.h>
+
+#include <limits.h>
/* Convert VALUE into ASCII in base BASE (2..36).
Write backwards starting the character just before BUFLIM.
@@ -81,4 +82,12 @@
extern char *_fitoa (unsigned long long value, char *buf, unsigned int base,
int upper_case) attribute_hidden;
+#if LONG_MAX == LLONG_MAX
+/* No need for special long long versions. */
+# define _itoa(value, buf, base, upper_case) \
+ _itoa_word (value, buf, base, upper_case)
+# define _fitoa(value, buf, base, upper_case) \
+ _fitoa_word (value, buf, base, upper_case)
+#endif
+
#endif /* itoa.h */
Modified: fsf/trunk/libc/sysdeps/i386/bits/byteswap.h
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/bits/byteswap.h (original)
+++ fsf/trunk/libc/sysdeps/i386/bits/byteswap.h Thu Jan 25 00:01:53 2007
@@ -1,5 +1,6 @@
/* Macros to swap the order of bytes in integer values.
- Copyright (C) 1997,1998,2000,2002,2003,2006 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2000, 2002, 2003, 2006, 2007
+ 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
@@ -66,7 +67,8 @@
`bswap' opcode. On i386 we have to use three instructions. */
# if !defined __i486__ && !defined __pentium__ && !defined __pentiumpro__ \
&& !defined __pentium4__ && !defined __k8__ && !defined __athlon__ \
- && !defined __k6__
+ && !defined __k6__ && !defined __nocona__ && !defined __core2__ \
+ && !defined __geode__
# define __bswap_32(x) \
(__extension__ \
({ register unsigned int __v, __x = (x); \
Modified: fsf/trunk/libc/sysdeps/x86_64/bits/byteswap.h
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/bits/byteswap.h (original)
+++ fsf/trunk/libc/sysdeps/x86_64/bits/byteswap.h Thu Jan 25 00:01:53 2007
@@ -1,5 +1,6 @@
/* Macros to swap the order of bytes in integer values.
- Copyright (C) 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2000, 2002, 2003, 2007
+ 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
@@ -59,7 +60,8 @@
# if __WORDSIZE == 64 || (defined __i486__ || defined __pentium__ \
|| defined __pentiumpro__ || defined __pentium4__ \
|| defined __k8__ || defined __athlon__ \
- || defined __k6__)
+ || defined __k6__ || defined __nocona__ \
+ || defined __core2__ || defined __geode__)
/* To swap the bytes in a word the i486 processors and up provide the
`bswap' opcode. On i386 we have to use three instructions. */
# define __bswap_32(x) \