mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-08-03 04:50:05 +02:00
Use __linux__ to identify Linux-based systems.
This is a backport from DMD 2.065. It is needed to compile LDC2 with -std=c++11.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
// See the included readme.txt for details.
|
||||
|
||||
#ifndef POSIX
|
||||
#define POSIX (linux || __APPLE__ || __FreeBSD__ || __OpenBSD__ || __sun)
|
||||
#define POSIX (__linux__ || __APPLE__ || __FreeBSD__ || __OpenBSD__ || __sun)
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -878,11 +878,11 @@ void FileName::ensurePathToNameExists(const char *name)
|
||||
*/
|
||||
const char *FileName::canonicalName(const char *name)
|
||||
{
|
||||
#if linux
|
||||
#if __linux__
|
||||
// Lovely glibc extension to do it for us
|
||||
return canonicalize_file_name(name);
|
||||
#elif POSIX
|
||||
#if _POSIX_VERSION >= 200809L || defined (linux)
|
||||
#if _POSIX_VERSION >= 200809L || defined (__linux__)
|
||||
// NULL destination buffer is allowed and preferred
|
||||
return realpath(name, NULL);
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user