]> Savannah Git Hosting - gnulib.git/commitdiff
libc-config: Fix conflict with FreeBSD include files.
authorBruno Haible <bruno@clisp.org>
Sat, 23 Jun 2018 12:43:56 +0000 (14:43 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 23 Jun 2018 12:43:56 +0000 (14:43 +0200)
* lib/cdefs.h (__nonnull): Remove definition.
* lib/libc-config.h (__nonnull): Remove undefinition.

ChangeLog
lib/cdefs.h
lib/libc-config.h

index 99ca86eedaf4e1d3d991890bd8c6f4a946259793..e421f118769d19fbc2e561cb5a7ee31bc41b4144 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2018-06-23  Bruno Haible  <bruno@clisp.org>
+
+       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  <eggert@cs.ucla.edu>
 
        random_r: do not crash if state is unaligned
index f6c20fe2ed3280a17a9437263d2ceef27cd9006b..76325c5de57211767525bbca00b3504d03ee4842 100644 (file)
 # 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.  */
index 747d6206b5409d3dc3f004ebd775984cbae0d08e..14f0bb4075e03da0eae2062f4afd700b43928723 100644 (file)
 #undef __glibc_macro_warning1
 #undef __glibc_unlikely
 #undef __inline
-#undef __nonnull
 #undef __ptr_t
 #undef __restrict
 #undef __restrict_arr