about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-10-04 07:45:53 +0000
committerUlrich Drepper <drepper@redhat.com>2004-10-04 07:45:53 +0000
commit76db92835db06f650ce2468c025e16bfba42e7e5 (patch)
tree9a2b595c6ddc817330b03f2be1fae1d9b0c29984
parent7548969348abfda04bccaad8f3438a7a92c78e50 (diff)
downloadglibc-76db92835db06f650ce2468c025e16bfba42e7e5.tar.gz
glibc-76db92835db06f650ce2468c025e16bfba42e7e5.tar.xz
glibc-76db92835db06f650ce2468c025e16bfba42e7e5.zip
Update.
	* assert/assert.h: Give up on using __builtin_expect.
-rw-r--r--ChangeLog2
-rw-r--r--assert/assert.h23
2 files changed, 5 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index 5a7ec0cb2d..6aaf8ac1b3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
 
+	* assert/assert.h: Give up on using __builtin_expect.
+
 	* elf/rtld.c (dl_main): Only skip => output in ldd mode if both
 	strings are identical.
 
diff --git a/assert/assert.h b/assert/assert.h
index 7458e15de2..2f83146274 100644
--- a/assert/assert.h
+++ b/assert/assert.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,1992,1994-2001,2003 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1992,1994-2001,2003,2004 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
@@ -84,33 +84,16 @@ extern void __assert (const char *__assertion, const char *__file, int __line)
 
 __END_DECLS
 
-/* For the macro definition we use gcc's __builtin_expect if possible
-   to generate good code for the non-error case.  gcc 3.0 is a good
-   enough estimate for when the feature became available.  */
-# if __GNUC_PREREQ (3, 0)
-#  define assert(expr) \
-  (__ASSERT_VOID_CAST (__builtin_expect (!!(expr), 1) ? 0 :		      \
-		       (__assert_fail (__STRING(expr), __FILE__, __LINE__,    \
-				       __ASSERT_FUNCTION), 0)))
-# else
-#  define assert(expr) \
+# define assert(expr) \
   (__ASSERT_VOID_CAST ((expr) ? 0 :					      \
 		       (__assert_fail (__STRING(expr), __FILE__, __LINE__,    \
 				       __ASSERT_FUNCTION), 0)))
-# endif
 
 # ifdef	__USE_GNU
-#  if __GNUC_PREREQ (3, 0)
-#   define assert_perror(errnum) \
-  (__ASSERT_VOID_CAST (__builtin_expect (!(errnum), 1) ? 0 :		      \
-		       (__assert_perror_fail ((errnum), __FILE__, __LINE__,   \
-					      __ASSERT_FUNCTION), 0)))
-#  else
-#   define assert_perror(errnum) \
+#  define assert_perror(errnum) \
   (__ASSERT_VOID_CAST (!(errnum) ? 0 :					      \
 		       (__assert_perror_fail ((errnum), __FILE__, __LINE__,   \
 					      __ASSERT_FUNCTION), 0)))
-#  endif
 # endif
 
 /* Version 2.4 and later of GCC define a magical variable `__PRETTY_FUNCTION__'