Merge pull request #44 from trapexit/platformdefines

use standard platform macros. closes #43
This commit is contained in:
Antonio SJ Musumeci 2015-02-02 21:32:23 -05:00
commit 1f61a662ad
3 changed files with 4 additions and 12 deletions

View File

@ -91,14 +91,6 @@ $(warning "xattr not available: disabling")
CFLAGS += -DWITHOUT_XATTR CFLAGS += -DWITHOUT_XATTR
endif endif
KERNEL = $(shell uname -s)
ifeq ($(KERNEL),Linux)
CFLAGS += -DLINUX
endif
ifeq ($(KERNEL),Darwin)
CFLAGS += -DOSX
endif
all: $(TARGET) clonepath all: $(TARGET) clonepath
help: help:

View File

@ -24,8 +24,8 @@
#include "ugid.hpp" #include "ugid.hpp"
#if defined LINUX #if defined __linux__
#elif defined OSX #elif defined __APPLE__
#else #else
pthread_mutex_t mergerfs::ugid::SetResetGuard::lock = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t mergerfs::ugid::SetResetGuard::lock = PTHREAD_MUTEX_INITIALIZER;
#endif #endif

View File

@ -25,9 +25,9 @@
#ifndef __UGID_HPP__ #ifndef __UGID_HPP__
#define __UGID_HPP__ #define __UGID_HPP__
#if defined LINUX #if defined __linux__
#include "ugid_linux.hpp" #include "ugid_linux.hpp"
#elif defined OSX #elif defined __APPLE__
#include "ugid_osx.hpp" #include "ugid_osx.hpp"
#else #else
#include "ugid_mutex.hpp" #include "ugid_mutex.hpp"