These aren't available on Android in all configurations.
Details
- Reviewers
EricWF mclow.lists ldionne - Group Reviewers
Restricted Project - Commits
- rGff87813715ec: Don't expose unavailable cstdio functions.
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
libcxx/include/__config | ||
---|---|---|
1551 | I believe this would be easier to understand if it were instead _LIBCPP_HAS_NO_FGETPOS. The condition would become: #if defined(__ANDROID__) && defined(__USE_FILE_OFFSET64) && __ANDROID_API < 24 Do you agree? |
libcxx/include/__config | ||
---|---|---|
1551 | Yep, SGTM. Also corrected __ANDROID__ to __BIONIC__, not that there are any non-android bionic users old enough (or 32-bit enough) for this to be a problem. |
Are there no required changes to the tests as well? I see libcxx/test/std/depr/depr.c.headers/stdio_h.pass.cpp using these declarations.
Yep, good point. I think we don't run the full libc++ test suite for the broken configuration. Fixed.
Could we add a .fail.cpp test that ensures when _LIBCPP_HAS_NO_FGETPOS is defined we don't actually have it?
Something like:
using T = decltype(::fgetpos); #ifdef _LIBCPP_HAS_NO_FGETPOS // expected-error@-2 {{no such thing}} #else // expected-no-diagnostics #endif
libcxx/include/__config | ||
---|---|---|
1551 | Do we really need two macros for this? I would prefer one. |
libcxx/test/std/depr/depr.c.headers/no_fgetpos_fsetpos.fail.cpp | ||
---|---|---|
1 ↗ | (On Diff #250334) | Missing license comment and also // REQUIRES: verify-support. And I believe this test should be in libcxx/test/libcxx, not in` libcxx/test/std`, cause it is libc++ specific. |
I believe this would be easier to understand if it were instead _LIBCPP_HAS_NO_FGETPOS. The condition would become:
Do you agree?