compilers that support it.
* posix/sys/types.h: Use __GLIBC_HAVE_LONG_LONG.
* sysdeps/unix/sysv/linux/bits/types.h: Likewise.
* stdlib/stdlib.h: Likewise.
#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
-/* Copyright (C) 1991,92,94,95,96,97,98,99,2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,94,95,96,97,98,99,2000,2001 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
typedef char int8_t;
typedef short int int16_t;
typedef int int32_t;
-# ifdef __GNUC__
+# if __GLIBC_HAVE_LONG_LONG
__extension__ typedef long long int int64_t;
# endif
# endif
typedef unsigned char u_int8_t;
typedef unsigned short int u_int16_t;
typedef unsigned int u_int32_t;
-# ifdef __GNUC__
+# if __GLIBC_HAVE_LONG_LONG
__extension__ typedef unsigned long long int u_int64_t;
# endif
/* Convert a string to a long integer. */
extern long int atol (__const char *__nptr) __THROW __attribute_pure__;
-#if defined __USE_ISOC99 || (defined __GNUC__ && defined __USE_MISC)
+#if defined __USE_ISOC99 || (defined __GLIBC_HAVE_LONG_LONG && defined __USE_MISC)
/* Convert a string to a long long integer. */
__extension__ extern long long int atoll (__const char *__nptr)
__THROW __attribute_pure__;
char **__restrict __endptr, int __base)
__THROW;
-#if defined __GNUC__ && defined __USE_BSD
+#if defined __GLIBC_HAVE_LONG_LONG && defined __USE_BSD
/* Convert a string to a quadword integer. */
__extension__
extern long long int strtoq (__const char *__restrict __nptr,
__THROW;
#endif /* GCC and use BSD. */
-#if defined __USE_ISOC99 || (defined __GNUC__ && defined __USE_MISC)
+#if defined __USE_ISOC99 || (defined __GLIBC_HAVE_LONG_LONG && defined __USE_MISC)
/* These functions will part of the standard C library in ISO C99. */
/* Convert a string to a quadword integer. */
typedef unsigned short __u_short;
typedef unsigned int __u_int;
typedef unsigned long __u_long;
-#ifdef __GNUC__
+#ifdef __GLIBC_HAVE_LONG_LONG
__extension__ typedef unsigned long long int __u_quad_t;
__extension__ typedef long long int __quad_t;
#else
typedef unsigned short int __uint16_t;
typedef signed int __int32_t;
typedef unsigned int __uint32_t;
-#ifdef __GNUC__
+#ifdef __GLIBC_HAVE_LONG_LONG
__extension__ typedef signed long long int __int64_t;
__extension__ typedef unsigned long long int __uint64_t;
#endif
typedef __u_int __gid_t; /* Type of group identifications. */
typedef __u_long __ino_t; /* Type of file serial numbers. */
typedef __u_int __mode_t; /* Type of file attribute bitmasks. */
-typedef __u_int __nlink_t; /* Type of file link counts. */
+typedef __u_int __nlink_t; /* Type of file link counts. */
typedef long int __off_t; /* Type of file sizes and offsets. */
typedef __quad_t __loff_t; /* Type of file sizes and offsets. */
typedef int __pid_t; /* Type of process identifications. */