Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/newlib
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2008-07-18 00:56:51 +0400
committerJeff Johnston <jjohnstn@redhat.com>2008-07-18 00:56:51 +0400
commitd2af9effc5b998a46c5819a269807976465a00b4 (patch)
tree950bbd78ff3dbc6e09f2c9abf90d65fec769396b /newlib
parent7f48e8a8b3e241579f57d0b5b91db1449ba96fe8 (diff)
2008-07-17 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/assert.h (__ASSERT_FUNC): Define to __FUNCTION__ when __STDC_VERSION__ < 199901L and __GNUC__ >= 2.
Diffstat (limited to 'newlib')
-rw-r--r--newlib/ChangeLog5
-rw-r--r--newlib/libc/include/assert.h8
2 files changed, 11 insertions, 2 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index 7b93e69d1..9eb10cc99 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,3 +1,8 @@
+2008-07-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/assert.h (__ASSERT_FUNC): Define to __FUNCTION__ when
+ __STDC_VERSION__ < 199901L and __GNUC__ >= 2.
+
2008-07-17 Ken Werner <ken.werner@de.ibm.com>
* libc/machine/spu/strcpy.h: Pad null bytes if necessary.
diff --git a/newlib/libc/include/assert.h b/newlib/libc/include/assert.h
index ed14928ba..e542b214f 100644
--- a/newlib/libc/include/assert.h
+++ b/newlib/libc/include/assert.h
@@ -21,10 +21,14 @@ extern "C" {
# if defined __cplusplus && defined __GNUC__
# define __ASSERT_FUNC __PRETTY_FUNCTION__
- /* C99 requires the use of __func__, gcc also supports it. */
-# elif defined __GNUC__ || __STDC_VERSION__ >= 199901L
+ /* C99 requires the use of __func__. */
+# elif __STDC_VERSION__ >= 199901L
# define __ASSERT_FUNC __func__
+ /* Older versions of gcc don't have __func__ but can use __FUNCTION__. */
+# elif __GNUC__ >= 2
+# define __ASSERT_FUNC __FUNCTION__
+
/* failed to detect __func__ support. */
# else
# define __ASSERT_FUNC ((char *) 0)