diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-10-01 11:00:26 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-10-01 11:00:26 +0000 |
commit | 7782d0bf55c294b7ed872e2590fcf4a683be5e05 (patch) | |
tree | 1e61d31c86a72090043c69ac0a2b41d25e4f86c4 /sysdeps/i386 | |
parent | e3e4e463cf18e47448e92f6cb2c126b9828cd2ca (diff) | |
download | glibc-7782d0bf55c294b7ed872e2590fcf4a683be5e05.zip glibc-7782d0bf55c294b7ed872e2590fcf4a683be5e05.tar.gz glibc-7782d0bf55c294b7ed872e2590fcf4a683be5e05.tar.bz2 |
Update.
* sys/types.h: Protect use of long long by __extension__.
* stdlib/stdlib.h: Likewise.
* string/string.h: Likewise.
* sysdeps/i386/bits/byteswap.h: Likewise.
* sysdeps/geeric/bits/byteswap.h: Likewise.
* sysdeps/i386/fpu/bits/mathinline.h: Likewise.
* sysdeps/unix/sysv/linux/bits/types.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/types.h: Likewise.
* sysdeps/wordsize-32/inttypes.h: Likewise.
* sysdeps/wordsize-32/stdint.h: Likewise.
* wcsmbs/wchar.h: Likewise.
Diffstat (limited to 'sysdeps/i386')
-rw-r--r-- | sysdeps/i386/bits/byteswap.h | 72 | ||||
-rw-r--r-- | sysdeps/i386/fpu/bits/mathinline.h | 4 |
2 files changed, 40 insertions, 36 deletions
diff --git a/sysdeps/i386/bits/byteswap.h b/sysdeps/i386/bits/byteswap.h index 760e075..a1ba6b8 100644 --- a/sysdeps/i386/bits/byteswap.h +++ b/sysdeps/i386/bits/byteswap.h @@ -27,15 +27,16 @@ #if defined __GNUC__ && __GNUC__ >= 2 # define __bswap_16(x) \ - ({ register unsigned short int __v; \ - if (__builtin_constant_p (x)) \ - __v = __bswap_constant_16 (x); \ - else \ - __asm__ __volatile__ ("rorw $8, %w0" \ - : "=r" (__v) \ - : "0" ((unsigned short int) (x)) \ - : "cc"); \ - __v; }) + (__extension__ \ + ({ register unsigned short int __v; \ + if (__builtin_constant_p (x)) \ + __v = __bswap_constant_16 (x); \ + else \ + __asm__ __volatile__ ("rorw $8, %w0" \ + : "=r" (__v) \ + : "0" ((unsigned short int) (x)) \ + : "cc"); \ + __v; })) #else /* This is better than nothing. */ # define __bswap_16(x) __bswap_constant_16 (x) @@ -52,27 +53,29 @@ `bswap' opcode. On i386 we have to use three instructions. */ # if !defined __i486__ && !defined __pentium__ && !defined __pentiumpro__ # define __bswap_32(x) \ - ({ register unsigned int __v; \ - if (__builtin_constant_p (x)) \ - __v = __bswap_constant_32 (x); \ - else \ - __asm__ __volatile__ ("rorw $8, %w0;" \ - "rorl $16, %0;" \ - "rorw $8, %w0" \ - : "=r" (__v) \ - : "0" ((unsigned int) (x)) \ - : "cc"); \ - __v; }) + (__extension__ \ + ({ register unsigned int __v; \ + if (__builtin_constant_p (x)) \ + __v = __bswap_constant_32 (x); \ + else \ + __asm__ __volatile__ ("rorw $8, %w0;" \ + "rorl $16, %0;" \ + "rorw $8, %w0" \ + : "=r" (__v) \ + : "0" ((unsigned int) (x)) \ + : "cc"); \ + __v; })) # else # define __bswap_32(x) \ - ({ register unsigned int __v; \ - if (__builtin_constant_p (x)) \ - __v = __bswap_constant_32 (x); \ - else \ - __asm__ __volatile__ ("bswap %0" \ - : "=r" (__v) \ - : "0" ((unsigned int) (x))); \ - __v; }) + (__extension__ \ + ({ register unsigned int __v; \ + if (__builtin_constant_p (x)) \ + __v = __bswap_constant_32 (x); \ + else \ + __asm__ __volatile__ ("bswap %0" \ + : "=r" (__v) \ + : "0" ((unsigned int) (x))); \ + __v; })) # endif #else # define __bswap_32(x) __bswap_constant_32 (x) @@ -82,10 +85,11 @@ #if defined __GNUC__ && __GNUC__ >= 2 /* Swap bytes in 64 bit value. */ # define __bswap_64(x) \ - ({ union { unsigned long long int __ll; \ - unsigned long int __l[2]; } __w, __r; \ - __w.__ll = (x); \ - __r.__l[0] = __bswap_32 (__w.__l[1]); \ - __r.__l[1] = __bswap_32 (__w.__l[0]); \ - __r.__ll; }) + (__extension__ \ + ({ union { __extension__ unsigned long long int __ll; \ + unsigned long int __l[2]; } __w, __r; \ + __w.__ll = (x); \ + __r.__l[0] = __bswap_32 (__w.__l[1]); \ + __r.__l[1] = __bswap_32 (__w.__l[0]); \ + __r.__ll; })) #endif diff --git a/sysdeps/i386/fpu/bits/mathinline.h b/sysdeps/i386/fpu/bits/mathinline.h index b188026..bf5b99a 100644 --- a/sysdeps/i386/fpu/bits/mathinline.h +++ b/sysdeps/i386/fpu/bits/mathinline.h @@ -231,7 +231,7 @@ __inline_mathcode (__sgn, __x, \ __inline_mathcode (__pow2, __x, \ register long double __value; \ register long double __exponent; \ - long long int __p = (long long int) __x; \ + __extension__ long long int __p = (long long int) __x; \ if (__x == (long double) __p) \ { \ __asm __volatile__ \ @@ -376,7 +376,7 @@ __inline_mathcode2 (fmod, __x, __y, \ __inline_mathcode2 (pow, __x, __y, \ register long double __value; \ register long double __exponent; \ - long long int __p = (long long int) __y; \ + __extension__ long long int __p = (long long int) __y; \ if (__x == 0.0 && __y > 0.0) \ return 0.0; \ if (__y == (double) __p) \ |