about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2013-01-11 21:13:25 +0000
committerJoseph Myers <joseph@codesourcery.com>2013-01-11 21:13:25 +0000
commit6a57d93130924487bd58b3d80dabd421d4fbbe4f (patch)
treee10ddd2b9ab102398e117e683fb6dcac1c96fa32
parent0e8529e94f4e2e457dc145c1c4aa4736a7c81ea5 (diff)
downloadglibc-6a57d93130924487bd58b3d80dabd421d4fbbe4f.tar.gz
glibc-6a57d93130924487bd58b3d80dabd421d4fbbe4f.tar.xz
glibc-6a57d93130924487bd58b3d80dabd421d4fbbe4f.zip
Remove __GLIBC_HAVE_LONG_LONG.
-rw-r--r--ChangeLog22
-rw-r--r--bits/byteswap.h2
-rw-r--r--bits/types.h13
-rw-r--r--include/features.h8
-rw-r--r--posix/sys/types.h4
-rw-r--r--stdlib/stdlib.h10
-rw-r--r--string/byteswap.h4
-rw-r--r--string/endian.h20
-rw-r--r--sysdeps/s390/bits/byteswap.h2
-rw-r--r--sysdeps/unix/sysv/linux/sys/sysmacros.h15
-rw-r--r--sysdeps/x86/bits/byteswap.h2
11 files changed, 48 insertions, 54 deletions
diff --git a/ChangeLog b/ChangeLog
index 3feff6fc62..3ffd8fd43d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+2013-01-11  Joseph Myers  <joseph@codesourcery.com>
+
+	* include/features.h (__GLIBC_HAVE_LONG_LONG): Remove.
+	* bits/byteswap.h [__GLIBC_HAVE_LONG_LONG]: Change #elif condition
+	to just #else.
+	* bits/types.h [__GLIBC_HAVE_LONG_LONG]: Likewise.  Remove
+	[!__GLIBC_HAVE_LONG_LONG] case.
+	* posix/sys/types.h [__GLIBC_HAVE_LONG_LONG]: Change #elif
+	condition to just #else.
+	* stdlib/stdlib.h [__USE_ISOC99 || (__GLIBC_HAVE_LONG_LONG &&
+	__USE_MISC)]: Change all uses to [__USE_ISOC99 || __USE_MISC].
+	[__GLIBC_HAVE_LONG_LONG && __USE_BSD]: Change to [__USE_BSD].
+	* string/byteswap.h [__GLIBC_HAVE_LONG_LONG]: Make code
+	unconditional.
+	* string/endian.h [__GLIBC_HAVE_LONG_LONG]: Likewise.
+	* sysdeps/s390/bits/byteswap.h [__GLIBC_HAVE_LONG_LONG]: Change
+	#elif condition to just #else.
+	* sysdeps/unix/sysv/linux/sys/sysmacros.h
+	[__GLIBC_HAVE_LONG_LONG]: Make code unconditional.
+	* sysdeps/x86/bits/byteswap.h [__GLIBC_HAVE_LONG_LONG]: Change
+	#elif condition to just #else.
+
 2013-01-11  Steve Ellcey  <sellcey@mips.com>
 
 	* elf/elf.h (EF_MIPS_ARCH_32): Fix value.
diff --git a/bits/byteswap.h b/bits/byteswap.h
index 35d4cb3663..57d34b461a 100644
--- a/bits/byteswap.h
+++ b/bits/byteswap.h
@@ -91,7 +91,7 @@ __bswap_64 (__uint64_t __bsx)
 	   }								      \
 	 __r.__ll; }))
 # endif
