From: Jakub Jelinek Date: Thu, 12 Jul 2007 15:22:47 +0000 (+0000) Subject: 2007-05-10 Ulrich Drepper X-Git-Tag: cvs/fedora-glibc-2_5-20070712T1701~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=acf33246a354dae234916567f4ec13ab7605f363;p=thirdparty%2Fglibc.git 2007-05-10 Ulrich Drepper * include/sys/cdefs.h: Redefine __nonnull so that test for incorrect parameters in the libc code itself are not omitted. --- diff --git a/ChangeLog b/ChangeLog index d0a7d682875..a54da6b92fe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-05-10 Ulrich Drepper + + * 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 Jakub Jelinek diff --git a/include/sys/cdefs.h b/include/sys/cdefs.h index 8ba980477d3..cd0750b4524 100644 --- a/include/sys/cdefs.h +++ b/include/sys/cdefs.h @@ -2,6 +2,12 @@ #include +/* 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)