Created
October 17, 2013 12:33
-
-
Save jamel/7024108 to your computer and use it in GitHub Desktop.
Patch that helps to build wpkg on Mac OS X 10.8 with GCC 4.8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/CMakeLists.txt b/CMakeLists.txt | |
index 566aa71..e55238d 100644 | |
--- a/CMakeLists.txt | |
+++ b/CMakeLists.txt | |
@@ -87,7 +87,7 @@ if( UNIX ) | |
message( FATAL_ERROR "Unknown architecture '${ARCH}'!" ) | |
endif() | |
if( DEFINED ENV{WPKG_COVERAGE} ) | |
- set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -Werror -Wall -Wextra -pedantic -std=gnu++0x -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Winit-self -Wlogical-op -Wmissing-include-dirs -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-promo -Wstrict-null-sentinel -Wstrict-overflow=1 -Wundef -Wno-unused -Wunused-variable -Wno-variadic-macros -Wno-parentheses -Wno-unknown-pragmas -Wwrite-strings -Wswitch -fdiagnostics-show-option -fprofile-arcs -ftest-coverage" ) | |
+ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -Werror -Wall -Wextra -pedantic -std=gnu++0x -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Winit-self -Wlogical-op -Wmissing-include-dirs -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-promo -Wstrict-null-sentinel -Wstrict-overflow=1 -Wundef -Wno-unused -Wunused-variable -Wno-variadic-macros -Wno-parentheses -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-but-set-parameter -Wwrite-strings -Wswitch -fdiagnostics-show-option -fprofile-arcs -ftest-coverage" ) | |
if( NOT MO_CYGWIN AND NOT MO_SUNOS ) | |
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnoexcept -Wold-style-cast -Wformat=2" ) | |
endif() | |
@@ -99,7 +99,7 @@ if( UNIX ) | |
# Feel free to comment out this line if you don't like the warnings | |
# HOWEVER: do not submit code to us if it generates warnings! | |
# You may want to keep the -O3 though | |
- set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -pedantic -std=gnu++0x -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Winit-self -Wlogical-op -Wmissing-include-dirs -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-promo -Wstrict-null-sentinel -Wstrict-overflow=1 -Wundef -Wno-unused -Wunused-variable -Wno-variadic-macros -Wno-parentheses -Wno-unknown-pragmas -Wwrite-strings -Wswitch -fdiagnostics-show-option" ) | |
+ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -pedantic -std=gnu++0x -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Winit-self -Wlogical-op -Wmissing-include-dirs -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-promo -Wstrict-null-sentinel -Wstrict-overflow=1 -Wundef -Wno-unused -Wunused-variable -Wno-variadic-macros -Wno-parentheses -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-but-set-parameter -Wwrite-strings -Wswitch -fdiagnostics-show-option" ) | |
if( NOT MO_CYGWIN AND NOT MO_SUNOS ) | |
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnoexcept -Wold-style-cast -Wformat=2" ) | |
endif() | |
diff --git a/controlled_vars/controlled_vars_auto_init.h b/controlled_vars/controlled_vars_auto_init.h | |
index 3e80f08..3180707 100644 | |
--- a/controlled_vars/controlled_vars_auto_init.h | |
+++ b/controlled_vars/controlled_vars_auto_init.h | |
@@ -79,10 +79,10 @@ public: | |
#ifndef __APPLE__ | |
auto_init(long double v) { f_value = static_cast<primary_type_t>(v); } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
auto_init(size_t v) { f_value = static_cast<primary_type_t>(v); } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
auto_init(time_t v) { f_value = static_cast<primary_type_t>(v); } | |
#endif | |
operator T () const { return f_value; } | |
@@ -123,10 +123,10 @@ public: | |
#ifndef __APPLE__ | |
auto_init& operator = (long double v) { f_value = v; return *this; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
auto_init& operator = (size_t v) { f_value = v; return *this; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
auto_init& operator = (time_t v) { f_value = v; return *this; } | |
#endif | |
auto_init& operator *= (const auto_init& n) { f_value *= n.f_value; return *this; } | |
@@ -154,10 +154,10 @@ public: | |
#ifndef __APPLE__ | |
auto_init& operator *= (long double v) { f_value *= v; return *this; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
auto_init& operator *= (size_t v) { f_value *= v; return *this; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
auto_init& operator *= (time_t v) { f_value *= v; return *this; } | |
#endif | |
auto_init& operator /= (const auto_init& n) { f_value /= n.f_value; return *this; } | |
@@ -185,10 +185,10 @@ public: | |
#ifndef __APPLE__ | |
auto_init& operator /= (long double v) { f_value /= v; return *this; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
auto_init& operator /= (size_t v) { f_value /= v; return *this; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
auto_init& operator /= (time_t v) { f_value /= v; return *this; } | |
#endif | |
auto_init& operator %= (const auto_init& n) { f_value %= n.f_value; return *this; } | |
@@ -211,10 +211,10 @@ public: | |
#endif | |
auto_init& operator %= (int64_t v) { f_value %= v; return *this; } | |
auto_init& operator %= (uint64_t v) { f_value %= v; return *this; } | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
auto_init& operator %= (size_t v) { f_value %= v; return *this; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
auto_init& operator %= (time_t v) { f_value %= v; return *this; } | |
#endif | |
auto_init& operator += (const auto_init& n) { f_value += n.f_value; return *this; } | |
@@ -242,10 +242,10 @@ public: | |
#ifndef __APPLE__ | |
auto_init& operator += (long double v) { f_value += v; return *this; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
auto_init& operator += (size_t v) { f_value += v; return *this; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
auto_init& operator += (time_t v) { f_value += v; return *this; } | |
#endif | |
auto_init& operator -= (const auto_init& n) { f_value -= n.f_value; return *this; } | |
@@ -273,10 +273,10 @@ public: | |
#ifndef __APPLE__ | |
auto_init& operator -= (long double v) { f_value -= v; return *this; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
auto_init& operator -= (size_t v) { f_value -= v; return *this; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
auto_init& operator -= (time_t v) { f_value -= v; return *this; } | |
#endif | |
auto_init& operator <<= (const auto_init& n) { f_value <<= n.f_value; return *this; } | |
@@ -299,10 +299,10 @@ public: | |
#endif | |
auto_init& operator <<= (int64_t v) { f_value <<= v; return *this; } | |
auto_init& operator <<= (uint64_t v) { f_value <<= v; return *this; } | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
auto_init& operator <<= (size_t v) { f_value <<= v; return *this; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
auto_init& operator <<= (time_t v) { f_value <<= v; return *this; } | |
#endif | |
auto_init& operator >>= (const auto_init& n) { f_value >>= n.f_value; return *this; } | |
@@ -325,10 +325,10 @@ public: | |
#endif | |
auto_init& operator >>= (int64_t v) { f_value >>= v; return *this; } | |
auto_init& operator >>= (uint64_t v) { f_value >>= v; return *this; } | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
auto_init& operator >>= (size_t v) { f_value >>= v; return *this; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
auto_init& operator >>= (time_t v) { f_value >>= v; return *this; } | |
#endif | |
auto_init& operator &= (const auto_init& n) { f_value &= n.f_value; return *this; } | |
@@ -351,10 +351,10 @@ public: | |
#endif | |
auto_init& operator &= (int64_t v) { f_value &= v; return *this; } | |
auto_init& operator &= (uint64_t v) { f_value &= v; return *this; } | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
auto_init& operator &= (size_t v) { f_value &= v; return *this; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
auto_init& operator &= (time_t v) { f_value &= v; return *this; } | |
#endif | |
auto_init& operator |= (const auto_init& n) { f_value |= n.f_value; return *this; } | |
@@ -377,10 +377,10 @@ public: | |
#endif | |
auto_init& operator |= (int64_t v) { f_value |= v; return *this; } | |
auto_init& operator |= (uint64_t v) { f_value |= v; return *this; } | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
auto_init& operator |= (size_t v) { f_value |= v; return *this; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
auto_init& operator |= (time_t v) { f_value |= v; return *this; } | |
#endif | |
auto_init& operator ^= (const auto_init& n) { f_value ^= n.f_value; return *this; } | |
@@ -403,10 +403,10 @@ public: | |
#endif | |
auto_init& operator ^= (int64_t v) { f_value ^= v; return *this; } | |
auto_init& operator ^= (uint64_t v) { f_value ^= v; return *this; } | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
auto_init& operator ^= (size_t v) { f_value ^= v; return *this; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
auto_init& operator ^= (time_t v) { f_value ^= v; return *this; } | |
#endif | |
T operator * (const auto_init& n) { return f_value * n.f_value; } | |
@@ -434,10 +434,10 @@ public: | |
#ifndef __APPLE__ | |
T operator * (long double v) { return f_value * v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
T operator * (size_t v) { return f_value * v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
T operator * (time_t v) { return f_value * v; } | |
#endif | |
T operator / (const auto_init& n) { return f_value / n.f_value; } | |
@@ -465,10 +465,10 @@ public: | |
#ifndef __APPLE__ | |
T operator / (long double v) { return f_value / v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
T operator / (size_t v) { return f_value / v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
T operator / (time_t v) { return f_value / v; } | |
#endif | |
T operator % (const auto_init& n) { return f_value % n.f_value; } | |
@@ -491,10 +491,10 @@ public: | |
#endif | |
T operator % (int64_t v) { return f_value % v; } | |
T operator % (uint64_t v) { return f_value % v; } | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
T operator % (size_t v) { return f_value % v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
T operator % (time_t v) { return f_value % v; } | |
#endif | |
T operator + (const auto_init& n) { return f_value + n.f_value; } | |
@@ -522,10 +522,10 @@ public: | |
#ifndef __APPLE__ | |
T operator + (long double v) { return f_value + v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
T operator + (size_t v) { return f_value + v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
T operator + (time_t v) { return f_value + v; } | |
#endif | |
T operator - (const auto_init& n) { return f_value - n.f_value; } | |
@@ -553,10 +553,10 @@ public: | |
#ifndef __APPLE__ | |
T operator - (long double v) { return f_value - v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
T operator - (size_t v) { return f_value - v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
T operator - (time_t v) { return f_value - v; } | |
#endif | |
T operator << (const auto_init& n) { return f_value << n.f_value; } | |
@@ -579,10 +579,10 @@ public: | |
#endif | |
T operator << (int64_t v) { return f_value << v; } | |
T operator << (uint64_t v) { return f_value << v; } | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
T operator << (size_t v) { return f_value << v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
T operator << (time_t v) { return f_value << v; } | |
#endif | |
T operator >> (const auto_init& n) { return f_value >> n.f_value; } | |
@@ -605,10 +605,10 @@ public: | |
#endif | |
T operator >> (int64_t v) { return f_value >> v; } | |
T operator >> (uint64_t v) { return f_value >> v; } | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
T operator >> (size_t v) { return f_value >> v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
T operator >> (time_t v) { return f_value >> v; } | |
#endif | |
T operator & (const auto_init& n) { return f_value & n.f_value; } | |
@@ -631,10 +631,10 @@ public: | |
#endif | |
T operator & (int64_t v) { return f_value & v; } | |
T operator & (uint64_t v) { return f_value & v; } | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
T operator & (size_t v) { return f_value & v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
T operator & (time_t v) { return f_value & v; } | |
#endif | |
T operator | (const auto_init& n) { return f_value | n.f_value; } | |
@@ -657,10 +657,10 @@ public: | |
#endif | |
T operator | (int64_t v) { return f_value | v; } | |
T operator | (uint64_t v) { return f_value | v; } | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
T operator | (size_t v) { return f_value | v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
T operator | (time_t v) { return f_value | v; } | |
#endif | |
T operator ^ (const auto_init& n) { return f_value ^ n.f_value; } | |
@@ -683,10 +683,10 @@ public: | |
#endif | |
T operator ^ (int64_t v) { return f_value ^ v; } | |
T operator ^ (uint64_t v) { return f_value ^ v; } | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
T operator ^ (size_t v) { return f_value ^ v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
T operator ^ (time_t v) { return f_value ^ v; } | |
#endif | |
bool operator == (const auto_init& n) { return f_value == n.f_value; } | |
@@ -714,10 +714,10 @@ public: | |
#ifndef __APPLE__ | |
bool operator == (long double v) { return f_value == v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
bool operator == (size_t v) { return f_value == v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
bool operator == (time_t v) { return f_value == v; } | |
#endif | |
bool operator != (const auto_init& n) { return f_value != n.f_value; } | |
@@ -745,10 +745,10 @@ public: | |
#ifndef __APPLE__ | |
bool operator != (long double v) { return f_value != v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
bool operator != (size_t v) { return f_value != v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
bool operator != (time_t v) { return f_value != v; } | |
#endif | |
bool operator < (const auto_init& n) { return f_value < n.f_value; } | |
@@ -776,10 +776,10 @@ public: | |
#ifndef __APPLE__ | |
bool operator < (long double v) { return f_value < v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
bool operator < (size_t v) { return f_value < v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
bool operator < (time_t v) { return f_value < v; } | |
#endif | |
bool operator <= (const auto_init& n) { return f_value <= n.f_value; } | |
@@ -807,10 +807,10 @@ public: | |
#ifndef __APPLE__ | |
bool operator <= (long double v) { return f_value <= v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
bool operator <= (size_t v) { return f_value <= v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
bool operator <= (time_t v) { return f_value <= v; } | |
#endif | |
bool operator > (const auto_init& n) { return f_value > n.f_value; } | |
@@ -838,10 +838,10 @@ public: | |
#ifndef __APPLE__ | |
bool operator > (long double v) { return f_value > v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
bool operator > (size_t v) { return f_value > v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
bool operator > (time_t v) { return f_value > v; } | |
#endif | |
bool operator >= (const auto_init& n) { return f_value >= n.f_value; } | |
@@ -869,10 +869,10 @@ public: | |
#ifndef __APPLE__ | |
bool operator >= (long double v) { return f_value >= v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
bool operator >= (size_t v) { return f_value >= v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
bool operator >= (time_t v) { return f_value >= v; } | |
#endif | |
#ifdef CONTROLLED_VARS_DEBUG | |
@@ -900,12 +900,9 @@ typedef auto_init<unsigned long> zplain_ulong_t; | |
#endif | |
typedef auto_init<int64_t> zint64_t; | |
typedef auto_init<uint64_t> zuint64_t; | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
typedef auto_init<size_t> zsize_t; | |
#endif | |
-#if 0 //def __APPLE__ | |
-typedef auto_init<time_t> ztime_t; | |
-#endif | |
typedef std::conditional< | |
sizeof(time_t) == 8, | |
zint64_t, | |
diff --git a/controlled_vars/controlled_vars_limited_auto_init.h b/controlled_vars/controlled_vars_limited_auto_init.h | |
index 32f99d0..267e247 100644 | |
--- a/controlled_vars/controlled_vars_limited_auto_init.h | |
+++ b/controlled_vars/controlled_vars_limited_auto_init.h | |
@@ -94,10 +94,10 @@ public: | |
#ifndef __APPLE__ | |
limited_auto_init(long double v) { f_value = check(v); } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
limited_auto_init(size_t v) { f_value = check(v); } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
limited_auto_init(time_t v) { f_value = check(v); } | |
#endif | |
operator T () const { return f_value; } | |
@@ -138,10 +138,10 @@ public: | |
#ifndef __APPLE__ | |
limited_auto_init& operator = (long double v) { f_value = check(v); return *this; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
limited_auto_init& operator = (size_t v) { f_value = check(v); return *this; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
limited_auto_init& operator = (time_t v) { f_value = check(v); return *this; } | |
#endif | |
limited_auto_init& operator *= (const limited_auto_init& n) { f_value = check(f_value * n.f_value); return *this; } | |
@@ -169,10 +169,10 @@ public: | |
#ifndef __APPLE__ | |
limited_auto_init& operator *= (long double v) { f_value = check(f_value * v); return *this; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
limited_auto_init& operator *= (size_t v) { f_value = check(f_value * v); return *this; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
limited_auto_init& operator *= (time_t v) { f_value = check(f_value * v); return *this; } | |
#endif | |
limited_auto_init& operator /= (const limited_auto_init& n) { f_value = check(f_value / n.f_value); return *this; } | |
@@ -200,10 +200,10 @@ public: | |
#ifndef __APPLE__ | |
limited_auto_init& operator /= (long double v) { f_value = check(f_value / v); return *this; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
limited_auto_init& operator /= (size_t v) { f_value = check(f_value / v); return *this; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
limited_auto_init& operator /= (time_t v) { f_value = check(f_value / v); return *this; } | |
#endif | |
limited_auto_init& operator %= (const limited_auto_init& n) { f_value = check(f_value % n.f_value); return *this; } | |
@@ -226,10 +226,10 @@ public: | |
#endif | |
limited_auto_init& operator %= (int64_t v) { f_value = check(f_value % v); return *this; } | |
limited_auto_init& operator %= (uint64_t v) { f_value = check(f_value % v); return *this; } | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
limited_auto_init& operator %= (size_t v) { f_value = check(f_value % v); return *this; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
limited_auto_init& operator %= (time_t v) { f_value = check(f_value % v); return *this; } | |
#endif | |
limited_auto_init& operator += (const limited_auto_init& n) { f_value = check(f_value + n.f_value); return *this; } | |
@@ -257,10 +257,10 @@ public: | |
#ifndef __APPLE__ | |
limited_auto_init& operator += (long double v) { f_value = check(f_value + v); return *this; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
limited_auto_init& operator += (size_t v) { f_value = check(f_value + v); return *this; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
limited_auto_init& operator += (time_t v) { f_value = check(f_value + v); return *this; } | |
#endif | |
limited_auto_init& operator -= (const limited_auto_init& n) { f_value = check(f_value - n.f_value); return *this; } | |
@@ -288,10 +288,10 @@ public: | |
#ifndef __APPLE__ | |
limited_auto_init& operator -= (long double v) { f_value = check(f_value - v); return *this; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
limited_auto_init& operator -= (size_t v) { f_value = check(f_value - v); return *this; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
limited_auto_init& operator -= (time_t v) { f_value = check(f_value - v); return *this; } | |
#endif | |
limited_auto_init& operator <<= (const limited_auto_init& n) { f_value = check(f_value << n.f_value); return *this; } | |
@@ -314,10 +314,10 @@ public: | |
#endif | |
limited_auto_init& operator <<= (int64_t v) { f_value = check(f_value << v); return *this; } | |
limited_auto_init& operator <<= (uint64_t v) { f_value = check(f_value << v); return *this; } | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
limited_auto_init& operator <<= (size_t v) { f_value = check(f_value << v); return *this; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
limited_auto_init& operator <<= (time_t v) { f_value = check(f_value << v); return *this; } | |
#endif | |
limited_auto_init& operator >>= (const limited_auto_init& n) { f_value = check(f_value >> n.f_value); return *this; } | |
@@ -340,10 +340,10 @@ public: | |
#endif | |
limited_auto_init& operator >>= (int64_t v) { f_value = check(f_value >> v); return *this; } | |
limited_auto_init& operator >>= (uint64_t v) { f_value = check(f_value >> v); return *this; } | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
limited_auto_init& operator >>= (size_t v) { f_value = check(f_value >> v); return *this; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
limited_auto_init& operator >>= (time_t v) { f_value = check(f_value >> v); return *this; } | |
#endif | |
limited_auto_init& operator &= (const limited_auto_init& n) { f_value = check(f_value & n.f_value); return *this; } | |
@@ -366,10 +366,10 @@ public: | |
#endif | |
limited_auto_init& operator &= (int64_t v) { f_value = check(f_value & v); return *this; } | |
limited_auto_init& operator &= (uint64_t v) { f_value = check(f_value & v); return *this; } | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
limited_auto_init& operator &= (size_t v) { f_value = check(f_value & v); return *this; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
limited_auto_init& operator &= (time_t v) { f_value = check(f_value & v); return *this; } | |
#endif | |
limited_auto_init& operator |= (const limited_auto_init& n) { f_value = check(f_value | n.f_value); return *this; } | |
@@ -392,10 +392,10 @@ public: | |
#endif | |
limited_auto_init& operator |= (int64_t v) { f_value = check(f_value | v); return *this; } | |
limited_auto_init& operator |= (uint64_t v) { f_value = check(f_value | v); return *this; } | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
limited_auto_init& operator |= (size_t v) { f_value = check(f_value | v); return *this; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
limited_auto_init& operator |= (time_t v) { f_value = check(f_value | v); return *this; } | |
#endif | |
limited_auto_init& operator ^= (const limited_auto_init& n) { f_value = check(f_value ^ n.f_value); return *this; } | |
@@ -418,10 +418,10 @@ public: | |
#endif | |
limited_auto_init& operator ^= (int64_t v) { f_value = check(f_value ^ v); return *this; } | |
limited_auto_init& operator ^= (uint64_t v) { f_value = check(f_value ^ v); return *this; } | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
limited_auto_init& operator ^= (size_t v) { f_value = check(f_value ^ v); return *this; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
limited_auto_init& operator ^= (time_t v) { f_value = check(f_value ^ v); return *this; } | |
#endif | |
T operator * (const limited_auto_init& n) { return f_value * n.f_value; } | |
@@ -449,10 +449,10 @@ public: | |
#ifndef __APPLE__ | |
T operator * (long double v) { return f_value * v; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
T operator * (size_t v) { return f_value * v; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
T operator * (time_t v) { return f_value * v; } | |
#endif | |
T operator / (const limited_auto_init& n) { return f_value / n.f_value; } | |
@@ -480,10 +480,10 @@ public: | |
#ifndef __APPLE__ | |
T operator / (long double v) { return f_value / v; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
T operator / (size_t v) { return f_value / v; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
T operator / (time_t v) { return f_value / v; } | |
#endif | |
T operator % (const limited_auto_init& n) { return f_value % n.f_value; } | |
@@ -506,10 +506,10 @@ public: | |
#endif | |
T operator % (int64_t v) { return f_value % v; } | |
T operator % (uint64_t v) { return f_value % v; } | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
T operator % (size_t v) { return f_value % v; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
T operator % (time_t v) { return f_value % v; } | |
#endif | |
T operator + (const limited_auto_init& n) { return f_value + n.f_value; } | |
@@ -537,10 +537,10 @@ public: | |
#ifndef __APPLE__ | |
T operator + (long double v) { return f_value + v; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
T operator + (size_t v) { return f_value + v; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
T operator + (time_t v) { return f_value + v; } | |
#endif | |
T operator - (const limited_auto_init& n) { return f_value - n.f_value; } | |
@@ -568,10 +568,10 @@ public: | |
#ifndef __APPLE__ | |
T operator - (long double v) { return f_value - v; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
T operator - (size_t v) { return f_value - v; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
T operator - (time_t v) { return f_value - v; } | |
#endif | |
T operator << (const limited_auto_init& n) { return f_value << n.f_value; } | |
@@ -594,10 +594,10 @@ public: | |
#endif | |
T operator << (int64_t v) { return f_value << v; } | |
T operator << (uint64_t v) { return f_value << v; } | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
T operator << (size_t v) { return f_value << v; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
T operator << (time_t v) { return f_value << v; } | |
#endif | |
T operator >> (const limited_auto_init& n) { return f_value >> n.f_value; } | |
@@ -620,10 +620,10 @@ public: | |
#endif | |
T operator >> (int64_t v) { return f_value >> v; } | |
T operator >> (uint64_t v) { return f_value >> v; } | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
T operator >> (size_t v) { return f_value >> v; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
T operator >> (time_t v) { return f_value >> v; } | |
#endif | |
T operator & (const limited_auto_init& n) { return f_value & n.f_value; } | |
@@ -646,10 +646,10 @@ public: | |
#endif | |
T operator & (int64_t v) { return f_value & v; } | |
T operator & (uint64_t v) { return f_value & v; } | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
T operator & (size_t v) { return f_value & v; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
T operator & (time_t v) { return f_value & v; } | |
#endif | |
T operator | (const limited_auto_init& n) { return f_value | n.f_value; } | |
@@ -672,10 +672,10 @@ public: | |
#endif | |
T operator | (int64_t v) { return f_value | v; } | |
T operator | (uint64_t v) { return f_value | v; } | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
T operator | (size_t v) { return f_value | v; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
T operator | (time_t v) { return f_value | v; } | |
#endif | |
T operator ^ (const limited_auto_init& n) { return f_value ^ n.f_value; } | |
@@ -698,10 +698,10 @@ public: | |
#endif | |
T operator ^ (int64_t v) { return f_value ^ v; } | |
T operator ^ (uint64_t v) { return f_value ^ v; } | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
T operator ^ (size_t v) { return f_value ^ v; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
T operator ^ (time_t v) { return f_value ^ v; } | |
#endif | |
bool operator == (const limited_auto_init& n) { return f_value == n.f_value; } | |
@@ -729,10 +729,10 @@ public: | |
#ifndef __APPLE__ | |
bool operator == (long double v) { return f_value == v; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
bool operator == (size_t v) { return f_value == v; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
bool operator == (time_t v) { return f_value == v; } | |
#endif | |
bool operator != (const limited_auto_init& n) { return f_value != n.f_value; } | |
@@ -760,10 +760,10 @@ public: | |
#ifndef __APPLE__ | |
bool operator != (long double v) { return f_value != v; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
bool operator != (size_t v) { return f_value != v; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
bool operator != (time_t v) { return f_value != v; } | |
#endif | |
bool operator < (const limited_auto_init& n) { return f_value < n.f_value; } | |
@@ -791,10 +791,10 @@ public: | |
#ifndef __APPLE__ | |
bool operator < (long double v) { return f_value < v; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
bool operator < (size_t v) { return f_value < v; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
bool operator < (time_t v) { return f_value < v; } | |
#endif | |
bool operator <= (const limited_auto_init& n) { return f_value <= n.f_value; } | |
@@ -822,10 +822,10 @@ public: | |
#ifndef __APPLE__ | |
bool operator <= (long double v) { return f_value <= v; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
bool operator <= (size_t v) { return f_value <= v; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
bool operator <= (time_t v) { return f_value <= v; } | |
#endif | |
bool operator > (const limited_auto_init& n) { return f_value > n.f_value; } | |
@@ -853,10 +853,10 @@ public: | |
#ifndef __APPLE__ | |
bool operator > (long double v) { return f_value > v; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
bool operator > (size_t v) { return f_value > v; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
bool operator > (time_t v) { return f_value > v; } | |
#endif | |
bool operator >= (const limited_auto_init& n) { return f_value >= n.f_value; } | |
@@ -884,10 +884,10 @@ public: | |
#ifndef __APPLE__ | |
bool operator >= (long double v) { return f_value >= v; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
bool operator >= (size_t v) { return f_value >= v; } | |
#endif | |
-#if 0 //def __APPLE___ | |
+#ifdef __APPLE__ | |
bool operator >= (time_t v) { return f_value >= v; } | |
#endif | |
#ifdef CONTROLLED_VARS_DEBUG | |
diff --git a/controlled_vars/controlled_vars_need_init.h b/controlled_vars/controlled_vars_need_init.h | |
index b33c53e..3763a62 100644 | |
--- a/controlled_vars/controlled_vars_need_init.h | |
+++ b/controlled_vars/controlled_vars_need_init.h | |
@@ -76,10 +76,10 @@ public: | |
#ifndef __APPLE__ | |
need_init(long double v) { f_value = static_cast<primary_type_t>(v); } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
need_init(size_t v) { f_value = static_cast<primary_type_t>(v); } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
need_init(time_t v) { f_value = static_cast<primary_type_t>(v); } | |
#endif | |
operator T () const { return f_value; } | |
@@ -120,10 +120,10 @@ public: | |
#ifndef __APPLE__ | |
need_init& operator = (long double v) { f_value = v; return *this; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
need_init& operator = (size_t v) { f_value = v; return *this; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
need_init& operator = (time_t v) { f_value = v; return *this; } | |
#endif | |
need_init& operator *= (const need_init& n) { f_value *= n.f_value; return *this; } | |
@@ -151,10 +151,10 @@ public: | |
#ifndef __APPLE__ | |
need_init& operator *= (long double v) { f_value *= v; return *this; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
need_init& operator *= (size_t v) { f_value *= v; return *this; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
need_init& operator *= (time_t v) { f_value *= v; return *this; } | |
#endif | |
need_init& operator /= (const need_init& n) { f_value /= n.f_value; return *this; } | |
@@ -182,10 +182,10 @@ public: | |
#ifndef __APPLE__ | |
need_init& operator /= (long double v) { f_value /= v; return *this; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
need_init& operator /= (size_t v) { f_value /= v; return *this; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
need_init& operator /= (time_t v) { f_value /= v; return *this; } | |
#endif | |
need_init& operator %= (const need_init& n) { f_value %= n.f_value; return *this; } | |
@@ -208,10 +208,10 @@ public: | |
#endif | |
need_init& operator %= (int64_t v) { f_value %= v; return *this; } | |
need_init& operator %= (uint64_t v) { f_value %= v; return *this; } | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
need_init& operator %= (size_t v) { f_value %= v; return *this; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
need_init& operator %= (time_t v) { f_value %= v; return *this; } | |
#endif | |
need_init& operator += (const need_init& n) { f_value += n.f_value; return *this; } | |
@@ -239,10 +239,10 @@ public: | |
#ifndef __APPLE__ | |
need_init& operator += (long double v) { f_value += v; return *this; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
need_init& operator += (size_t v) { f_value += v; return *this; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
need_init& operator += (time_t v) { f_value += v; return *this; } | |
#endif | |
need_init& operator -= (const need_init& n) { f_value -= n.f_value; return *this; } | |
@@ -270,10 +270,10 @@ public: | |
#ifndef __APPLE__ | |
need_init& operator -= (long double v) { f_value -= v; return *this; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
need_init& operator -= (size_t v) { f_value -= v; return *this; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
need_init& operator -= (time_t v) { f_value -= v; return *this; } | |
#endif | |
need_init& operator <<= (const need_init& n) { f_value <<= n.f_value; return *this; } | |
@@ -296,10 +296,10 @@ public: | |
#endif | |
need_init& operator <<= (int64_t v) { f_value <<= v; return *this; } | |
need_init& operator <<= (uint64_t v) { f_value <<= v; return *this; } | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
need_init& operator <<= (size_t v) { f_value <<= v; return *this; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
need_init& operator <<= (time_t v) { f_value <<= v; return *this; } | |
#endif | |
need_init& operator >>= (const need_init& n) { f_value >>= n.f_value; return *this; } | |
@@ -322,10 +322,10 @@ public: | |
#endif | |
need_init& operator >>= (int64_t v) { f_value >>= v; return *this; } | |
need_init& operator >>= (uint64_t v) { f_value >>= v; return *this; } | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
need_init& operator >>= (size_t v) { f_value >>= v; return *this; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
need_init& operator >>= (time_t v) { f_value >>= v; return *this; } | |
#endif | |
need_init& operator &= (const need_init& n) { f_value &= n.f_value; return *this; } | |
@@ -348,10 +348,10 @@ public: | |
#endif | |
need_init& operator &= (int64_t v) { f_value &= v; return *this; } | |
need_init& operator &= (uint64_t v) { f_value &= v; return *this; } | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
need_init& operator &= (size_t v) { f_value &= v; return *this; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
need_init& operator &= (time_t v) { f_value &= v; return *this; } | |
#endif | |
need_init& operator |= (const need_init& n) { f_value |= n.f_value; return *this; } | |
@@ -374,10 +374,10 @@ public: | |
#endif | |
need_init& operator |= (int64_t v) { f_value |= v; return *this; } | |
need_init& operator |= (uint64_t v) { f_value |= v; return *this; } | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
need_init& operator |= (size_t v) { f_value |= v; return *this; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
need_init& operator |= (time_t v) { f_value |= v; return *this; } | |
#endif | |
need_init& operator ^= (const need_init& n) { f_value ^= n.f_value; return *this; } | |
@@ -400,10 +400,10 @@ public: | |
#endif | |
need_init& operator ^= (int64_t v) { f_value ^= v; return *this; } | |
need_init& operator ^= (uint64_t v) { f_value ^= v; return *this; } | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
need_init& operator ^= (size_t v) { f_value ^= v; return *this; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
need_init& operator ^= (time_t v) { f_value ^= v; return *this; } | |
#endif | |
T operator * (const need_init& n) { return f_value * n.f_value; } | |
@@ -431,10 +431,10 @@ public: | |
#ifndef __APPLE__ | |
T operator * (long double v) { return f_value * v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
T operator * (size_t v) { return f_value * v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
T operator * (time_t v) { return f_value * v; } | |
#endif | |
T operator / (const need_init& n) { return f_value / n.f_value; } | |
@@ -462,10 +462,10 @@ public: | |
#ifndef __APPLE__ | |
T operator / (long double v) { return f_value / v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
T operator / (size_t v) { return f_value / v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
T operator / (time_t v) { return f_value / v; } | |
#endif | |
T operator % (const need_init& n) { return f_value % n.f_value; } | |
@@ -488,10 +488,10 @@ public: | |
#endif | |
T operator % (int64_t v) { return f_value % v; } | |
T operator % (uint64_t v) { return f_value % v; } | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
T operator % (size_t v) { return f_value % v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
T operator % (time_t v) { return f_value % v; } | |
#endif | |
T operator + (const need_init& n) { return f_value + n.f_value; } | |
@@ -519,10 +519,10 @@ public: | |
#ifndef __APPLE__ | |
T operator + (long double v) { return f_value + v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
T operator + (size_t v) { return f_value + v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
T operator + (time_t v) { return f_value + v; } | |
#endif | |
T operator - (const need_init& n) { return f_value - n.f_value; } | |
@@ -550,10 +550,10 @@ public: | |
#ifndef __APPLE__ | |
T operator - (long double v) { return f_value - v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
T operator - (size_t v) { return f_value - v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
T operator - (time_t v) { return f_value - v; } | |
#endif | |
T operator << (const need_init& n) { return f_value << n.f_value; } | |
@@ -576,10 +576,10 @@ public: | |
#endif | |
T operator << (int64_t v) { return f_value << v; } | |
T operator << (uint64_t v) { return f_value << v; } | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
T operator << (size_t v) { return f_value << v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
T operator << (time_t v) { return f_value << v; } | |
#endif | |
T operator >> (const need_init& n) { return f_value >> n.f_value; } | |
@@ -602,10 +602,10 @@ public: | |
#endif | |
T operator >> (int64_t v) { return f_value >> v; } | |
T operator >> (uint64_t v) { return f_value >> v; } | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
T operator >> (size_t v) { return f_value >> v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
T operator >> (time_t v) { return f_value >> v; } | |
#endif | |
T operator & (const need_init& n) { return f_value & n.f_value; } | |
@@ -628,10 +628,10 @@ public: | |
#endif | |
T operator & (int64_t v) { return f_value & v; } | |
T operator & (uint64_t v) { return f_value & v; } | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
T operator & (size_t v) { return f_value & v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
T operator & (time_t v) { return f_value & v; } | |
#endif | |
T operator | (const need_init& n) { return f_value | n.f_value; } | |
@@ -654,10 +654,10 @@ public: | |
#endif | |
T operator | (int64_t v) { return f_value | v; } | |
T operator | (uint64_t v) { return f_value | v; } | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
T operator | (size_t v) { return f_value | v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
T operator | (time_t v) { return f_value | v; } | |
#endif | |
T operator ^ (const need_init& n) { return f_value ^ n.f_value; } | |
@@ -680,10 +680,10 @@ public: | |
#endif | |
T operator ^ (int64_t v) { return f_value ^ v; } | |
T operator ^ (uint64_t v) { return f_value ^ v; } | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
T operator ^ (size_t v) { return f_value ^ v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
T operator ^ (time_t v) { return f_value ^ v; } | |
#endif | |
bool operator == (const need_init& n) { return f_value == n.f_value; } | |
@@ -711,10 +711,10 @@ public: | |
#ifndef __APPLE__ | |
bool operator == (long double v) { return f_value == v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
bool operator == (size_t v) { return f_value == v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
bool operator == (time_t v) { return f_value == v; } | |
#endif | |
bool operator != (const need_init& n) { return f_value != n.f_value; } | |
@@ -742,10 +742,10 @@ public: | |
#ifndef __APPLE__ | |
bool operator != (long double v) { return f_value != v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
bool operator != (size_t v) { return f_value != v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
bool operator != (time_t v) { return f_value != v; } | |
#endif | |
bool operator < (const need_init& n) { return f_value < n.f_value; } | |
@@ -773,10 +773,10 @@ public: | |
#ifndef __APPLE__ | |
bool operator < (long double v) { return f_value < v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
bool operator < (size_t v) { return f_value < v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
bool operator < (time_t v) { return f_value < v; } | |
#endif | |
bool operator <= (const need_init& n) { return f_value <= n.f_value; } | |
@@ -804,10 +804,10 @@ public: | |
#ifndef __APPLE__ | |
bool operator <= (long double v) { return f_value <= v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
bool operator <= (size_t v) { return f_value <= v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
bool operator <= (time_t v) { return f_value <= v; } | |
#endif | |
bool operator > (const need_init& n) { return f_value > n.f_value; } | |
@@ -835,10 +835,10 @@ public: | |
#ifndef __APPLE__ | |
bool operator > (long double v) { return f_value > v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
bool operator > (size_t v) { return f_value > v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
bool operator > (time_t v) { return f_value > v; } | |
#endif | |
bool operator >= (const need_init& n) { return f_value >= n.f_value; } | |
@@ -866,10 +866,10 @@ public: | |
#ifndef __APPLE__ | |
bool operator >= (long double v) { return f_value >= v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
bool operator >= (size_t v) { return f_value >= v; } | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
bool operator >= (time_t v) { return f_value >= v; } | |
#endif | |
#ifdef CONTROLLED_VARS_DEBUG | |
@@ -902,10 +902,10 @@ typedef need_init<double> mdouble_t; | |
#ifndef __APPLE__ | |
typedef need_init<long double> mlongdouble_t; | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
typedef need_init<size_t> msize_t; | |
#endif | |
-#if 0 //def __APPLE__ | |
+#ifdef __APPLE__ | |
typedef need_init<time_t> mtime_t; | |
#endif | |
} // namespace controlled_vars | |
diff --git a/libdebpackages/wpkg_filename.cpp b/libdebpackages/wpkg_filename.cpp | |
index f1a14f1..7f22be1 100644 | |
--- a/libdebpackages/wpkg_filename.cpp | |
+++ b/libdebpackages/wpkg_filename.cpp | |
@@ -3263,7 +3263,7 @@ int uri_filename::os_stat(file_stat& s) const | |
} | |
} | |
#else | |
-#ifdef MO_FREEBSD | |
+#if defined(MO_FREEBSD) || defined(__APPLE__) | |
// stat is 64 bits by itself | |
struct stat st; | |
int r(::stat(cname.get_utf8().c_str(), &st)); | |
@@ -3331,7 +3331,7 @@ int uri_filename::os_lstat(file_stat& s) const | |
os_filename_t cname(os_filename()); | |
//::stat(cname.c_str(), st); | |
//::fprintf(stderr, "really l-stating [%s] from [%s] %d (%d/%d)\n", cname.c_str(), f_original.c_str(), (st->st_mode & S_IFMT), S_IFDIR, S_IFREG); | |
-#ifdef MO_FREEBSD | |
+#if defined(MO_FREEBSD) || defined(__APPLE__) | |
// stat is 64 bits by itself | |
struct stat st; | |
int r(::stat(cname.get_utf8().c_str(), &st)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment