Make __nonnull macro compatible with glibc
This form allows for multiple arguments, e.g. __nonnull((1,2)). Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
This commit is contained in:
parent
f2b27ce620
commit
36a0a675b4
|
@ -171,9 +171,9 @@ int _EXFUN(pthread_setschedprio, (pthread_t thread, int prio));
|
|||
#endif /* defined(_POSIX_THREAD_PRIORITY_SCHEDULING) */
|
||||
|
||||
#if __GNU_VISIBLE
|
||||
int pthread_getname_np(pthread_t, char *, size_t) __nonnull(2);
|
||||
int pthread_getname_np(pthread_t, char *, size_t) __nonnull((2));
|
||||
|
||||
int pthread_setname_np(pthread_t, const char *) __nonnull(2);
|
||||
int pthread_setname_np(pthread_t, const char *) __nonnull((2));
|
||||
#endif
|
||||
|
||||
#if defined(_POSIX_THREAD_PRIO_INHERIT) || defined(_POSIX_THREAD_PRIO_PROTECT)
|
||||
|
|
|
@ -282,7 +282,7 @@ int _EXFUN(_unsetenv_r,(struct _reent *, const char *__string));
|
|||
#endif /* !__CYGWIN__ */
|
||||
|
||||
#if __POSIX_VISIBLE >= 200112
|
||||
int _EXFUN(__nonnull (1) posix_memalign,(void **, size_t, size_t));
|
||||
int _EXFUN(__nonnull ((1)) posix_memalign,(void **, size_t, size_t));
|
||||
#endif
|
||||
|
||||
char * _EXFUN(_dtoa_r,(struct _reent *, double, int, int, int *, int*, char**));
|
||||
|
|
|
@ -169,7 +169,7 @@ int _EXFUN(strverscmp,(const char *, const char *));
|
|||
sure here. */
|
||||
#if __GNU_VISIBLE && !defined(basename)
|
||||
# define basename basename
|
||||
char *_EXFUN(__nonnull (1) basename,(const char *)) __asm__(__ASMNAME("__gnu_basename"));
|
||||
char *_EXFUN(__nonnull ((1)) basename,(const char *)) __asm__(__ASMNAME("__gnu_basename"));
|
||||
#endif
|
||||
|
||||
#include <sys/string.h>
|
||||
|
|
|
@ -397,7 +397,7 @@
|
|||
#endif
|
||||
|
||||
#if __GNUC_PREREQ__(3, 3)
|
||||
#define __nonnull(x) __attribute__((__nonnull__(x)))
|
||||
#define __nonnull(x) __attribute__((__nonnull__ x))
|
||||
#define __nonnull_all __attribute__((__nonnull__))
|
||||
#else
|
||||
#define __nonnull(x)
|
||||
|
|
Loading…
Reference in New Issue