From: Bruno Haible Date: Sat, 23 Jun 2018 12:43:56 +0000 (+0200) Subject: libc-config: Fix conflict with FreeBSD include files. X-Git-Tag: v1.0~5563 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e64f847aeecaea35ca494b8db31807de167caf69;p=thirdparty%2Fgnulib.git libc-config: Fix conflict with FreeBSD include files. * lib/cdefs.h (__nonnull): Remove definition. * lib/libc-config.h (__nonnull): Remove undefinition. --- diff --git a/ChangeLog b/ChangeLog index 99ca86eeda..e421f11876 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2018-06-23 Bruno Haible + + libc-config: Fix conflict with FreeBSD include files. + * lib/cdefs.h (__nonnull): Remove definition. + * lib/libc-config.h (__nonnull): Remove undefinition. + 2018-06-21 Paul Eggert random_r: do not crash if state is unaligned diff --git a/lib/cdefs.h b/lib/cdefs.h index f6c20fe2ed..76325c5de5 100644 --- a/lib/cdefs.h +++ b/lib/cdefs.h @@ -282,13 +282,10 @@ # define __attribute_format_strfmon__(a,b) /* Ignore */ #endif -/* The nonull function attribute allows to mark pointer parameters which - must not be NULL. */ -#if __GNUC_PREREQ (3,3) -# define __nonnull(params) __attribute__ ((__nonnull__ params)) -#else -# define __nonnull(params) -#endif +/* The nonnull function attribute allows to mark pointer parameters which + must not be NULL. + In Gnulib we use the macro _GL_ARG_NONNULL instead of __nonnull, because + __nonnull is defined in an incompatible way in FreeBSD's include files. */ /* If fortification mode, we warn about unused results of certain function calls which can lead to problems. */ diff --git a/lib/libc-config.h b/lib/libc-config.h index 747d6206b5..14f0bb4075 100644 --- a/lib/libc-config.h +++ b/lib/libc-config.h @@ -136,7 +136,6 @@ #undef __glibc_macro_warning1 #undef __glibc_unlikely #undef __inline -#undef __nonnull #undef __ptr_t #undef __restrict #undef __restrict_arr