X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fnetradiant.git;a=blobdiff_plain;f=libs%2Fos%2Fpath.h;h=a3db167cb484ad84abbff192fc9289ae3408fcc1;hp=e3329a758c76ec79291659a0af7cc2807ccbc0bb;hb=0f2e4b773715b05595f1c149d99fcc4795e01948;hpb=b7e36c120eb1546a6c6f97f30e42ab7f9a559c61 diff --git a/libs/os/path.h b/libs/os/path.h index e3329a75..a3db167c 100644 --- a/libs/os/path.h +++ b/libs/os/path.h @@ -22,6 +22,8 @@ #if !defined ( INCLUDED_OS_PATH_H ) #define INCLUDED_OS_PATH_H +#include "globaldefs.h" + /// \file /// \brief OS file-system path comparison, decomposition and manipulation. /// @@ -33,7 +35,7 @@ #include "string/string.h" -#if defined( WIN32 ) +#if GDEF_OS_WINDOWS #define OS_CASE_INSENSITIVE #endif @@ -85,10 +87,10 @@ inline bool path_equal_n( const char* path, const char* other, std::size_t n ){ /// \brief Returns true if \p path is a fully qualified file-system path. /// O(1) inline bool path_is_absolute( const char* path ){ -#if defined( WIN32 ) +#if GDEF_OS_WINDOWS return path[0] == '/' || ( path[0] != '\0' && path[1] == ':' ); // local drive -#elif defined( POSIX ) +#elif GDEF_OS_POSIX return path[0] == '/'; #endif }