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] Fix alloc_align and alloc_size macros for multiple arguments
Date: Wed, 14 Mar 2018 15:19:00 -0000	[thread overview]
Message-ID: <20180314151919.116309.qmail@sourceware.org> (raw)

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

commit e494b560350cabef94126a4478096aae89ae35a0
Author: Yaakov Selkowitz <yselkowi@redhat.com>
Date:   Wed Mar 14 10:17:51 2018 -0500

    Fix alloc_align and alloc_size macros for multiple arguments
    
    https://sourceware.org/ml/newlib/2018/msg00263.html
    
    This is a follow-up to commit 4564b30f331a067e71b25308ac7c8a85ceb4b122.
    
    Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>

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

diff --git a/newlib/libc/include/stdlib.h b/newlib/libc/include/stdlib.h
index 593760a..564ce8a 100644
--- a/newlib/libc/include/stdlib.h
+++ b/newlib/libc/include/stdlib.h
@@ -324,8 +324,8 @@ extern long double strtold (const char *__restrict, char **__restrict);
  * If we're in a mode greater than C99, expose C11 functions.
  */
 #if __ISO_C_VISIBLE >= 2011
-void *	aligned_alloc(size_t, size_t) __malloc_like __alloc_align(1)
-	    __alloc_size(2);
+void *	aligned_alloc(size_t, size_t) __malloc_like __alloc_align((1))
+	    __alloc_size((2));
 int	at_quick_exit(void (*)(void));
 _Noreturn void
 	quick_exit(int);
diff --git a/newlib/libc/include/sys/cdefs.h b/newlib/libc/include/sys/cdefs.h
index fc564a5..b3f8d19 100644
--- a/newlib/libc/include/sys/cdefs.h
+++ b/newlib/libc/include/sys/cdefs.h
@@ -258,12 +258,12 @@
 #define	__section(x)	__attribute__((__section__(x)))
 #endif
 #if __GNUC_PREREQ__(4, 3) || __has_attribute(__alloc_size__)
-#define	__alloc_size(x)	__attribute__((__alloc_size__(x)))
+#define	__alloc_size(x)	__attribute__((__alloc_size__ x))
 #else
 #define	__alloc_size(x)
 #endif
 #if __GNUC_PREREQ__(4, 9) || __has_attribute(__alloc_align__)
-#define	__alloc_align(x)	__attribute__((__alloc_align__(x)))
+#define	__alloc_align(x)	__attribute__((__alloc_align__ x))
 #else
 #define	__alloc_align(x)
 #endif


                 reply	other threads:[~2018-03-14 15:19 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=20180314151919.116309.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).