aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-05-18 08:37:39 +0000
committerUlrich Drepper <drepper@redhat.com>1999-05-18 08:37:39 +0000
commit05cc5bd9dca91dfad3eec076b1bfdfef868f0987 (patch)
tree4a8942bb0c29d63c99e0848686f89c7e23b3de9a
parent73334e85faf2faf44479c4e5d8367d07cca7059f (diff)
downloadglibc-05cc5bd9dca91dfad3eec076b1bfdfef868f0987.zip
glibc-05cc5bd9dca91dfad3eec076b1bfdfef868f0987.tar.gz
glibc-05cc5bd9dca91dfad3eec076b1bfdfef868f0987.tar.bz2
Update.
1999-05-04 Zack Weinberg <zack@rabi.phys.columbia.edu> * argp/argp.h, assert/assert.h, misc/sys/cdefs.h, posix/sys/types.h: Handle the case of __GNUC__=3, __GNUC_MINOR__=(anything).
-rw-r--r--ChangeLog6
-rw-r--r--argp/argp.h9
-rw-r--r--assert/assert.h24
-rw-r--r--misc/sys/cdefs.h2
-rw-r--r--posix/sys/types.h2
5 files changed, 31 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 3df33a7..1ae43939 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+1999-05-04 Zack Weinberg <zack@rabi.phys.columbia.edu>
+
+ * argp/argp.h, assert/assert.h, misc/sys/cdefs.h,
+ posix/sys/types.h: Handle the case of __GNUC__=3,
+ __GNUC_MINOR__=(anything).
+
1999-05-18 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* sysdeps/i386/i486/bits/string.h (rawmemchr): Remove unneccessary
diff --git a/argp/argp.h b/argp/argp.h
index eb570f1..cfa7116 100644
--- a/argp/argp.h
+++ b/argp/argp.h
@@ -1,5 +1,5 @@
/* Hierarchial argument parsing, layered over getopt.
- Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
@@ -38,13 +38,16 @@ typedef int error_t;
#endif
#ifndef __P
-# if (defined __STDC__ && __STDC__) || defined __cplusplus
-# if defined __GNUC__ && defined __cplusplus && __GNUC_MINOR__ >= 8
+# ifdef __cplusplus
+# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 7)
# define __P(args) args throw ()
# else
# define __P(args) args
# endif
# define __PMT(args) args
+# elif defined __STDC__ && __STDC__ > 0
+# define __P(args) args
+# define __PMT(args) args
# else
# define __P(args) ()
# define __PMT(args) ()
diff --git a/assert/assert.h b/assert/assert.h
index ec54f64..bbff941 100644
--- a/assert/assert.h
+++ b/assert/assert.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 94, 95, 96, 97, 98 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,94,95,96,97,98,99 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
@@ -87,13 +87,23 @@ __END_DECLS
/* Version 2.4 and later of GCC define a magical variable `__PRETTY_FUNCTION__'
which contains the name of the function currently being defined.
- This is broken in G++ before version 2.6. */
-# if (!defined __GNUC__ || __GNUC__ < 2 || \
- __GNUC_MINOR__ < (defined __cplusplus ? 6 : 4))
-# define __ASSERT_FUNCTION ((__const char *) 0)
-# else
# define __ASSERT_FUNCTION __PRETTY_FUNCTION__
+ This is broken in G++ before version 2.6.
+ C9x has a similar variable called __func__, but prefer the GCC one since
+ it demangles C++ function names. */
+# ifdef __GNUC__
+# if __GNUC__ > 2 || (__GNUC__ == 2 \
+ && __GNUC_MINOR__ >= (defined __cplusplus ? 6 : 4))
+# define __ASSERT_FUNCTION __PRETTY_FUNCTION__
+# else
+# define __ASSERT_FUNCTION ((__const char *) 0)
+# endif
+# else
+# if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
+# define __ASSERT_FUNCTION __func__
+# else
+# define __ASSERT_FUNCTION ((__const char *) 0)
+# endif
# endif
-
#endif /* NDEBUG. */
diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h
index bc8d7c5..6d4bc62 100644
--- a/misc/sys/cdefs.h
+++ b/misc/sys/cdefs.h
@@ -33,7 +33,7 @@
/* GCC can always grok prototypes. For C++ programs we add throw()
to help it optimize the function calls. But this works only with
gcc 2.8.x and egcs. */
-# if defined __cplusplus && __GNUC_MINOR__ >= 8
+# if defined __cplusplus && (__GNUC__ >= 3 || __GNUC_MINOR__ >= 8)
# define __THROW throw ()
# else
# define __THROW
diff --git a/posix/sys/types.h b/posix/sys/types.h
index 3966a38..8ba3200 100644
--- a/posix/sys/types.h
+++ b/posix/sys/types.h
@@ -132,7 +132,7 @@ typedef unsigned int uint;
/* These size-specific names are used by some of the inet code. */
-#if !defined __GNUC__ || __GNUC__ < 2 || __GNUC_MINOR__ < 7
+#if !defined __GNUC__ || __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
/* These types are defined by the ISO C 9x header <inttypes.h>. */
# ifndef __int8_t_defined