diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-04-19 22:26:40 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-04-19 22:26:40 (GMT) |
commit | 1e04844de9feb7af5dcc1c0c7724b59da41bad26 (patch) | |
tree | cb11dc99ba416a9473baf7d9695de1825185aa8f /Source/kwsys/SystemTools.hxx.in | |
parent | c98bd6249a8b7b78be5621fbb55d97b9423da115 (diff) | |
download | CMake-1e04844de9feb7af5dcc1c0c7724b59da41bad26.zip CMake-1e04844de9feb7af5dcc1c0c7724b59da41bad26.tar.gz CMake-1e04844de9feb7af5dcc1c0c7724b59da41bad26.tar.bz2 |
COMP: Attempt to fix problem with building on SGI
Diffstat (limited to 'Source/kwsys/SystemTools.hxx.in')
-rw-r--r-- | Source/kwsys/SystemTools.hxx.in | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Source/kwsys/SystemTools.hxx.in b/Source/kwsys/SystemTools.hxx.in index 2dd4a54..74fce4d 100644 --- a/Source/kwsys/SystemTools.hxx.in +++ b/Source/kwsys/SystemTools.hxx.in @@ -22,7 +22,26 @@ #include <@KWSYS_NAMESPACE@/Configure.h> #include <sys/types.h> + +// Required for va_list #include <stdarg.h> +#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 kwsys. +namespace std {} // Required for platforms that do not have std:: +namespace @KWSYS_NAMESPACE@_VA_LIST +{ + using namespace std; + typedef va_list hack_va_list; +} +namespace @KWSYS_NAMESPACE@ +{ + typedef @KWSYS_NAMESPACE@_VA_LIST::hack_va_list va_list; +} +#endif // va_list #if defined( _MSC_VER ) typedef unsigned short mode_t; |