about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-10-01 11:00:26 +0000
committerUlrich Drepper <drepper@redhat.com>1998-10-01 11:00:26 +0000
commit7782d0bf55c294b7ed872e2590fcf4a683be5e05 (patch)
tree1e61d31c86a72090043c69ac0a2b41d25e4f86c4 /sysdeps
parente3e4e463cf18e47448e92f6cb2c126b9828cd2ca (diff)
downloadglibc-7782d0bf55c294b7ed872e2590fcf4a683be5e05.tar.gz
glibc-7782d0bf55c294b7ed872e2590fcf4a683be5e05.tar.xz
glibc-7782d0bf55c294b7ed872e2590fcf4a683be5e05.zip
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')
-rw-r--r--sysdeps/generic/bits/byteswap.h13
-rw-r--r--sysdeps/i386/bits/byteswap.h72
-rw-r--r--sysdeps/i386/fpu/bits/mathinline.h4
-rw-r--r--sysdeps/unix/sysv/linux/bits/types.h8
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/types.h8
-rw-r--r--sysdeps/wordsize-32/inttypes.h4
-rw-r--r--sysdeps/wordsize-32/stdint.h10
7 files changed, 67 insertions, 52 deletions
diff --git a/sysdeps/generic/bits/byteswap.h b/sysdeps/generic/bits/byteswap.h
index a5dd4a7db3..73189cfe5c 100644
--- a/sysdeps/generic/bits/byteswap.h
+++ b/sysdeps/generic/bits/byteswap.h
@@ -54,10 +54,11 @@ __bswap32 (unsigned int x)
 #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]; } __v, __r;			      \
-        __v.__ll = (x);							      \
-	__r.__l[0] = __bswap_32 (__v.__l[1]);				      \
-	__r.__l[1] = __bswap_32 (__v.__l[0]);				      \
-	__r.__ll; })
+     (__extension__							      \
+      ({ union { unsigned long long int __ll;				      \
+		 unsigned long int __l[2]; } __v, __r;			      \
+	 __v.__ll = (x);						      \
+	 __r.__l[0] = __bswap_32 (__v.__l[1]);				      \
+	 __r.__l[1] = __bswap_32 (__v.__l[0]);				      \
+	 __r.__ll; }))
 #endif
diff --git a/sysdeps/i386/bits/byteswap.h b/sysdeps/i386/bits/byteswap.h
index 760e0751c9..a1ba6b8748 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 b188026cdb..bf5b99a00e 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)						      \
diff --git a/sysdeps/unix/sysv/linux/bits/types.h b/sysdeps/unix/sysv/linux/bits/types.h
index 30dc5e20e0..06206f3b55 100644
--- a/sysdeps/unix/sysv/linux/bits/types.h
+++ b/sysdeps/unix/sysv/linux/bits/types.h
@@ -34,8 +34,8 @@ typedef unsigned short __u_short;
 typedef unsigned int __u_int;
 typedef unsigned long __u_long;
 #ifdef __GNUC__
