From 75deb260dedc57be5406716744c87813df2c4567 Mon Sep 17 00:00:00 2001 From: Markus Date: Mon, 23 Sep 2019 16:41:30 +0200 Subject: [PATCH] =?UTF-8?q?=C3=A4ndere=20macros=20zu=20stablieren=20macros?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parameterManager.cpp | 6 +++--- parameterManager.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/parameterManager.cpp b/parameterManager.cpp index 85b3190..316269d 100644 --- a/parameterManager.cpp +++ b/parameterManager.cpp @@ -5,12 +5,12 @@ int setPaths(Settings &settings) //Path settings std::string CacheDir, SettingsDir; -#ifdef linux +#ifdef __linux__ CacheDir = std::string(getenv("HOME")) + "/.cache/S_New4/"; SettingsDir = std::string( getenv("HOME") ) + "/.config/S_New4/"; settings.pathSymbol = '/'; #endif -#ifdef __WIN32 +#ifdef _WIN32 CacheDir = std::string(getenv("APPDATA")) + "\\Local\\S_New4\\"; SettingsDir = std::string( getenv("APPDATA") ) + "\\Roaming\\S_New4\\"; settings.pathSymbol = '\\'; @@ -1052,7 +1052,7 @@ bool makePathIsOk(std::string path) bool createDirIsOk(std::string path) { -#ifdef linux +#ifdef __linux__ if(mkdir(path.c_str(), 0777) != 0) { #endif #ifdef _WIN32 diff --git a/parameterManager.h b/parameterManager.h index d14261b..f47c3b0 100644 --- a/parameterManager.h +++ b/parameterManager.h @@ -1,9 +1,9 @@ #ifndef PARAMETERMANAGER_H #define PARAMETERMANAGER_H -#ifndef linux -#ifndef __WIN32 -#define linux +#ifndef __linux__ +#ifndef _WIN32 +Error Invalid System: Only for Linux and Windows systems #endif #endif