rocksdb/port/win
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
..
env_default.cc Remove using namespace (#9369) 2022-01-12 09:31:12 -08:00
env_win.cc Use STATIC_AVOID_DESTRUCTION for static objects with non-trivial destructors (#9958) 2022-05-17 09:39:22 -07:00
env_win.h Added GetFactoryCount/Names/Types to ObjectRegistry (#9358) 2022-05-16 09:44:43 -07:00
io_win.cc Support dynamic sector size in alignment validation for Windows. (#8613) 2021-08-16 07:31:57 -07:00
io_win.h Support dynamic sector size in alignment validation for Windows. (#8613) 2021-08-16 07:31:57 -07:00
port_win.cc Fix potential ambiguities in/around port/sys_time.h (#10045) 2022-05-24 18:25:20 -07:00
port_win.h Remove ROCKSDB_SUPPORT_THREAD_LOCAL define because it's a part of C++11 (#10015) 2022-05-18 15:25:19 -07:00
win_jemalloc.cc build: make it compile with @mode/win (#7406) 2020-09-23 12:55:54 -07:00
win_logger.cc Fix potential ambiguities in/around port/sys_time.h (#10045) 2022-05-24 18:25:20 -07:00
win_logger.h Use SystemClock* instead of std::shared_ptr<SystemClock> in lower level routines (#8033) 2021-03-15 04:34:11 -07:00
win_thread.cc Fix incorrect order of comments in win_thread.cc (#9033) 2021-10-27 13:25:01 -07:00
win_thread.h Replace most typedef with using= (#8751) 2021-09-07 11:31:59 -07:00
xpress_win.cc Introduce a helper method UncompressData (#7434) 2020-09-25 09:01:45 -07:00
xpress_win.h Introduce a helper method UncompressData (#7434) 2020-09-25 09:01:45 -07:00