From 45aec0eae4b01b20a4dbd87fb0036b7c4d3a5a88 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 2 Sep 2009 12:20:32 +0200 Subject: [PATCH] infra: define ATTRIBUTE_NONNULL to mark non-NULL parameters * src/internal.h (ATTRIBUTE_NONNULL): Define. --- src/internal.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/internal.h b/src/internal.h index 936cd03020..8fa579cb33 100644 --- a/src/internal.h +++ b/src/internal.h @@ -116,6 +116,14 @@ #endif #endif +#ifndef ATTRIBUTE_NONNULL +# if __GNUC_PREREQ (3, 3) +# define ATTRIBUTE_NONNULL(m) __attribute__((__nonnull__(m))) +# else +# define ATTRIBUTE_NONNULL(m) +# endif +#endif + #else #ifndef ATTRIBUTE_UNUSED #define ATTRIBUTE_UNUSED