diff --git a/getstrex.c b/getstrex.cpp similarity index 100% rename from getstrex.c rename to getstrex.cpp diff --git a/makefile b/makefile index 6fdd0110..a0edbf8b 100644 --- a/makefile +++ b/makefile @@ -194,8 +194,8 @@ findorb.o: findorb.cpp clipfunc.o: clipfunc.cpp $(CXX) $(CXXFLAGS) $(CURSES_FLAGS) $< -getstrex.o: getstrex.c - $(CC) $(CXXFLAGS) $(CURSES_FLAGS) $< +getstrex.o: getstrex.cpp + $(CXX) $(CXXFLAGS) $(CURSES_FLAGS) $< $(FO_EXE): fo.o $(OBJS) $(RES_FILENAME) $(CXX) -o $(FO_EXE) fo.o $(OBJS) $(LIBS) $(RES_FILENAME) $(LDFLAGS) diff --git a/miscell.cpp b/miscell.cpp index 6668f7a8..214cf08d 100644 --- a/miscell.cpp +++ b/miscell.cpp @@ -119,6 +119,7 @@ void ensure_config_directory_exists() // Going forward it'd be good to reqork Find_Orb to search for data in // default directories if local copies don't exist #include "prefix.h" +static char PREFIX_STATIC[500] = PREFIX; void ensure_config_directory_exists() { if (!use_config_directory) @@ -127,7 +128,9 @@ void ensure_config_directory_exists() // The c_str() magic in the next line allows conda-build's prefix // replacer to work as expected. // See https://github.com/conda/conda-build/issues/1674 for details. - std::string prefix = std::string(PREFIX).c_str(); + // Modified on 2023-03-17 to add PREFIX_STATIC as compilers have + // gotten too clever & the existing workaround stopped working. + std::string prefix = std::string(PREFIX_STATIC).c_str(); if (prefix == "~") { // backwards compatibility; do nothing.