rocksdb/env
Levi Tamasi 07a00828af Fix potential ambiguities in/around port/sys_time.h (#10045)
Summary:
There are some time-related POSIX APIs that are not available on Windows
(e.g. `localtime_r`), which we have worked around by providing our own
implementations in `port/sys_time.h`. This workaround actually relies on
some ambiguity: on Windows, a call to `localtime_r` calls
`ROCKSDB_NAMESPACE::port::localtime_r` (which is pulled into
`ROCKSDB_NAMESPACE` by a using-declaration), while on other platforms
it calls the global `localtime_r`. This works fine as long as there is only one
candidate function; however, it breaks down when there is more than one
`localtime_r` visible in a scope.

The patch fixes this by introducing `ROCKSDB_NAMESPACE::port::{TimeVal, GetTimeOfDay, LocalTimeR}`
to eliminate any ambiguity.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/10045

Test Plan: `make check`

Reviewed By: riversand963

Differential Revision: D36639372

Pulled By: ltamasi

fbshipit-source-id: fc13dbfa421b7c8918111a6d9e24ce77e91a7c50
2022-05-24 18:25:20 -07:00
..
composite_env_wrapper.h Make the Env class Customizable (#9293) 2022-01-04 16:45:49 -08:00
composite_env.cc Option type info functions (#9411) 2022-05-13 04:57:08 -07:00
emulated_clock.h Make SystemClock into a Customizable Class (#8636) 2021-09-21 09:23:48 -07:00
env_basic_test.cc Make SystemClock into a Customizable Class (#8636) 2021-09-21 09:23:48 -07:00
env_chroot.cc Make FileSystem a Customizable Class (#8649) 2021-11-02 09:07:11 -07:00
env_chroot.h Make FileSystem a Customizable Class (#8649) 2021-11-02 09:07:11 -07:00
env_encryption_ctr.h Added GetFactoryCount/Names/Types to ObjectRegistry (#9358) 2022-05-16 09:44:43 -07:00
env_encryption.cc Added GetFactoryCount/Names/Types to ObjectRegistry (#9358) 2022-05-16 09:44:43 -07:00
env_posix.cc Fix potential ambiguities in/around port/sys_time.h (#10045) 2022-05-24 18:25:20 -07:00
env_test.cc Fix potential ambiguities in/around port/sys_time.h (#10045) 2022-05-24 18:25:20 -07:00
env.cc Option type info functions (#9411) 2022-05-13 04:57:08 -07:00
file_system_tracer.cc Make TraceRecord and Replayer public (#8611) 2021-08-11 19:32:46 -07:00
file_system_tracer.h Make FileSystem a Customizable Class (#8649) 2021-11-02 09:07:11 -07:00
file_system.cc Introduce a CountedFileSystem for counting file operations (#9283) 2022-02-03 15:01:23 -08:00
fs_posix.cc Use STATIC_AVOID_DESTRUCTION for static objects with non-trivial destructors (#9958) 2022-05-17 09:39:22 -07:00
fs_readonly.h Make FileSystem a Customizable Class (#8649) 2021-11-02 09:07:11 -07:00
fs_remap.cc Test refactoring for Backups+Temperatures (#9655) 2022-03-04 12:32:30 -08:00
fs_remap.h Make FileSystem a Customizable Class (#8649) 2021-11-02 09:07:11 -07:00
io_posix_test.cc Status check enforcement for io_posix_test and options_settable_test (#6857) 2020-05-19 19:22:28 -07:00
io_posix.cc Remove own ToString() (#9955) 2022-05-06 13:03:58 -07:00
io_posix.h Fix segfault in FilePrefetchBuffer with async_io enabled (#9777) 2022-04-04 15:35:43 -07:00
mock_env_test.cc Make SystemClock into a Customizable Class (#8636) 2021-09-21 09:23:48 -07:00
mock_env.cc Fix potential ambiguities in/around port/sys_time.h (#10045) 2022-05-24 18:25:20 -07:00
mock_env.h Make the Env class Customizable (#9293) 2022-01-04 16:45:49 -08:00
unique_id_gen.cc New stable, fixed-length cache keys (#9126) 2021-12-16 17:15:13 -08:00
unique_id_gen.h New stable, fixed-length cache keys (#9126) 2021-12-16 17:15:13 -08:00