From 8a1f658bd783e625d947933b6603dbcedb31f75b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 17 Sep 2004 08:44:34 +0000 Subject: Update. 2004-09-17 Ulrich Drepper * misc/sys/cdefs.h: Define __nonnull using nonnull function attribute for gcc 3.3 and higher. * io/fcntl.h: Add __nonnull where appropriate. * io/ftw.h: Likewise. * io/utime.h: Likewise. * io/sys/poll.h: Likewise. * io/sys/sendfile.h: Likewise. * io/sys/stat.h: Likewise. * io/sys/statfs.h: Likewise. * io/sys/statvfs.h: Likewise. * posix/unistd.h: Likewise. --- misc/sys/cdefs.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'misc') diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h index 1a9b0e7..8894d0d 100644 --- a/misc/sys/cdefs.h +++ b/misc/sys/cdefs.h @@ -242,6 +242,14 @@ # 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 + /* It is possible to compile containing GCC extensions even if GCC is run in pedantic mode if the uses are carefully marked using the `__extension__' keyword. But this is not generally available before -- cgit v1.1