[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commits] r17900 - in /fsf/trunk/libc: ./ bits/ iconvdata/ manual/ string/ sysdeps/i386/bits/ sysdeps/s390/bits/ sysdeps/x86_64/bits/
- To: commits@xxxxxxxxxx
- Subject: [Commits] r17900 - in /fsf/trunk/libc: ./ bits/ iconvdata/ manual/ string/ sysdeps/i386/bits/ sysdeps/s390/bits/ sysdeps/x86_64/bits/
- From: eglibc@xxxxxxxxxx
- Date: Wed, 04 Apr 2012 00:02:22 -0000
Author: eglibc
Date: Wed Apr 4 00:02:21 2012
New Revision: 17900
Log:
Import glibc-mainline for 2012-04-04
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/NEWS
fsf/trunk/libc/bits/byteswap.h
fsf/trunk/libc/iconvdata/tcvn5712-1.c
fsf/trunk/libc/manual/setjmp.texi
fsf/trunk/libc/string/byteswap.h
fsf/trunk/libc/string/endian.h
fsf/trunk/libc/sysdeps/i386/bits/byteswap.h
fsf/trunk/libc/sysdeps/s390/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 Wed Apr 4 00:02:21 2012
@@ -1,3 +1,29 @@
+2012-04-03 Andreas Jaeger <aj@xxxxxxx>
+
+ [BZ # 13938]
+ * manual/setjmp.texi (System V contexts): Fix sentence.
+
+ [BZ #13926]
+ * sysdeps/i386/bits/byteswap.h [!__GNUC__](__bswap_constant_64):
+ New macro for this case.
+ [!__GNUC__] (__bswap_64): New inline function for this case.
+ * sysdeps/x86_64/bits/byteswap.h: Likewise.
+ * bits/byteswap.h: Likewise.
+ * sysdeps/s390/bits/byteswap.h: [!__GNUC__] (__bswap_64): Use
+ ull, guard with __GLIBC_HAVE_LONG_LONG.
+
+ * string/endian.h (htobe64,htole64,be64toh,le64toh): Guard with
+ __GLIBC_HAVE_LONG_LONG.
+
+ * string/byteswap.h (bswap_64): Guard with __GLIBC_HAVE_LONG_LONG.
+ Include <features.h> for __GLIBC_HAVE_LONG_LONG.
+
+2012-04-02 Tulio Magno Quites Machado Filho <tuliom@xxxxxxxxxxxxxxxxxx>
+
+ [BZ #13691]
+ * iconvdata/tcvn5712-1.c (FROM_LOOP): Test end of input using
+ inptr and inend, rather than using last_ch.
+
2012-04-02 David S. Miller <davem@xxxxxxxxxxxxx>
With help from Paul Eggert, Carlos O'Donell, and Roland McGrath.
Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Wed Apr 4 00:02:21 2012
@@ -18,7 +18,8 @@
13618, 13637, 13656, 13658, 13673, 13691, 13695, 13704, 13706, 13726,
13738, 13760, 13761, 13786, 13792, 13806, 13824, 13840, 13841, 13844,
13846, 13851, 13852, 13854, 13871, 13879, 13883, 13892, 13910, 13911,
- 13912, 13913, 13915, 13916, 13917, 13918, 13919, 13920, 13921, 13928
+ 13912, 13913, 13915, 13916, 13917, 13918, 13919, 13920, 13921, 13926,
+ 13928, 13938
* ISO C11 support:
Modified: fsf/trunk/libc/bits/byteswap.h
==============================================================================
--- fsf/trunk/libc/bits/byteswap.h (original)
+++ fsf/trunk/libc/bits/byteswap.h Wed Apr 4 00:02:21 2012
@@ -1,6 +1,5 @@
/* Macros to swap the order of bytes in integer values.
- Copyright (C) 1997,1998,2000-2002,2005,2008,2011
- Free Software Foundation, Inc.
+ Copyright (C) 1997-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
@@ -82,6 +81,22 @@
__r.__l[1] = __bswap_32 (__w.__l[0]); \
} \
__r.__ll; }))
+#elif __GLIBC_HAVE_LONG_LONG
+# define __bswap_constant_64(x) \
+ ((((x) & 0xff00000000000000ull) >> 56) \
+ | (((x) & 0x00ff000000000000ull) >> 40) \
+ | (((x) & 0x0000ff0000000000ull) >> 24) \
+ | (((x) & 0x000000ff00000000ull) >> 8) \
+ | (((x) & 0x00000000ff000000ull) << 8) \
+ | (((x) & 0x0000000000ff0000ull) << 24) \
+ | (((x) & 0x000000000000ff00ull) << 40) \
+ | (((x) & 0x00000000000000ffull) << 56))
+
+static __inline unsigned long long int
+__bswap_64 (unsigned long long int __bsx)
+{
+ return __bswap_constant_64 (__bsx);
+}
#endif
#endif /* _BITS_BYTESWAP_H */
Modified: fsf/trunk/libc/iconvdata/tcvn5712-1.c
==============================================================================
--- fsf/trunk/libc/iconvdata/tcvn5712-1.c (original)
+++ fsf/trunk/libc/iconvdata/tcvn5712-1.c Wed Apr 4 00:02:21 2012
@@ -378,8 +378,9 @@
/* Determine whether there is a buffered character pending. */ \
last_ch = *statep >> 3; \
\
- /* We have to buffer ch if it is a possible match in comp_table_data. */ \
- must_buffer_ch = last_ch && (ch >= 0x0041 && ch <= 0x01b0); \
+ /* We have to buffer ch if it is a possible match in comp_table_data \
+ and if it isn't the last char of the string. */ \
+ must_buffer_ch = (ch >= 0x0041 && ch <= 0x01b0) && (inptr + 1 != inend); \
\
if (last_ch) \
{ \
Modified: fsf/trunk/libc/manual/setjmp.texi
==============================================================================
--- fsf/trunk/libc/manual/setjmp.texi (original)
+++ fsf/trunk/libc/manual/setjmp.texi Wed Apr 4 00:02:21 2012
@@ -216,13 +216,14 @@
@node System V contexts,, Non-Local Exits and Signals, Non-Local Exits
@section Complete Context Control
-The Unix standard one more set of function to control the execution path
-and these functions are more powerful than those discussed in this
-chapter so far. These function were part of the original @w{System V}
-API and by this route were added to the Unix API. Beside on branded
-Unix implementations these interfaces are not widely available. Not all
-platforms and/or architectures @theglibc{} is available on provide
-this interface. Use @file{configure} to detect the availability.
+The Unix standard provides one more set of functions to control the
+execution path and these functions are more powerful than those
+discussed in this chapter so far. These function were part of the
+original @w{System V} API and by this route were added to the Unix
+API. Beside on branded Unix implementations these interfaces are not
+widely available. Not all platforms and/or architectures @theglibc{}
+is available on provide this interface. Use @file{configure} to
+detect the availability.
Similar to the @code{jmp_buf} and @code{sigjmp_buf} types used for the
variables to contain the state of the @code{longjmp} functions the
Modified: fsf/trunk/libc/string/byteswap.h
==============================================================================
--- fsf/trunk/libc/string/byteswap.h (original)
+++ fsf/trunk/libc/string/byteswap.h Wed Apr 4 00:02:21 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 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
@@ -18,6 +18,8 @@
#ifndef _BYTESWAP_H
#define _BYTESWAP_H 1
+#include <features.h>
+
/* Get the machine specific, optimized definitions. */
#include <bits/byteswap.h>
@@ -31,7 +33,7 @@
/* Return a value with all bytes in the 32 bit argument swapped. */
#define bswap_32(x) __bswap_32 (x)
-#if defined __GNUC__ && __GNUC__ >= 2
+#if __GLIBC_HAVE_LONG_LONG
/* Return a value with all bytes in the 64 bit argument swapped. */
# define bswap_64(x) __bswap_64 (x)
#endif
Modified: fsf/trunk/libc/string/endian.h
==============================================================================
--- fsf/trunk/libc/string/endian.h (original)
+++ fsf/trunk/libc/string/endian.h Wed Apr 4 00:02:21 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1996, 1997, 2000, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 1992-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
@@ -70,10 +70,13 @@
# define be32toh(x) __bswap_32 (x)
# define le32toh(x) (x)
-# define htobe64(x) __bswap_64 (x)
-# define htole64(x) (x)
-# define be64toh(x) __bswap_64 (x)
-# define le64toh(x) (x)
+# if __GLIBC_HAVE_LONG_LONG
+# define htobe64(x) __bswap_64 (x)
+# define htole64(x) (x)
+# define be64toh(x) __bswap_64 (x)
+# define le64toh(x) (x)
+# endif
+
# else
# define htobe16(x) (x)
# define htole16(x) __bswap_16 (x)
@@ -85,10 +88,12 @@
# define be32toh(x) (x)
# define le32toh(x) __bswap_32 (x)
-# define htobe64(x) (x)
-# define htole64(x) __bswap_64 (x)
-# define be64toh(x) (x)
-# define le64toh(x) __bswap_64 (x)
+# if __GLIBC_HAVE_LONG_LONG
+# define htobe64(x) (x)
+# define htole64(x) __bswap_64 (x)
+# define be64toh(x) (x)
+# define le64toh(x) __bswap_64 (x)
+# endif
# endif
#endif
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 Wed Apr 4 00:02:21 2012
@@ -1,6 +1,5 @@
/* Macros to swap the order of bytes in integer values.
- Copyright (C) 1997, 1998, 2000, 2002, 2003, 2006, 2007, 2008, 2010, 2011
- Free Software Foundation, Inc.
+ Copyright (C) 1997-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
@@ -131,6 +130,22 @@
__r.__l[1] = __bswap_32 (__w.__l[0]); \
} \
__r.__ll; }))
+#elif __GLIBC_HAVE_LONG_LONG
+# define __bswap_constant_64(x) \
+ ((((x) & 0xff00000000000000ull) >> 56) \
+ | (((x) & 0x00ff000000000000ull) >> 40) \
+ | (((x) & 0x0000ff0000000000ull) >> 24) \
+ | (((x) & 0x000000ff00000000ull) >> 8) \
+ | (((x) & 0x00000000ff000000ull) << 8) \
+ | (((x) & 0x0000000000ff0000ull) << 24) \
+ | (((x) & 0x000000000000ff00ull) << 40) \
+ | (((x) & 0x00000000000000ffull) << 56))
+
+static __inline unsigned long long int
+__bswap_64 (unsigned long long int __bsx)
+{
+ return __bswap_constant_64 (__bsx);
+}
#endif
#endif /* _BITS_BYTESWAP_H */
Modified: fsf/trunk/libc/sysdeps/s390/bits/byteswap.h
==============================================================================
--- fsf/trunk/libc/sysdeps/s390/bits/byteswap.h (original)
+++ fsf/trunk/libc/sysdeps/s390/bits/byteswap.h Wed Apr 4 00:02:21 2012
@@ -1,5 +1,5 @@
/* Macros to swap the order of bytes in integer values. s390 version.
- Copyright (C) 2000-2003, 2008, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2000-2003, 2008, 2011, 2012 Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@xxxxxxxxxx).
This file is part of the GNU C Library.
@@ -150,16 +150,16 @@
__r.__l[1] = __bswap_32 (__w.__l[0]); \
__r.__ll; })
# endif
-#else
+#elif __GLIBC_HAVE_LONG_LONG
# define __bswap_constant_64(x) \
- ((((x) & 0xff00000000000000ul) >> 56) \
- | (((x) & 0x00ff000000000000ul) >> 40) \
- | (((x) & 0x0000ff0000000000ul) >> 24) \
- | (((x) & 0x000000ff00000000ul) >> 8) \
- | (((x) & 0x00000000ff000000ul) << 8) \
- | (((x) & 0x0000000000ff0000ul) << 24) \
- | (((x) & 0x000000000000ff00ul) << 40) \
- | (((x) & 0x00000000000000fful) << 56))
+ ((((x) & 0xff00000000000000ull) >> 56) \
+ | (((x) & 0x00ff000000000000ull) >> 40) \
+ | (((x) & 0x0000ff0000000000ull) >> 24) \
+ | (((x) & 0x000000ff00000000ull) >> 8) \
+ | (((x) & 0x00000000ff000000ull) << 8) \
+ | (((x) & 0x0000000000ff0000ull) << 24) \
+ | (((x) & 0x000000000000ff00ull) << 40) \
+ | (((x) & 0x00000000000000ffull) << 56))
static __inline unsigned long long int
__bswap_64 (unsigned long long int __bsx)
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 Wed Apr 4 00:02:21 2012
@@ -1,6 +1,5 @@
/* Macros to swap the order of bytes in integer values.
- Copyright (C) 1997, 1998, 2000, 2002, 2003, 2007, 2008, 2010, 2011
- Free Software Foundation, Inc.
+ Copyright (C) 1997-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
@@ -131,6 +130,22 @@
} \
__r.__ll; }))
# endif
+#elif __GLIBC_HAVE_LONG_LONG
+# define __bswap_constant_64(x) \
+ ((((x) & 0xff00000000000000ull) >> 56) \
+ | (((x) & 0x00ff000000000000ull) >> 40) \
+ | (((x) & 0x0000ff0000000000ull) >> 24) \
+ | (((x) & 0x000000ff00000000ull) >> 8) \
+ | (((x) & 0x00000000ff000000ull) << 8) \
+ | (((x) & 0x0000000000ff0000ull) << 24) \
+ | (((x) & 0x000000000000ff00ull) << 40) \
+ | (((x) & 0x00000000000000ffull) << 56))
+
+static __inline unsigned long long int
+__bswap_64 (unsigned long long int __bsx)
+{
+ return __bswap_constant_64 (__bsx);
+}
#endif
#endif /* _BITS_BYTESWAP_H */
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits