From e64f847aeecaea35ca494b8db31807de167caf69 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 23 Jun 2018 14:43:56 +0200 Subject: [PATCH] libc-config: Fix conflict with FreeBSD include files. * lib/cdefs.h (__nonnull): Remove definition. * lib/libc-config.h (__nonnull): Remove undefinition. --- ChangeLog | 6 ++++++ lib/cdefs.h | 11 ++++------- lib/libc-config.h | 1 - 3 files changed, 10 insertions(+), 8 deletions(-) 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 -- 2.39.5