Skip to content

[libc++] Remove _LIBCPP_HAS_NO_FGETPOS_FSETPOS #72073

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions libcxx/include/__config
Original file line number Diff line number Diff line change
Expand Up @@ -1344,13 +1344,6 @@ __sanitizer_verify_double_ended_contiguous_container(const void*, const void*, c
# define _LIBCPP_FOPEN_CLOEXEC_MODE
# endif

// Support for _FILE_OFFSET_BITS=64 landed gradually in Android, so the full set
// of functions used in cstdio may not be available for low API levels when
// using 64-bit file offsets on LP32.
# if defined(__BIONIC__) && defined(__USE_FILE_OFFSET64) && __ANDROID_API__ < 24
# define _LIBCPP_HAS_NO_FGETPOS_FSETPOS
# endif

# if __has_attribute(__init_priority__)
# define _LIBCPP_INIT_PRIORITY_MAX __attribute__((__init_priority__(100)))
# else
Expand Down
4 changes: 0 additions & 4 deletions libcxx/include/cstdio
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,9 @@ using ::putc _LIBCPP_USING_IF_EXISTS;
using ::ungetc _LIBCPP_USING_IF_EXISTS;
using ::fread _LIBCPP_USING_IF_EXISTS;
using ::fwrite _LIBCPP_USING_IF_EXISTS;
#ifndef _LIBCPP_HAS_NO_FGETPOS_FSETPOS
using ::fgetpos _LIBCPP_USING_IF_EXISTS;
#endif
using ::fseek _LIBCPP_USING_IF_EXISTS;
#ifndef _LIBCPP_HAS_NO_FGETPOS_FSETPOS
using ::fsetpos _LIBCPP_USING_IF_EXISTS;
#endif
using ::ftell _LIBCPP_USING_IF_EXISTS;
using ::rewind _LIBCPP_USING_IF_EXISTS;
using ::clearerr _LIBCPP_USING_IF_EXISTS;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,9 @@ ASSERT_SAME_TYPE(int, decltype(puts("")));
ASSERT_SAME_TYPE(int, decltype(ungetc(0,fp)));
ASSERT_SAME_TYPE(size_t, decltype(fread((void*)0,0,0,fp)));
ASSERT_SAME_TYPE(size_t, decltype(fwrite((const void*)arr,1,0,fp)));
#ifndef TEST_HAS_NO_FGETPOS_FSETPOS
ASSERT_SAME_TYPE(int, decltype(fgetpos(fp, &fpos)));
#endif
ASSERT_SAME_TYPE(int, decltype(fseek(fp, 0,0)));
#ifndef TEST_HAS_NO_FGETPOS_FSETPOS
ASSERT_SAME_TYPE(int, decltype(fsetpos(fp, &fpos)));
#endif
ASSERT_SAME_TYPE(long, decltype(ftell(fp)));
ASSERT_SAME_TYPE(void, decltype(rewind(fp)));
ASSERT_SAME_TYPE(void, decltype(clearerr(fp)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,9 @@ int main(int, char**)
static_assert((std::is_same<decltype(std::ungetc(0,fp)), int>::value), "");
static_assert((std::is_same<decltype(std::fread((void*)0,0,0,fp)), std::size_t>::value), "");
static_assert((std::is_same<decltype(std::fwrite(vp,0,0,fp)), std::size_t>::value), "");
#ifndef TEST_HAS_NO_FGETPOS_FSETPOS
static_assert((std::is_same<decltype(std::fgetpos(fp, &fpos)), int>::value), "");
#endif
static_assert((std::is_same<decltype(std::fseek(fp, 0,0)), int>::value), "");
#ifndef TEST_HAS_NO_FGETPOS_FSETPOS
static_assert((std::is_same<decltype(std::fsetpos(fp, &fpos)), int>::value), "");
#endif
static_assert((std::is_same<decltype(std::ftell(fp)), long>::value), "");
static_assert((std::is_same<decltype(std::rewind(fp)), void>::value), "");
static_assert((std::is_same<decltype(std::clearerr(fp)), void>::value), "");
Expand Down
4 changes: 0 additions & 4 deletions libcxx/test/support/test_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -390,10 +390,6 @@ inline void DoNotOptimize(Tp const& value) {
# define TEST_HAS_NO_FILESYSTEM
#endif

#if defined(_LIBCPP_HAS_NO_FGETPOS_FSETPOS)
# define TEST_HAS_NO_FGETPOS_FSETPOS
#endif

#if defined(_LIBCPP_HAS_NO_C8RTOMB_MBRTOC8)
# define TEST_HAS_NO_C8RTOMB_MBRTOC8
#endif
Expand Down