summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/CursesDialog/form/CMakeLists.txt5
-rw-r--r--Source/CursesDialog/form/form.h20
-rw-r--r--Source/CursesDialog/form/internal_stdio_core.h.in5
-rw-r--r--Utilities/cmxmlrpc/CMakeLists.txt5
-rw-r--r--Utilities/cmxmlrpc/internal_stdio_core.h.in5
-rw-r--r--Utilities/cmxmlrpc/xmlrpc.h20
6 files changed, 20 insertions, 40 deletions
diff --git a/Source/CursesDialog/form/CMakeLists.txt b/Source/CursesDialog/form/CMakeLists.txt
index 618aef2..2ec21ec 100644
--- a/Source/CursesDialog/form/CMakeLists.txt
+++ b/Source/CursesDialog/form/CMakeLists.txt
@@ -50,3 +50,8 @@ TARGET_LINK_LIBRARIES(cmForm ${CURSES_LIBRARY})
IF(CURSES_EXTRA_LIBRARY)
TARGET_LINK_LIBRARIES(cmForm ${CURSES_EXTRA_LIBRARY})
ENDIF(CURSES_EXTRA_LIBRARY)
+
+# See internal_stdio_core.h.in for explanation.
+CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/internal_stdio_core.h.in
+ ${CMAKE_CURRENT_BINARY_DIR}/internal/stdio_core.h
+ @ONLY IMMEDIATE)
diff --git a/Source/CursesDialog/form/form.h b/Source/CursesDialog/form/form.h
index 197b510..cb291c4 100644
--- a/Source/CursesDialog/form/form.h
+++ b/Source/CursesDialog/form/form.h
@@ -39,27 +39,7 @@
#include <curses.h>
#include <eti.h>
-
#include <stdarg.h>
-#ifdef __cplusplus
-#ifndef va_list
-/*
- Some compilers move va_list into the std:: namespace and there is no way to
- tell that this has been done. Playing with things being included before or
- after stdarg.h does not solve things because we do not have control over what
- the user does.
- This hack solves this problem by moving va_list to our own namespace that is
- local for forms.
-*/
-namespace std {} /* Required for platforms that do not have std:: */
-namespace cmakeForms_VA_LIST
-{
- using namespace std;
- typedef va_list hack_va_list;
-}
-#define va_list cmakeForms_VA_LIST::hack_va_list
-#endif /* va_list */
-#endif /* __cplusplus */
#ifdef __cplusplus
extern "C" {
diff --git a/Source/CursesDialog/form/internal_stdio_core.h.in b/Source/CursesDialog/form/internal_stdio_core.h.in
new file mode 100644
index 0000000..ae5910c
--- /dev/null
+++ b/Source/CursesDialog/form/internal_stdio_core.h.in
@@ -0,0 +1,5 @@
+/* This is a hack to work around a bug in MIPSpro 7.4 on some SGIs.
+ We need to include stdarg.h before the stdio core to avoid putting
+ va_list in the std namespace and never in the global namespace. */
+#include <stdarg.h>
+#include_next <internal/stdio_core.h>
diff --git a/Utilities/cmxmlrpc/CMakeLists.txt b/Utilities/cmxmlrpc/CMakeLists.txt
index f23bf97..c13b780 100644
--- a/Utilities/cmxmlrpc/CMakeLists.txt
+++ b/Utilities/cmxmlrpc/CMakeLists.txt
@@ -77,6 +77,11 @@ CONFIGURE_FILE(
"${CMAKE_CURRENT_BINARY_DIR}/xmlrpc_amconfig.h"
)
+# See internal_stdio_core.h.in for explanation.
+CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/internal_stdio_core.h.in
+ ${CMAKE_CURRENT_BINARY_DIR}/internal/stdio_core.h
+ @ONLY IMMEDIATE)
+
SET(xmlrpc_SRCS
#XmlRpcCpp.cpp
xmlrpc_array.c
diff --git a/Utilities/cmxmlrpc/internal_stdio_core.h.in b/Utilities/cmxmlrpc/internal_stdio_core.h.in
new file mode 100644
index 0000000..ae5910c
--- /dev/null
+++ b/Utilities/cmxmlrpc/internal_stdio_core.h.in
@@ -0,0 +1,5 @@
+/* This is a hack to work around a bug in MIPSpro 7.4 on some SGIs.
+ We need to include stdarg.h before the stdio core to avoid putting
+ va_list in the std namespace and never in the global namespace. */
+#include <stdarg.h>
+#include_next <internal/stdio_core.h>
diff --git a/Utilities/cmxmlrpc/xmlrpc.h b/Utilities/cmxmlrpc/xmlrpc.h
index fdea161..69160a2 100644
--- a/Utilities/cmxmlrpc/xmlrpc.h
+++ b/Utilities/cmxmlrpc/xmlrpc.h
@@ -29,26 +29,6 @@
#include <stddef.h>
#include <stdarg.h>
-#ifdef __cplusplus
-#ifndef va_list
-/*
- Some compilers move va_list into the std:: namespace and there is no way to
- tell that this has been done. Playing with things being included before or
- after stdarg.h does not solve things because we do not have control over what
- the user does.
- This hack solves this problem by moving va_list to our own namespace that is
- local for forms.
-*/
-namespace std {} /* Required for platforms that do not have std:: */
-namespace xmlrpc_VA_LIST
-{
- using namespace std;
- typedef va_list hack_va_list;
-}
-#define va_list xmlrpc_VA_LIST::hack_va_list
-#endif /* va_list */
-#endif /* __cplusplus */
-
#include <xmlrpc_config.h>
#ifdef HAVE_UNICODE_WCHAR