]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
byteswap.h: fix gcc ver test for __builtin_bswap{32,64}
authorMike Frysinger <vapier@gentoo.org>
Thu, 29 Nov 2012 04:04:32 +0000 (23:04 -0500)
committerRyan S. Arnold <rsa@linux.vnet.ibm.com>
Fri, 18 Jan 2013 15:33:34 +0000 (09:33 -0600)
The __builtin_bswap* functions were introduced in gcc-4.3, not gcc-4.2.
Fix the __GNUC_PREREQ tests to reflect this.

Otherwise trying to compile code with gcc-4.2 falls down:
In file included from /usr/include/endian.h:60,
                 from /usr/include/ctype.h:40,
/usr/include/bits/byteswap.h: In function 'unsigned int __bswap_32(unsigned int)':
/usr/include/bits/byteswap.h:46: error: '__builtin_bswap32' was not declared in this scope
/usr/include/bits/byteswap.h: In function 'long long unsigned int __bswap_64(long long unsigned int)':
/usr/include/bits/byteswap.h:110: error: '__builtin_bswap64' was not declared in this scope

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
(cherry picked from commit c9d6789ebe028a260d3e5be0c26b7d02fdfe99fe)

ChangeLog
bits/byteswap.h
sysdeps/x86/bits/byteswap.h

index 837271b7110a86e46996a34ac9a8c6f647a9fff1..d5685e130bde2ffda2bba8ca2f39d66094750f47 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-12-03  Mike Frysinger  <vapier@gentoo.org>
+
+       * bits/byteswap.h [__GNUC__]: Change __GNUC_PREREQ from 4.2 to 4.3.
+       * sysdeps/x86/bits/byteswap.h [__GNUC__]: Likewise.
+
 2012-11-19  Joseph Myers  <joseph@codesourcery.com>
 
        * bits/byteswap.h: Include <bits/types.h>.
index e19e91ada7ae9582dbe49ad9a39e4ff7bc22ce12..7e5daedb83e29a4cf7fbf312f84c318b43e55381 100644 (file)
@@ -39,7 +39,7 @@
       (((x) & 0x0000ff00u) <<  8) | (((x) & 0x000000ffu) << 24))
 
 #ifdef __GNUC__
-# if __GNUC_PREREQ (4, 2)
+# if __GNUC_PREREQ (4, 3)
 static __inline unsigned int
 __bswap_32 (unsigned int __bsx)
 {
@@ -70,7 +70,7 @@ __bswap_32 (unsigned int __bsx)
                     | (((x) & 0x000000000000ff00ull) << 40)                  \
                     | (((x) & 0x00000000000000ffull) << 56)))
 
-# if __GNUC_PREREQ (4, 2)
+# if __GNUC_PREREQ (4, 3)
 static __inline __uint64_t
 __bswap_64 (__uint64_t __bsx)
 {
index babe567432e04b32e86ef6b16f2429c0bdcacad7..581687c7f263118353c982e93a7a4f40fe19ea9f 100644 (file)
@@ -40,7 +40,7 @@
       (((x) & 0x0000ff00) <<  8) | (((x) & 0x000000ff) << 24))
 
 #ifdef __GNUC__
-# if __GNUC_PREREQ (4, 2)
+# if __GNUC_PREREQ (4, 3)
 static __inline unsigned int
 __bswap_32 (unsigned int __bsx)
 {
@@ -104,7 +104,7 @@ __bswap_32 (unsigned int __bsx)
                     | (((x) & 0x000000000000ff00ull) << 40)                  \
                     | (((x) & 0x00000000000000ffull) << 56)))
 
-# if __GNUC_PREREQ (4, 2)
+# if __GNUC_PREREQ (4, 3)
 static __inline __uint64_t
 __bswap_64 (__uint64_t __bsx)
 {