mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
Fix & make linux conditionals uniform (#4278)
The source used a hodge-podge of different combinations of different macros to check for linux: 'linux', '__linux', '__linux__'. As '__linux__' is standard (Posix), and the others are not, the source now uniformly uses __linux__. If either linux or __linux are defined, it is made sure that __linux__ is defined as well.
This commit is contained in:
@@ -258,7 +258,7 @@ bool getCurrentExecPath(char *buf, size_t len)
|
||||
|
||||
|
||||
//// Linux
|
||||
#elif defined(linux) || defined(__linux) || defined(__linux__)
|
||||
#elif defined(__linux__)
|
||||
|
||||
bool getCurrentExecPath(char *buf, size_t len)
|
||||
{
|
||||
@@ -374,7 +374,7 @@ bool setSystemPaths()
|
||||
|
||||
|
||||
//// Linux
|
||||
#elif defined(linux) || defined(__linux)
|
||||
#elif defined(__linux__)
|
||||
|
||||
bool setSystemPaths()
|
||||
{
|
||||
|
Reference in New Issue
Block a user