]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
2007-05-10 Ulrich Drepper <drepper@redhat.com>
authorJakub Jelinek <jakub@redhat.com>
Thu, 12 Jul 2007 15:22:47 +0000 (15:22 +0000)
committerJakub Jelinek <jakub@redhat.com>
Thu, 12 Jul 2007 15:22:47 +0000 (15:22 +0000)
* include/sys/cdefs.h: Redefine __nonnull so that test for
incorrect parameters in the libc code itself are not omitted.

ChangeLog
include/sys/cdefs.h

index d0a7d6828758cb1508c5f2b0088962e24a25bb64..a54da6b92fe1c485a7ee07dd24c10e7552dec7c8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-05-10  Ulrich Drepper  <drepper@redhat.com>
+
+       * include/sys/cdefs.h: Redefine __nonnull so that test for
+       incorrect parameters in the libc code itself are not omitted.
+
 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
            Jakub Jelinek  <jakub@redhat.com>
 
index 8ba980477d351a7410c845fb7bef677b12fb2327..cd0750b4524de931614096a2eed6132fafb6562f 100644 (file)
@@ -2,6 +2,12 @@
 
 #include <misc/sys/cdefs.h>
 
+/* The compiler will optimize based on the knowledge the parameter is
+   not NULL.  This will omit tests.  A robust implementation cannot allow
+   this so when compiling glibc itself we ignore this attribute.  */
+#undef __nonnull
+#define __nonnull(params)
+
 extern void __chk_fail (void) __attribute__ ((__noreturn__));
 libc_hidden_proto (__chk_fail)
 rtld_hidden_proto (__chk_fail)