public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Fangrui Song <maskray@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc/maskray/clang] Skip undefined va_arg_pack Date: Wed, 20 Oct 2021 21:24:00 +0000 (GMT) [thread overview] Message-ID: <20211020212400.A318C3857C6B@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8fb9021a4ce7ef71834fd3e7737161f730e54c84 commit 8fb9021a4ce7ef71834fd3e7737161f730e54c84 Author: Stan Shebs <stanshebs@google.com> Date: Fri Jan 19 09:31:04 2018 -0800 Skip undefined va_arg_pack Diff: --- misc/sys/cdefs.h | 5 +++++ sysdeps/generic/ldsodefs.h | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h index c353d2ec4d..4b7f3f7005 100644 --- a/misc/sys/cdefs.h +++ b/misc/sys/cdefs.h @@ -453,9 +453,14 @@ /* GCC 4.3 and above allow passing all anonymous arguments of an __extern_always_inline function to some other vararg function. */ #if __GNUC_PREREQ (4,3) +#if defined(__clang__) +# define __va_arg_pack() __VA_ARGS__ +# define __va_arg_pack_len() 0 +#else # define __va_arg_pack() __builtin_va_arg_pack () # define __va_arg_pack_len() __builtin_va_arg_pack_len () #endif +#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 diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index 0410f777a6..a1a798c8de 100644 --- a/sysdeps/generic/ldsodefs.h +++ b/sysdeps/generic/ldsodefs.h @@ -818,7 +818,11 @@ _dl_dprintf (int fd, const char *fmt, ...) { /* Use local declaration to avoid includign <stdio.h>. */ extern int __dprintf(int fd, const char *format, ...) attribute_hidden; +#if defined(__clang__) + __dprintf (fd, fmt); +#else __dprintf (fd, fmt, __builtin_va_arg_pack ()); +#endif } #endif
next reply other threads:[~2021-10-20 21:24 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-10-20 21:24 Fangrui Song [this message] -- strict thread matches above, loose matches on Subject: below -- 2021-11-03 7:41 Fangrui Song 2021-11-02 20:00 Fangrui Song 2021-10-19 17:01 Fangrui Song 2021-10-11 18:16 Fangrui Song 2021-10-10 23:12 Fangrui Song 2021-10-07 20:13 Fangrui Song
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=20211020212400.A318C3857C6B@sourceware.org \ --to=maskray@sourceware.org \ --cc=glibc-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: linkBe 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).