[PATCH] D137268: [clang][Headers] Do not define varargs macros for __need___va_list

Elliott Hughes via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 20 11:25:57 PST 2023


enh added a comment.

is there a corresponding glibc change so that `va_list` is exported for `_POSIX_SOURCE` cases? see https://android-review.git.corp.google.com/c/platform/bionic/+/2397313 where i'm having to disable some bionic testing against glibc because the glibc (2.17!) <wchar.h> now no longer exports `va_list`. i did look for a ToT glibc patch to backport (until we've _actually_ switched from glibc to musl for the host), but couldn't obviously find it?

https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/basedefs/wchar.h.html says:
"""
The <wchar.h> header shall define the following types:
...
va_list
[CX] As described in <stdarg.h>.
"""
which is why i think our "<wchar.h> exports `va_list`" test is correct. (Android doesn't support an "ISO only" mode --- you're effectively always in `_POSIX_SOURCE` mode, so we build the test against glibc with `_POSIX_SOURCE` defined.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137268/new/

https://reviews.llvm.org/D137268



More information about the cfe-commits mailing list