Skip to content
This repository was archived by the owner on Apr 21, 2025. It is now read-only.

Conversation

@lighterowl
Copy link
Contributor

I've never been a huge fan of custom platform defines which need to be supplied by the build system, especially when these defines can be replaced by checks relying on the presence/value of standard defines which are supplied by the operating system headers and/or the compiler :

  • _WIN32 is defined for all 32- and 64-bit Windows environments, and can thus replace WIN32.
  • The __linux__ define is set to 1 on systems using the Linux kernel, and can thus replace LINUX.
  • MacOS can be identified by checking whether both __APPLE__ and __MACH__ are defined - such a check can replace MAC.

As a bonus, remove all unused source and header files from the tree. I don't think moving stuff to unused serves any purpose anymore.

This was tested on Windows (MSVC and MSYS2), Linux (GCC), and MacOS via osxcross.

@justdan96 justdan96 self-assigned this Dec 8, 2019
@justdan96 justdan96 added the enhancement New feature or request label Dec 8, 2019
@justdan96 justdan96 merged commit d9ac5f8 into justdan96:master Dec 10, 2019
@lighterowl lighterowl deleted the fixes-and-cleanups branch December 12, 2019 10:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants