aboutsummaryrefslogtreecommitdiff
path: root/include/limits.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-09-10 16:44:49 +0000
committerUlrich Drepper <drepper@redhat.com>1998-09-10 16:44:49 +0000
commit6c79e60c344f6b45f36f3e8ba7458af96326ffc4 (patch)
tree8709f9e63a159fa53274878d37bb53df42f0064e /include/limits.h
parent8e9f53fcf02a217a20a52994c43dc56517838962 (diff)
downloadglibc-6c79e60c344f6b45f36f3e8ba7458af96326ffc4.zip
glibc-6c79e60c344f6b45f36f3e8ba7458af96326ffc4.tar.gz
glibc-6c79e60c344f6b45f36f3e8ba7458af96326ffc4.tar.bz2
Update.
* include/limits.h: Include gcc's header even if this file is found more than once before it (PR libc/778)
Diffstat (limited to 'include/limits.h')
-rw-r--r--include/limits.h23
1 files changed, 14 insertions, 9 deletions
diff --git a/include/limits.h b/include/limits.h
index b149ba1..21520f3 100644
--- a/include/limits.h
+++ b/include/limits.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1996, 1997, 1998 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
@@ -45,14 +45,9 @@
#define MB_LEN_MAX 6
-#if __GNUC__ >= 2
-
- /* Get the compiler's limits.h, which defines all the ANSI constants. */
-# ifndef _GCC_LIMITS_H_ /* This is what GCC's file defines. */
-# include_next <limits.h>
-# endif
-
-#else /* Not GCC 2. */
+/* If we are not using GNU CC we have to define all the symbols ourself.
+ Otherwise use gcc's definitions (see below). */
+#if !defined __GNUC__ || __GNUC__ < 2
/* We only protect from multiple inclusion here, because all the other
#include's protect themselves, and in GCC 2 we may #include_next through
@@ -126,3 +121,13 @@
#endif /* GCC 2. */
#endif /* !_LIBC_LIMITS_H_ */
+
+ /* Get the compiler's limits.h, which defines almost all the ISO constants.
+
+ We put this #include_next outside the double inclusion check because
+ it should be possible to include this file more than once and still get
+ the definitions from gcc's header. */
+#if defined __GNUC__ && !defined _GCC_LIMITS_H_
+/* `_GCC_LIMITS_H_' is what GCC's file defines. */
+# include_next <limits.h>
+#endif