webatintel / aquarium

BSD 3-Clause "New" or "Revised" License
23 stars 7 forks source link

End the battle of OS probers #161

Closed hujiajie closed 3 years ago

hujiajie commented 3 years ago

Instead of fighting among at least 3 styles:

if defined(WIN32) // or #ifdef WIN32

if defined(_WIN32) // or #ifdef _WIN32

if defined(WIN32) || defined(_WIN32)

use the one for Windows now:

if defined(OS_WIN)

The following are used for macOS and Linux:

if defined(OS_MACOSX) && !defined(OS_IOS)

if defined(OS_LINUX) && !defined(OS_CHROMEOS)

Hopefully the verbosity can go away with future //build rolls.

This pull request is opened using a shared GitHub account. Please find the actual author in the git log, and use "Rebase and merge" for correct attribution. The author may have no access to this account, so please do not assume there will be replies from a real human. But you can still leave a comment, and code will be updated here once addressed. - Your Sincere Bot