-typedef unsigned long long int __u_quad_t;
-typedef long long int __quad_t;
+__extension__ typedef unsigned long long int __u_quad_t;
+__extension__ typedef long long int __quad_t;
 #else
 typedef struct
   {
@@ -53,8 +53,8 @@ typedef unsigned short int __uint16_t;
 typedef signed int __int32_t;
 typedef unsigned int __uint32_t;
 #ifdef __GNUC__
-typedef signed long long int __int64_t;
-typedef unsigned long long int __uint64_t;
+__extension__ typedef signed long long int __int64_t;
+__extension__ typedef unsigned long long int __uint64_t;
 #endif
 typedef __quad_t *__qaddr_t;
 
diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h
index 2bb8a2a9c6..c716d5735d 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/types.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/types.h
@@ -34,8 +34,8 @@ typedef unsigned short __u_short;
 typedef unsigned int __u_int;
 typedef unsigned long __u_long;
 #ifdef __GNUC__
-typedef unsigned long long int __u_quad_t;
-typedef long long int __quad_t;
+__extension__ typedef unsigned long long int __u_quad_t;
+__extension__ typedef long long int __quad_t;
 #else
 typedef struct
   {
@@ -53,8 +53,8 @@ typedef unsigned short int __uint16_t;
 typedef signed int __int32_t;
 typedef unsigned int __uint32_t;
 #ifdef __GNUC__
-typedef signed long long int __int64_t;
-typedef unsigned long long int __uint64_t;
+__extension__ typedef signed long long int __int64_t;
+__extension__ typedef unsigned long long int __uint64_t;
 #endif
 typedef __quad_t *__qaddr_t;
 
diff --git a/sysdeps/wordsize-32/inttypes.h b/sysdeps/wordsize-32/inttypes.h
index 250cbe31dd..6144411e24 100644
--- a/sysdeps/wordsize-32/inttypes.h
+++ b/sysdeps/wordsize-32/inttypes.h
@@ -271,6 +271,7 @@ extern uintmax_t wcstoumax __P ((__const wchar_t * __restrict __nptr,
 
 /* Like `strtol' but convert to `intmax_t'.  */
 # ifndef __strtoll_internal_defined
+__extension__
 extern long long int __strtoll_internal __P ((__const char *__restrict __nptr,
 					      char **__restrict __endptr,
 					      int __base, int __group));
@@ -284,6 +285,7 @@ strtoimax (__const char *__restrict nptr, char **__restrict endptr, int base)
 
 /* Like `strtoul' but convert to `uintmax_t'.  */
 # ifndef __strtoull_internal_defined
+__extension__
 extern unsigned long long int __strtoull_internal __P ((__const char *
 							__restrict __nptr,
 							char **
@@ -300,6 +302,7 @@ strtoumax (__const char *__restrict nptr, char **__restrict endptr, int base)
 
 /* Like `wcstol' but convert to `intmax_t'.  */
 # ifndef __wcstoll_internal_defined
+__extension__
 extern long long int __wcstoll_internal __P ((__const wchar_t *
 					      __restrict __nptr,
 					      wchar_t **__restrict __endptr,
@@ -316,6 +319,7 @@ wcstoimax (__const wchar_t *__restrict nptr, wchar_t **__restrict endptr,
 
 /* Like `wcstoul' but convert to `uintmax_t'.  */
 # ifndef __wcstoull_internal_defined
+__extension__
 extern unsigned long long int __wcstoull_internal __P ((__const wchar_t *
 							__restrict __nptr,
 							wchar_t **
diff --git a/sysdeps/wordsize-32/stdint.h b/sysdeps/wordsize-32/stdint.h
index 2f693e81ff..ef3de98620 100644
--- a/sysdeps/wordsize-32/stdint.h
+++ b/sysdeps/wordsize-32/stdint.h
@@ -37,6 +37,7 @@
 typedef signed char    int8_t;
 typedef short int     int16_t;
 typedef int           int32_t;
+__extension__
 typedef long long int int64_t;
 #endif
 
@@ -44,6 +45,7 @@ typedef long long int int64_t;
 typedef unsigned char           uint8_t;
 typedef unsigned short int     uint16_t;
 typedef unsigned int           uint32_t;
+__extension__
 typedef unsigned long long int uint64_t;
 
 
@@ -53,12 +55,14 @@ typedef unsigned long long int uint64_t;
 typedef signed char    int_least8_t;
 typedef short int     int_least16_t;
 typedef int           int_least32_t;
+__extension__
 typedef long long int int_least64_t;
 
 /* Unsigned.  */
 typedef unsigned char           uint_least8_t;
 typedef unsigned short int     uint_least16_t;
 typedef unsigned int           uint_least32_t;
+__extension__
 typedef unsigned long long int uint_least64_t;
 
 
@@ -68,12 +72,14 @@ typedef unsigned long long int uint_least64_t;
 typedef signed char    int_fast8_t;
 typedef int           int_fast16_t;
 typedef int           int_fast32_t;
+__extension__
 typedef long long int int_fast64_t;
 
 /* Unsigned.  */
 typedef unsigned char           uint_fast8_t;
 typedef unsigned int           uint_fast16_t;
 typedef unsigned int           uint_fast32_t;
+__extension__
 typedef unsigned long long int uint_fast64_t;
 
 
@@ -86,8 +92,8 @@ typedef unsigned int uintptr_t;
 
 
 /* Largest integral types.  */
-typedef long long int           intmax_t;
-typedef unsigned long long int uintmax_t;
+__extension__ typedef long long int           intmax_t;
+__extension__ typedef unsigned long long int uintmax_t;
 
 
 /* The ISO C 9X standard specifies that these macros must only be