Please Don't Do This
So I was working with a popular, open-source C library and came across something like this:
#if defined(!WINDOWS) // Make things portable #define closesocket close // etc... #endif I’m not going to state which library as the details don’t really matter here.
Please don’t do this! My code was written in C++ and used another C++ cross-platform wrapper library that had its own class members named “closesocket” and “close.” For the sake of clarity, let’s call them Lib::closesocket() and Lib::close().
read more