From 52e284c21741d1fc19b1e42d748e8489510a76fa Mon Sep 17 00:00:00 2001 From: Andy Cedilnik Date: Tue, 19 Apr 2005 18:35:17 -0400 Subject: COMP: Attempt to fix problem with building on SGI --- Utilities/cmxmlrpc/xmlrpc.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Utilities/cmxmlrpc/xmlrpc.h b/Utilities/cmxmlrpc/xmlrpc.h index 69160a2..fdea161 100644 --- a/Utilities/cmxmlrpc/xmlrpc.h +++ b/Utilities/cmxmlrpc/xmlrpc.h @@ -29,6 +29,26 @@ #include #include +#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 #ifdef HAVE_UNICODE_WCHAR -- cgit v0.12