public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
From: Yaakov Selkowitz <yselkowitz@sourceware.org>
To: newlib-cvs@sourceware.org
Subject: [newlib-cygwin] Make __nonnull macro compatible with glibc
Date: Tue, 28 Nov 2017 16:28:00 -0000	[thread overview]
Message-ID: <20171128162801.99794.qmail@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=36a0a675b4fd1c3cb3370367edb4ba2b457d008f

commit 36a0a675b4fd1c3cb3370367edb4ba2b457d008f
Author: Yaakov Selkowitz <yselkowi@redhat.com>
Date:   Tue Nov 28 04:21:16 2017 -0600

    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>

Diff:
---
 newlib/libc/include/pthread.h   | 4 ++--
 newlib/libc/include/stdlib.h    | 2 +-
 newlib/libc/include/string.h    | 2 +-
 newlib/libc/include/sys/cdefs.h | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/newlib/libc/include/pthread.h b/newlib/libc/include/pthread.h
index 516131d..fb2fa93 100644
--- a/newlib/libc/include/pthread.h
+++ b/newlib/libc/include/pthread.h
@@ -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)
diff --git a/newlib/libc/include/stdlib.h b/newlib/libc/include/stdlib.h
index 968367f..af5bfec 100644
--- a/newlib/libc/include/stdlib.h
+++ b/newlib/libc/include/stdlib.h
@@ -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**));
diff --git a/newlib/libc/include/string.h b/newlib/libc/include/string.h
index 9c536f3..57db774 100644
--- a/newlib/libc/include/string.h
+++ b/newlib/libc/include/string.h
@@ -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>
diff --git a/newlib/libc/include/sys/cdefs.h b/newlib/libc/include/sys/cdefs.h
index 8ce14b6..db5f2bf 100644
--- a/newlib/libc/include/sys/cdefs.h
+++ b/newlib/libc/include/sys/cdefs.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)


                 reply	other threads:[~2017-11-28 16:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171128162801.99794.qmail@sourceware.org \
    --to=yselkowitz@sourceware.org \
    --cc=newlib-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).