-#elif __GLIBC_HAVE_LONG_LONG
+#else
 # define __bswap_constant_64(x) \
      ((((x) & 0xff00000000000000ull) >> 56)				      \
       | (((x) & 0x00ff000000000000ull) >> 40)				      \
diff --git a/bits/types.h b/bits/types.h
index c45d6e4367..dc7b784f96 100644
--- a/bits/types.h
+++ b/bits/types.h
@@ -42,7 +42,7 @@ typedef unsigned int __uint32_t;
 #if __WORDSIZE == 64
 typedef signed long int __int64_t;
 typedef unsigned long int __uint64_t;
-#elif defined __GLIBC_HAVE_LONG_LONG
+#else
 __extension__ typedef signed long long int __int64_t;
 __extension__ typedef unsigned long long int __uint64_t;
 #endif
@@ -51,18 +51,9 @@ __extension__ typedef unsigned long long int __uint64_t;
 #if __WORDSIZE == 64
 typedef long int __quad_t;
 typedef unsigned long int __u_quad_t;
-#elif defined __GLIBC_HAVE_LONG_LONG
+#else
 __extension__ typedef long long int __quad_t;
 __extension__ typedef unsigned long long int __u_quad_t;
-#else
-typedef struct
-{
-  long __val[2];
-} __quad_t;
-typedef struct
-{
-  __u_long __val[2];
-} __u_quad_t;
 #endif
 
 
diff --git a/include/features.h b/include/features.h
index d6c32cbfda..ca83da05eb 100644
--- a/include/features.h
+++ b/include/features.h
@@ -358,14 +358,6 @@
 #define __GLIBC_PREREQ(maj, min) \
 	((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))
 
-/* Decide whether a compiler supports the long long datatypes.  */
-#if defined __GNUC__ \
-    || (defined __PGI && defined __i386__ ) \
-    || (defined __INTEL_COMPILER && (defined __i386__ || defined __ia64__)) \
-    || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
-# define __GLIBC_HAVE_LONG_LONG	1
-#endif
-
 /* This is here only because every header file already includes this one.  */
 #ifndef __ASSEMBLER__
 # ifndef _SYS_CDEFS_H
diff --git a/posix/sys/types.h b/posix/sys/types.h
index b36b561dba..33c2176d0f 100644
--- a/posix/sys/types.h
+++ b/posix/sys/types.h
@@ -164,7 +164,7 @@ typedef	short int int16_t;
 typedef	int int32_t;
 #  if __WORDSIZE == 64
 typedef long int int64_t;
-#  elif __GLIBC_HAVE_LONG_LONG
+#  else
 __extension__ typedef long long int int64_t;
 #  endif
 # endif
@@ -175,7 +175,7 @@ typedef	unsigned short int u_int16_t;
 typedef	unsigned int u_int32_t;
 # if __WORDSIZE == 64
 typedef unsigned long int u_int64_t;
-# elif __GLIBC_HAVE_LONG_LONG
+# else
 __extension__ typedef unsigned long long int u_int64_t;
 # endif
 
diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index 41fb7e711e..b49a41cc5d 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -151,7 +151,7 @@ extern long int atol (const char *__nptr)
      __THROW __attribute_pure__ __nonnull ((1)) __wur;
 __END_NAMESPACE_STD
 
-#if defined __USE_ISOC99 || (defined __GLIBC_HAVE_LONG_LONG && defined __USE_MISC)
+#if defined __USE_ISOC99 || defined __USE_MISC
 __BEGIN_NAMESPACE_C99
 /* Convert a string to a long long integer.  */
 __extension__ extern long long int atoll (const char *__nptr)
@@ -189,7 +189,7 @@ extern unsigned long int strtoul (const char *__restrict __nptr,
      __THROW __nonnull ((1));
 __END_NAMESPACE_STD
 
-#if defined __GLIBC_HAVE_LONG_LONG && defined __USE_BSD
+#ifdef __USE_BSD
 /* Convert a string to a quadword integer.  */
 __extension__
 extern long long int strtoq (const char *__restrict __nptr,
@@ -200,9 +200,9 @@ __extension__
 extern unsigned long long int strtouq (const char *__restrict __nptr,
 				       char **__restrict __endptr, int __base)
      __THROW __nonnull ((1));
-#endif /* GCC and use BSD.  */
+#endif /* Use BSD.  */
 
-#if defined __USE_ISOC99 || (defined __GLIBC_HAVE_LONG_LONG && defined __USE_MISC)
+#if defined __USE_ISOC99 || defined __USE_MISC
 __BEGIN_NAMESPACE_C99
 /* Convert a string to a quadword integer.  */
 __extension__
@@ -215,7 +215,7 @@ extern unsigned long long int strtoull (const char *__restrict __nptr,
 					char **__restrict __endptr, int __base)
      __THROW __nonnull ((1));
 __END_NAMESPACE_C99
-#endif /* ISO C99 or GCC and use MISC.  */
+#endif /* ISO C99 or use MISC.  */
 
 
 #ifdef __USE_GNU
diff --git a/string/byteswap.h b/string/byteswap.h
index a31e902bee..705015f055 100644
--- a/string/byteswap.h
+++ b/string/byteswap.h
@@ -33,9 +33,7 @@
 /* Return a value with all bytes in the 32 bit argument swapped.  */
 #define bswap_32(x) __bswap_32 (x)
 
-#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
+#define bswap_64(x) __bswap_64 (x)
 
 #endif /* byteswap.h */
diff --git a/string/endian.h b/string/endian.h
index 9ae5f2dd7a..f414cb1503 100644
--- a/string/endian.h
+++ b/string/endian.h
@@ -70,12 +70,10 @@
 #  define be32toh(x) __bswap_32 (x)
 #  define le32toh(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
+#  define htobe64(x) __bswap_64 (x)
+#  define htole64(x) (x)
+#  define be64toh(x) __bswap_64 (x)
+#  define le64toh(x) (x)
 
 # else
 #  define htobe16(x) (x)
@@ -88,12 +86,10 @@
 #  define be32toh(x) (x)
 #  define le32toh(x) __bswap_32 (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
+#  define htobe64(x) (x)
+#  define htole64(x) __bswap_64 (x)
+#  define be64toh(x) (x)
+#  define le64toh(x) __bswap_64 (x)
 # endif
 #endif
 
diff --git a/sysdeps/s390/bits/byteswap.h b/sysdeps/s390/bits/byteswap.h
index 9221ea2cfc..5d289120fc 100644
--- a/sysdeps/s390/bits/byteswap.h
+++ b/sysdeps/s390/bits/byteswap.h
@@ -112,7 +112,7 @@ __bswap_32 (unsigned int __bsx)
 	  __r.__l[1] = __bswap_32 (__w.__l[0]);		\
 	  __r.__ll; })
 # endif
-#elif __GLIBC_HAVE_LONG_LONG
+#else
 # define __bswap_constant_64(x) \
      ((((x) & 0xff00000000000000ull) >> 56)				      \
       | (((x) & 0x00ff000000000000ull) >> 40)				      \
diff --git a/sysdeps/unix/sysv/linux/sys/sysmacros.h b/sysdeps/unix/sysv/linux/sys/sysmacros.h
index 76eaf9f9d8..a1f1b2697d 100644
--- a/sysdeps/unix/sysv/linux/sys/sysmacros.h
+++ b/sysdeps/unix/sysv/linux/sys/sysmacros.h
@@ -21,10 +21,6 @@
 
 #include <features.h>
 
-/* If the compiler does not know long long it is out of luck.  We are
-   not going to hack weird hacks to support the dev_t representation
-   they need.  */
-#ifdef __GLIBC_HAVE_LONG_LONG
 __BEGIN_DECLS
 
 __extension__
@@ -38,7 +34,7 @@ extern unsigned long long int gnu_dev_makedev (unsigned int __major,
 					       unsigned int __minor)
      __THROW __attribute_const__;
 
-# ifdef __USE_EXTERN_INLINES
+#ifdef __USE_EXTERN_INLINES
 __extension__ __extern_inline __attribute_const__ unsigned int
 __NTH (gnu_dev_major (unsigned long long int __dev))
 {
@@ -58,13 +54,12 @@ __NTH (gnu_dev_makedev (unsigned int __major, unsigned int __minor))
 	  | (((unsigned long long int) (__minor & ~0xff)) << 12)
 	  | (((unsigned long long int) (__major & ~0xfff)) << 32));
 }
-# endif
+#endif
 __END_DECLS
 
 /* Access the functions with their traditional names.  */
-# define major(dev) gnu_dev_major (dev)
-# define minor(dev) gnu_dev_minor (dev)
-# define makedev(maj, min) gnu_dev_makedev (maj, min)
-#endif
+#define major(dev) gnu_dev_major (dev)
+#define minor(dev) gnu_dev_minor (dev)
+#define makedev(maj, min) gnu_dev_makedev (maj, min)
 
 #endif /* sys/sysmacros.h */
diff --git a/sysdeps/x86/bits/byteswap.h b/sysdeps/x86/bits/byteswap.h
index 0f96ba3026..9e2effc1a6 100644
--- a/sysdeps/x86/bits/byteswap.h
+++ b/sysdeps/x86/bits/byteswap.h
@@ -134,7 +134,7 @@ __bswap_64 (__uint64_t __bsx)
 	   }                                                                  \
 	 __r.__ll; }))
 # endif
-#elif __GLIBC_HAVE_LONG_LONG
+#else
 # define __bswap_constant_64(x) \
      ((((x) & 0xff00000000000000ull) >> 56)				      \
       | (((x) & 0x00ff000000000000ull) >> 40)				      \