rocksdb/logging
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
..
auto_roll_logger_test.cc Make SystemClock into a Customizable Class (#8636) 2021-09-21 09:23:48 -07:00
auto_roll_logger.cc Do not attempt to rename non-existent info log (#8622) 2021-08-04 17:25:00 -07:00
auto_roll_logger.h Add a SystemClock class to capture the time functions of an Env (#7858) 2021-01-25 22:09:11 -08:00
env_logger_test.cc Make SystemClock into a Customizable Class (#8636) 2021-09-21 09:23:48 -07:00
env_logger.h Fix potential ambiguities in/around port/sys_time.h (#10045) 2022-05-24 18:25:20 -07:00
event_logger_test.cc Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
event_logger.cc Remove unused includes (#7604) 2020-10-28 23:22:27 -07:00
event_logger.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
log_buffer.cc Fix potential ambiguities in/around port/sys_time.h (#10045) 2022-05-24 18:25:20 -07:00
log_buffer.h Fix potential ambiguities in/around port/sys_time.h (#10045) 2022-05-24 18:25:20 -07:00
logging.h Fix info log source file display length (#5824) 2020-04-08 20:18:08 -07:00
posix_logger.h Fix potential ambiguities in/around port/sys_time.h (#10045) 2022-05-24 18:25:20 -07:00