Skip to content
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

fix: remove redundant POSIX function aliases #990

Merged
merged 1 commit into from
Dec 19, 2023

Conversation

sergiud
Copy link
Collaborator

@sergiud sergiud commented Dec 19, 2023

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]

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]
@sergiud sergiud added the bug label Dec 19, 2023
@sergiud sergiud added this to the 0.7 milestone Dec 19, 2023
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

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

Additional details and impacted files
@@            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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sergiud sergiud merged commit b6082e5 into master Dec 19, 2023
268 checks passed
@sergiud sergiud deleted the remove-msvc-posix-aliases branch December 19, 2023 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants