Browse Source

use standard platform macros. closes #43

pull/44/head
Antonio SJ Musumeci 10 years ago
parent
commit
1f90203025
  1. 8
      Makefile
  2. 4
      src/ugid.cpp
  3. 4
      src/ugid.hpp

8
Makefile

@ -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:

4
src/ugid.cpp

@ -24,8 +24,8 @@
#include "ugid.hpp" #include "ugid.hpp"
#if defined LINUX
#elif defined OSX
#if defined __linux__
#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

4
src/ugid.hpp

@ -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"

Loading…
Cancel
Save