mirror of
git://sourceware.org/git/glibc.git
synced 2025-04-24 14:41:06 +08:00
(LLONG_MIN, LLONG_MAX, ULLONG_MAX): Make sure these are defined for -D_GNU_SOURCE or -D_ISOC99_SOURCE even when not -std=c99.
This commit is contained in:
parent
fe60d146c7
commit
3158a33ecb
@ -1,4 +1,5 @@
|
|||||||
/* Copyright (C) 1991, 92, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
|
/* Copyright (C) 1991, 1992, 1996, 1997, 1998, 1999, 2000, 2005
|
||||||
|
Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -122,20 +123,20 @@
|
|||||||
#if defined __GNUC__ && !defined _GCC_LIMITS_H_
|
#if defined __GNUC__ && !defined _GCC_LIMITS_H_
|
||||||
/* `_GCC_LIMITS_H_' is what GCC's file defines. */
|
/* `_GCC_LIMITS_H_' is what GCC's file defines. */
|
||||||
# include_next <limits.h>
|
# include_next <limits.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/* The <limits.h> files in some gcc versions don't define LLONG_MIN,
|
/* The <limits.h> files in some gcc versions don't define LLONG_MIN,
|
||||||
LLONG_MAX, and ULLONG_MAX. Instead only the values gcc defined for
|
LLONG_MAX, and ULLONG_MAX. Instead only the values gcc defined for
|
||||||
ages are available. */
|
ages are available. */
|
||||||
# ifdef __USE_ISOC99
|
#if defined __USE_ISOC99 && defined __GNUC__
|
||||||
# ifndef LLONG_MIN
|
# ifndef LLONG_MIN
|
||||||
# define LLONG_MIN LONG_LONG_MIN
|
# define LLONG_MIN (-LLONG_MAX-1)
|
||||||
# endif
|
# endif
|
||||||
# ifndef LLONG_MAX
|
# ifndef LLONG_MAX
|
||||||
# define LLONG_MAX LONG_LONG_MAX
|
# define LLONG_MAX __LONG_LONG_MAX__
|
||||||
# endif
|
# endif
|
||||||
# ifndef ULLONG_MAX
|
# ifndef ULLONG_MAX
|
||||||
# define ULLONG_MAX ULONG_LONG_MAX
|
# define ULLONG_MAX (LLONG_MAX * 2ULL + 1)
|
||||||
# endif
|
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user