diff options
Diffstat (limited to 'gl/stdint_.h')
-rw-r--r-- | gl/stdint_.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/gl/stdint_.h b/gl/stdint_.h index 9a8e17ad95..2e239b0937 100644 --- a/gl/stdint_.h +++ b/gl/stdint_.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2002, 2004-2005 Free Software Foundation, Inc. +/* Copyright (C) 2001-2002, 2004-2006 Free Software Foundation, Inc. Written by Bruno Haible, Sam Steingold, Peter Burwood. This file is part of gnulib. @@ -33,6 +33,12 @@ #if defined(__FreeBSD__) # include <sys/inttypes.h> #endif +#if defined(__linux__) && HAVE_SYS_BITYPES_H + /* Linux libc4 >= 4.6.7 and libc5 have a <sys/bitypes.h> that defines + int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is + included by <sys/types.h>. */ +# include <sys/bitypes.h> +#endif #if defined(__sun) && HAVE_SYS_INTTYPES_H # include <sys/inttypes.h> /* Solaris 7 <sys/inttypes.h> has the types except the *_fast*_t types, and @@ -48,7 +54,7 @@ UINTPTR_MAX, PTRDIFF_MIN, PTRDIFF_MAX. */ # define _STDINT_H_HAVE_SYSTEM_INTTYPES #endif -#if !(defined(UNIX_CYGWIN32) && defined(__BIT_TYPES_DEFINED__)) +#if !((defined(UNIX_CYGWIN32) || defined(__linux__)) && defined(__BIT_TYPES_DEFINED__)) # define _STDINT_H_NEED_SIGNED_INT_TYPES #endif @@ -238,8 +244,8 @@ typedef uint32_t uintmax_t; #define SIG_ATOMIC_MIN 0 #define SIG_ATOMIC_MAX 127 -#ifndef SIZE_MAX -# define SIZE_MAX ((size_t) -1) +#ifndef SIZE_MAX /* SIZE_MAX may also be defined in config.h. */ +# define SIZE_MAX (size_t)~(size_t)0) #endif /* wchar_t limits already defined in <stddef.h>. */ |