minor tweaks trying to get macos working again
authorChris Koeritz <fred@gruntose.com>
Thu, 1 Apr 2021 18:58:14 +0000 (14:58 -0400)
committerChris Koeritz <fred@gruntose.com>
Thu, 1 Apr 2021 18:58:14 +0000 (14:58 -0400)
some upgrade has hosed my build on macos, catalina. not sure it was working at all since last OS version (prior to catalina, whatever that was).
but running apps previously built was working, and now is not, and rebuild is also failing.
should not affect other platforms, except for basis/functions.h change that may cause more warnings now (but which newer mac compiler hated).

nucleus/library/basis/functions.h
scripts/clam/cpp/variables.def

index 821d3e62c428c1233e1ba22525edab9d35f9065e..4b2c6eb689f24b349065e240dfd923d1e65665d1 100644 (file)
@@ -67,7 +67,7 @@ bool operator >= (const T1 &x, const T2 &y) { return !(x < y); }
 template <class target_type, class source_type>
 target_type *cast_or_throw(source_type &to_cast, const target_type &ignored)
 {
-  if (!&ignored) {}  // do nothing.
+//  if (!&ignored) {}  // do nothing.
   target_type *cast = dynamic_cast<target_type *>(&to_cast);
   if (!cast) throw "error: casting problem, unknown RTTI cast.";
   return cast;
@@ -77,7 +77,7 @@ target_type *cast_or_throw(source_type &to_cast, const target_type &ignored)
 template <class target_type, class source_type>
 const target_type *cast_or_throw(const source_type &to_cast, const target_type &ignored)
 {
-  if (!&ignored) {}  // do nothing.
+// if (!&ignored) {}  // do nothing.
   const target_type *cast = dynamic_cast<const target_type *>(&to_cast);
   if (!cast) throw "error: casting problem, unknown RTTI cast.";
   return cast;
index 94e0f3d0dc08846cd763183468f56cfa3cae24b0..e3e3fb9978350cb2ba1b5c2872e02310a0a62cc4 100644 (file)
@@ -928,7 +928,12 @@ ifeq "$(COMPILER)" "GNU_DARWIN"
   DEPENDENCY_DEFINITIONS += NO_VERSION
   DEPENDENCY_ADDITIONS = -X/usr/include -X/usr/include/c++/$(COMPILER_VERSION) -X/usr/include/c++/$(COMPILER_VERSION)/tr1 -X/usr/local/include -X/usr/include/linux -X/usr/include/wx-2.8 -X/usr/lib/gcc/i586-suse-linux/$(COMPILER_VERSION)/include -X/usr/lib/gcc/i486-linux-gnu/$(COMPILER_VERSION)/include
 
-  COMPILER_HEADER_DIR := /usr/local/include /usr/include /System/Library/Frameworks/Foundation.framework/Versions/C/Headers
+  COMPILER_HEADER_DIR := /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include
+#/usr/local/include /usr/include 
+#  export CPATH := /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include
+#/System/Library/Frameworks/Foundation.framework/Versions/C/Headers
+#/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include
+#/Library/Developer/CommandLineTools/usr/include
 
   # "USE_XWIN" specifies that this project needs X window system support.
   #USE_XWIN =
@@ -941,7 +946,8 @@ ifeq "$(COMPILER)" "GNU_DARWIN"
 #/lib 
 
 #  endif
-  DEFINITIONS += __LINUX__ linux __linux__ UNIX unix __UNIX__ __USE_GNU 
+#  DEFINITIONS += __LINUX__ linux __linux__ UNIX unix __UNIX__ __USE_GNU 
+  DEFINITIONS += UNIX unix __UNIX__ __USE_GNU 
   # X Window System not enabled by default.
   #DEFINITIONS += __XWINDOWS__