google / glog

C++ implementation of the Google logging module
http://google.github.io/glog/
BSD 3-Clause "New" or "Revised" License
7.05k stars 2.06k forks source link

fix: remove redundant POSIX function aliases #990

Closed sergiud closed 10 months ago

sergiud commented 10 months ago

The preprocessor defines interfere with method declarations, e.g., in std::basic_filebuf, resulting in following error:

C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.37.32822\include\fstream(376,26): error C2039: '_close': is not a member of 'std::basic_filebuf<char,std::char_traits<char>>' [D:\a\glog\glog\build_Debug\logging_unittest.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.37.32822\include\iosfwd(244,35): message : see declaration of 'std::basic_filebuf<char,std::char_traits<char>>' [D:\a\glog\glog\build_Debug\logging_unittest.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.37.32822\include\fstream(375,10): message : while compiling class template member function 'void std::basic_ofstream<char,std::char_traits<char>>::_close(void)' [D:\a\glog\glog\build_Debug\logging_unittest.vcxproj]
D:\a\glog\glog\src\logging_unittest.cc(788,12): message : see the first reference to 'std::basic_ofstream<char,std::char_traits<char>>::_close' in 'TestBasenameAppendWhenNoTimestamp' [D:\a\glog\glog\build_Debug\logging_unittest.vcxproj]
D:\a\glog\glog\src\logging_unittest.cc(786,12): message : see reference to class template instantiation 'std::basic_ofstream<char,std::char_traits<char>>' being compiled [D:\a\glog\glog\build_Debug\logging_unittest.vcxproj]
codecov-commenter commented 10 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (931323d) 64.14% compared to head (09075fa) 64.23%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #990 +/- ## ========================================== + Coverage 64.14% 64.23% +0.09% ========================================== Files 17 17 Lines 3327 3327 Branches 1125 1125 ========================================== + Hits 2134 2137 +3 Misses 766 766 + Partials 427 424 -3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.