From 7fc99c94d4af79083160dea4eebba7c471954110 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Thu, 23 Apr 2009 11:09:47 -0400 Subject: [PATCH] ENH: check in almost building VMS stuff with VMSBuild directory since the bootstrap script will not work on VMS --- Source/kwsys/ProcessUNIX.c | 3 + Source/kwsys/System.h.in | 9 + Source/kwsys/SystemTools.cxx | 4 +- Source/kwsys/kwsysPrivate.h | 8 +- VMSbuild/Makefile | 131 ++++ VMSbuild/cmConfigure.h | 28 + VMSbuild/cmVersionConfig.h | 20 + VMSbuild/cmsys/Configure.h | 145 +++++ VMSbuild/cmsys/Configure.hxx | 189 ++++++ VMSbuild/cmsys/DateStamp.h | 44 ++ VMSbuild/cmsys/Directory.hxx | 82 +++ VMSbuild/cmsys/Glob.hxx | 118 ++++ VMSbuild/cmsys/Process.h | 430 +++++++++++++ VMSbuild/cmsys/RegularExpression.hxx | 410 ++++++++++++ VMSbuild/cmsys/String.h | 69 ++ VMSbuild/cmsys/String.hxx | 67 ++ VMSbuild/cmsys/System.h | 141 +++++ VMSbuild/cmsys/SystemTools.hxx | 900 +++++++++++++++++++++++++++ VMSbuild/cmsys/auto_ptr.hxx | 203 ++++++ VMSbuild/cmsys/ios/fstream | 48 ++ VMSbuild/cmsys/ios/iosfwd | 51 ++ VMSbuild/cmsys/ios/iostream | 101 +++ VMSbuild/cmsys/ios/sstream | 201 ++++++ VMSbuild/cmsys/stl/algorithm | 51 ++ VMSbuild/cmsys/stl/map | 51 ++ VMSbuild/cmsys/stl/stl.h.in | 51 ++ VMSbuild/cmsys/stl/stl.hxx.in | 51 ++ VMSbuild/cmsys/stl/string | 51 ++ VMSbuild/cmsys/stl/vector | 51 ++ VMSbuild/stdstring.cxx | 8 + 30 files changed, 3713 insertions(+), 3 deletions(-) create mode 100644 VMSbuild/Makefile create mode 100644 VMSbuild/cmConfigure.h create mode 100644 VMSbuild/cmVersionConfig.h create mode 100644 VMSbuild/cmsys/Configure.h create mode 100644 VMSbuild/cmsys/Configure.hxx create mode 100644 VMSbuild/cmsys/DateStamp.h create mode 100644 VMSbuild/cmsys/Directory.hxx create mode 100644 VMSbuild/cmsys/Glob.hxx create mode 100644 VMSbuild/cmsys/Process.h create mode 100644 VMSbuild/cmsys/RegularExpression.hxx create mode 100644 VMSbuild/cmsys/String.h create mode 100644 VMSbuild/cmsys/String.hxx create mode 100644 VMSbuild/cmsys/System.h create mode 100644 VMSbuild/cmsys/SystemTools.hxx create mode 100644 VMSbuild/cmsys/auto_ptr.hxx create mode 100644 VMSbuild/cmsys/ios/fstream create mode 100644 VMSbuild/cmsys/ios/iosfwd create mode 100644 VMSbuild/cmsys/ios/iostream create mode 100644 VMSbuild/cmsys/ios/sstream create mode 100644 VMSbuild/cmsys/stl/algorithm create mode 100644 VMSbuild/cmsys/stl/map create mode 100644 VMSbuild/cmsys/stl/stl.h.in create mode 100644 VMSbuild/cmsys/stl/stl.hxx.in create mode 100644 VMSbuild/cmsys/stl/string create mode 100644 VMSbuild/cmsys/stl/vector create mode 100644 VMSbuild/stdstring.cxx diff --git a/Source/kwsys/ProcessUNIX.c b/Source/kwsys/ProcessUNIX.c index 9cd8d7e0e..a7515baff 100644 --- a/Source/kwsys/ProcessUNIX.c +++ b/Source/kwsys/ProcessUNIX.c @@ -2270,6 +2270,9 @@ static pid_t kwsysProcessFork(kwsysProcess* cp, if(cp->OptionDetach) { /* Create an intermediate process. */ +#ifdef __VMS +#define fork vfork +#endif pid_t middle_pid = fork(); if(middle_pid < 0) { diff --git a/Source/kwsys/System.h.in b/Source/kwsys/System.h.in index 0c86accdc..f96c74e6f 100644 --- a/Source/kwsys/System.h.in +++ b/Source/kwsys/System.h.in @@ -39,6 +39,15 @@ # define kwsysSystem_Shell_Flag_AllowMakeVariables kwsys_ns(System_Shell_Flag_AllowMakeVariables) #endif +#ifdef __VMS +#define @KWSYS_NAMESPACE@System_Shell_GetArgumentForUnix \ + @KWSYS_NAMESPACE@System_Shell_UnixGA +#define @KWSYS_NAMESPACE@System_Shell_GetArgumentSizeForUnix \ + @KWSYS_NAMESPACE@System_Shell_UnixGAS +#define @KWSYS_NAMESPACE@System_Shell_GetArgumentForWindows \ + @KWSYS_NAMESPACE@System_Shell_WindowsGA +#endif + #if defined(__cplusplus) extern "C" { diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index 928dc37d3..a6512db5a 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -53,12 +53,14 @@ #ifndef _WIN32 #include #include -#include #include #include #include #include +#ifndef __VMS +#include #include +#endif #include /* sigprocmask */ #endif diff --git a/Source/kwsys/kwsysPrivate.h b/Source/kwsys/kwsysPrivate.h index afccd4eb5..dd3b75fc0 100644 --- a/Source/kwsys/kwsysPrivate.h +++ b/Source/kwsys/kwsysPrivate.h @@ -12,7 +12,9 @@ =========================================================================*/ #ifndef KWSYS_NAMESPACE -# error "Do not include kwsysPrivate.h outside of kwsys c and cxx files." +# ifndef __VMS +# error "Do not include kwsysPrivate.h outside of kwsys c and cxx files." +# endif #endif #ifndef _kwsysPrivate_h @@ -39,5 +41,7 @@ #define KWSYS_NAMESPACE_STRING1(x) #x #else -# error "kwsysPrivate.h included multiple times." +# ifndef __VMS +# error "kwsysPrivate.h included multiple times." +# endif #endif diff --git a/VMSbuild/Makefile b/VMSbuild/Makefile new file mode 100644 index 000000000..cc18df6ec --- /dev/null +++ b/VMSbuild/Makefile @@ -0,0 +1,131 @@ +cmake: stdstring.o cmake.o cmakemain.o cmakewizard.o cmCommandArgumentLexer.o cmCommandArgumentParser.o cmCommandArgumentParserHelper.o cmDepends.o cmDependsC.o cmDocumentationFormatter.o cmDocumentationFormatterText.o cmPolicies.o cmProperty.o cmPropertyMap.o cmPropertyDefinition.o cmPropertyDefinitionMap.o cmMakeDepend.o cmMakefile.o cmExportFileGenerator.o cmExportInstallFileGenerator.o cmInstallDirectoryGenerator.o cmGeneratedFileStream.o cmGlobalGenerator.o cmLocalGenerator.o cmInstallGenerator.o cmInstallExportGenerator.o cmInstallFilesGenerator.o cmInstallScriptGenerator.o cmInstallTargetGenerator.o cmSourceFile.o cmSourceFileLocation.o cmSystemTools.o cmVersion.o cmFileTimeComparison.o cmGlobalUnixMakefileGenerator3.o cmLocalUnixMakefileGenerator3.o cmMakefileExecutableTargetGenerator.o cmMakefileLibraryTargetGenerator.o cmMakefileTargetGenerator.o cmMakefileUtilityTargetGenerator.o cmBootstrapCommands.o cmCommands.o cmTarget.o cmTest.o cmCustomCommand.o cmDocumentVariables.o cmCacheManager.o cmListFileCache.o cmComputeLinkDepends.o cmComputeLinkInformation.o cmOrderDirectories.o cmComputeTargetDepends.o cmComputeComponentGraph.o cmExprLexer.o cmExprParser.o cmExprParserHelper.o cmListFileLexer.o Directory.o Glob.o RegularExpression.o SystemTools.o ProcessUNIX.o String.o System.o + CC -cxx -I../Source -I. stdstring.o cmake.o cmakemain.o cmakewizard.o cmCommandArgumentLexer.o cmCommandArgumentParser.o cmCommandArgumentParserHelper.o cmDepends.o cmDependsC.o cmDocumentationFormatter.o cmDocumentationFormatterText.o cmPolicies.o cmProperty.o cmPropertyMap.o cmPropertyDefinition.o cmPropertyDefinitionMap.o cmMakeDepend.o cmMakefile.o cmExportFileGenerator.o cmExportInstallFileGenerator.o cmInstallDirectoryGenerator.o cmGeneratedFileStream.o cmGlobalGenerator.o cmLocalGenerator.o cmInstallGenerator.o cmInstallExportGenerator.o cmInstallFilesGenerator.o cmInstallScriptGenerator.o cmInstallTargetGenerator.o cmSourceFile.o cmSourceFileLocation.o cmSystemTools.o cmVersion.o cmFileTimeComparison.o cmGlobalUnixMakefileGenerator3.o cmLocalUnixMakefileGenerator3.o cmMakefileExecutableTargetGenerator.o cmMakefileLibraryTargetGenerator.o cmMakefileTargetGenerator.o cmMakefileUtilityTargetGenerator.o cmBootstrapCommands.o cmCommands.o cmTarget.o cmTest.o cmCustomCommand.o cmDocumentVariables.o cmCacheManager.o cmListFileCache.o cmComputeLinkDepends.o cmComputeLinkInformation.o cmOrderDirectories.o cmComputeTargetDepends.o cmComputeComponentGraph.o cmExprLexer.o cmExprParser.o cmExprParserHelper.o cmListFileLexer.o Directory.o Glob.o RegularExpression.o SystemTools.o ProcessUNIX.o String.o System.o -o cmake +stdstring.o : stdstring.cxx + CC -cxx -c stdstring.cxx -o stdstring.o +cmake.o : ../Source/cmake.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmake.cxx -o cmake.o +cmakemain.o : ../Source/cmakemain.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmakemain.cxx -o cmakemain.o +cmakewizard.o : ../Source/cmakewizard.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmakewizard.cxx -o cmakewizard.o +cmCommandArgumentLexer.o : ../Source/cmCommandArgumentLexer.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmCommandArgumentLexer.cxx -o cmCommandArgumentLexer.o +cmCommandArgumentParser.o : ../Source/cmCommandArgumentParser.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmCommandArgumentParser.cxx -o cmCommandArgumentParser.o +cmCommandArgumentParserHelper.o : ../Source/cmCommandArgumentParserHelper.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmCommandArgumentParserHelper.cxx -o cmCommandArgumentParserHelper.o +cmDepends.o : ../Source/cmDepends.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmDepends.cxx -o cmDepends.o +cmDependsC.o : ../Source/cmDependsC.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmDependsC.cxx -o cmDependsC.o +cmDocumentationFormatter.o : ../Source/cmDocumentationFormatter.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmDocumentationFormatter.cxx -o cmDocumentationFormatter.o +cmDocumentationFormatterText.o : ../Source/cmDocumentationFormatterText.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmDocumentationFormatterText.cxx -o cmDocumentationFormatterText.o +cmPolicies.o : ../Source/cmPolicies.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmPolicies.cxx -o cmPolicies.o +cmProperty.o : ../Source/cmProperty.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmProperty.cxx -o cmProperty.o +cmPropertyMap.o : ../Source/cmPropertyMap.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmPropertyMap.cxx -o cmPropertyMap.o +cmPropertyDefinition.o : ../Source/cmPropertyDefinition.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmPropertyDefinition.cxx -o cmPropertyDefinition.o +cmPropertyDefinitionMap.o : ../Source/cmPropertyDefinitionMap.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmPropertyDefinitionMap.cxx -o cmPropertyDefinitionMap.o +cmMakeDepend.o : ../Source/cmMakeDepend.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmMakeDepend.cxx -o cmMakeDepend.o +cmMakefile.o : ../Source/cmMakefile.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmMakefile.cxx -o cmMakefile.o +cmExportFileGenerator.o : ../Source/cmExportFileGenerator.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmExportFileGenerator.cxx -o cmExportFileGenerator.o +cmExportInstallFileGenerator.o : ../Source/cmExportInstallFileGenerator.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmExportInstallFileGenerator.cxx -o cmExportInstallFileGenerator.o +cmInstallDirectoryGenerator.o : ../Source/cmInstallDirectoryGenerator.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmInstallDirectoryGenerator.cxx -o cmInstallDirectoryGenerator.o +cmGeneratedFileStream.o : ../Source/cmGeneratedFileStream.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmGeneratedFileStream.cxx -o cmGeneratedFileStream.o +cmGlobalGenerator.o : ../Source/cmGlobalGenerator.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmGlobalGenerator.cxx -o cmGlobalGenerator.o +cmLocalGenerator.o : ../Source/cmLocalGenerator.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmLocalGenerator.cxx -o cmLocalGenerator.o +cmInstallGenerator.o : ../Source/cmInstallGenerator.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmInstallGenerator.cxx -o cmInstallGenerator.o +cmInstallExportGenerator.o : ../Source/cmInstallExportGenerator.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmInstallExportGenerator.cxx -o cmInstallExportGenerator.o +cmInstallFilesGenerator.o : ../Source/cmInstallFilesGenerator.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmInstallFilesGenerator.cxx -o cmInstallFilesGenerator.o +cmInstallScriptGenerator.o : ../Source/cmInstallScriptGenerator.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmInstallScriptGenerator.cxx -o cmInstallScriptGenerator.o +cmInstallTargetGenerator.o : ../Source/cmInstallTargetGenerator.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmInstallTargetGenerator.cxx -o cmInstallTargetGenerator.o +cmSourceFile.o : ../Source/cmSourceFile.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmSourceFile.cxx -o cmSourceFile.o +cmSourceFileLocation.o : ../Source/cmSourceFileLocation.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmSourceFileLocation.cxx -o cmSourceFileLocation.o +cmSystemTools.o : ../Source/cmSystemTools.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmSystemTools.cxx -o cmSystemTools.o +cmVersion.o : ../Source/cmVersion.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmVersion.cxx -o cmVersion.o +cmFileTimeComparison.o : ../Source/cmFileTimeComparison.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmFileTimeComparison.cxx -o cmFileTimeComparison.o +cmGlobalUnixMakefileGenerator3.o : ../Source/cmGlobalUnixMakefileGenerator3.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmGlobalUnixMakefileGenerator3.cxx -o cmGlobalUnixMakefileGenerator3.o +cmLocalUnixMakefileGenerator3.o : ../Source/cmLocalUnixMakefileGenerator3.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmLocalUnixMakefileGenerator3.cxx -o cmLocalUnixMakefileGenerator3.o +cmMakefileExecutableTargetGenerator.o : ../Source/cmMakefileExecutableTargetGenerator.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmMakefileExecutableTargetGenerator.cxx -o cmMakefileExecutableTargetGenerator.o +cmMakefileLibraryTargetGenerator.o : ../Source/cmMakefileLibraryTargetGenerator.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmMakefileLibraryTargetGenerator.cxx -o cmMakefileLibraryTargetGenerator.o +cmMakefileTargetGenerator.o : ../Source/cmMakefileTargetGenerator.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmMakefileTargetGenerator.cxx -o cmMakefileTargetGenerator.o +cmMakefileUtilityTargetGenerator.o : ../Source/cmMakefileUtilityTargetGenerator.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmMakefileUtilityTargetGenerator.cxx -o cmMakefileUtilityTargetGenerator.o +cmBootstrapCommands.o : ../Source/cmBootstrapCommands.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmBootstrapCommands.cxx -o cmBootstrapCommands.o +cmCommands.o : ../Source/cmCommands.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmCommands.cxx -o cmCommands.o +cmTarget.o : ../Source/cmTarget.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmTarget.cxx -o cmTarget.o +cmTest.o : ../Source/cmTest.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmTest.cxx -o cmTest.o +cmCustomCommand.o : ../Source/cmCustomCommand.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmCustomCommand.cxx -o cmCustomCommand.o +cmDocumentVariables.o : ../Source/cmDocumentVariables.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmDocumentVariables.cxx -o cmDocumentVariables.o +cmCacheManager.o : ../Source/cmCacheManager.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmCacheManager.cxx -o cmCacheManager.o +cmListFileCache.o : ../Source/cmListFileCache.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmListFileCache.cxx -o cmListFileCache.o +cmComputeLinkDepends.o : ../Source/cmComputeLinkDepends.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmComputeLinkDepends.cxx -o cmComputeLinkDepends.o +cmComputeLinkInformation.o : ../Source/cmComputeLinkInformation.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmComputeLinkInformation.cxx -o cmComputeLinkInformation.o +cmOrderDirectories.o : ../Source/cmOrderDirectories.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmOrderDirectories.cxx -o cmOrderDirectories.o +cmComputeTargetDepends.o : ../Source/cmComputeTargetDepends.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmComputeTargetDepends.cxx -o cmComputeTargetDepends.o +cmComputeComponentGraph.o : ../Source/cmComputeComponentGraph.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmComputeComponentGraph.cxx -o cmComputeComponentGraph.o +cmExprLexer.o : ../Source/cmExprLexer.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmExprLexer.cxx -o cmExprLexer.o +cmExprParser.o : ../Source/cmExprParser.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmExprParser.cxx -o cmExprParser.o +cmExprParserHelper.o : ../Source/cmExprParserHelper.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -c ../Source/cmExprParserHelper.cxx -o cmExprParserHelper.o +cmBootstrapCommands.o : ../Source/cmAddCustomCommandCommand.cxx ../Source/cmAddCustomTargetCommand.cxx ../Source/cmAddDefinitionsCommand.cxx ../Source/cmAddDependenciesCommand.cxx ../Source/cmAddExecutableCommand.cxx ../Source/cmAddLibraryCommand.cxx ../Source/cmAddSubDirectoryCommand.cxx ../Source/cmAddTestCommand.cxx ../Source/cmBreakCommand.cxx ../Source/cmBuildCommand.cxx ../Source/cmCMakeMinimumRequired.cxx ../Source/cmCMakePolicyCommand.cxx ../Source/cmCommandArgumentsHelper.cxx ../Source/cmConfigureFileCommand.cxx ../Source/cmCoreTryCompile.cxx ../Source/cmCreateTestSourceList.cxx ../Source/cmDefinePropertyCommand.cxx ../Source/cmElseCommand.cxx ../Source/cmEnableTestingCommand.cxx ../Source/cmEndForEachCommand.cxx ../Source/cmEndFunctionCommand.cxx ../Source/cmEndIfCommand.cxx ../Source/cmEndMacroCommand.cxx ../Source/cmExecProgramCommand.cxx ../Source/cmExecuteProcessCommand.cxx ../Source/cmExternalMakefileProjectGenerator.cxx ../Source/cmFindBase.cxx ../Source/cmFindCommon.cxx ../Source/cmFileCommand.cxx ../Source/cmFindFileCommand.cxx ../Source/cmFindLibraryCommand.cxx ../Source/cmFindPackageCommand.cxx ../Source/cmFindPathCommand.cxx ../Source/cmFindProgramCommand.cxx ../Source/cmForEachCommand.cxx ../Source/cmFunctionCommand.cxx ../Source/cmGetCMakePropertyCommand.cxx ../Source/cmGetDirectoryPropertyCommand.cxx ../Source/cmGetFilenameComponentCommand.cxx ../Source/cmGetPropertyCommand.cxx ../Source/cmGetSourceFilePropertyCommand.cxx ../Source/cmGetTargetPropertyCommand.cxx ../Source/cmHexFileConverter.cxx ../Source/cmIfCommand.cxx ../Source/cmIncludeCommand.cxx ../Source/cmIncludeDirectoryCommand.cxx ../Source/cmIncludeRegularExpressionCommand.cxx ../Source/cmInstallFilesCommand.cxx ../Source/cmInstallCommandArguments.cxx ../Source/cmInstallCommand.cxx ../Source/cmInstallTargetsCommand.cxx ../Source/cmLinkDirectoriesCommand.cxx ../Source/cmListCommand.cxx ../Source/cmMacroCommand.cxx ../Source/cmMakeDirectoryCommand.cxx ../Source/cmMarkAsAdvancedCommand.cxx ../Source/cmMathCommand.cxx ../Source/cmMessageCommand.cxx ../Source/cmOptionCommand.cxx ../Source/cmProjectCommand.cxx ../Source/cmReturnCommand.cxx ../Source/cmSeparateArgumentsCommand.cxx ../Source/cmSetCommand.cxx ../Source/cmSetPropertyCommand.cxx ../Source/cmSetSourceFilesPropertiesCommand.cxx ../Source/cmSetTargetPropertiesCommand.cxx ../Source/cmSetTestsPropertiesCommand.cxx ../Source/cmGetTestPropertyCommand.cxx ../Source/cmSiteNameCommand.cxx ../Source/cmStringCommand.cxx ../Source/cmSubdirCommand.cxx ../Source/cmTargetLinkLibrariesCommand.cxx ../Source/cmTryCompileCommand.cxx ../Source/cmTryRunCommand.cxx +cmListFileLexer.o : ../Source/cmListFileLexer.c cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + cc -I../Source -I. -c ../Source/cmListFileLexer.c -o cmListFileLexer.o +ProcessUNIX.o : ../Source/kwsys/ProcessUNIX.c cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + cc -I../Source -I. -DKWSYS_NAMESPACE=cmsys -c ../Source/kwsys/ProcessUNIX.c -o ProcessUNIX.o +String.o : ../Source/kwsys/String.c cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + cc -I../Source -I. -DKWSYS_NAMESPACE=cmsys -c ../Source/kwsys/String.c -o String.o +System.o : ../Source/kwsys/System.c cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + cc -I../Source -I. -DKWSYS_NAMESPACE=cmsys -c ../Source/kwsys/System.c -o System.o +Directory.o : ../Source/kwsys/Directory.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -DKWSYS_NAMESPACE=cmsys -c ../Source/kwsys/Directory.cxx -o Directory.o +Glob.o : ../Source/kwsys/Glob.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -DKWSYS_NAMESPACE=cmsys -c ../Source/kwsys/Glob.cxx -o Glob.o +RegularExpression.o : ../Source/kwsys/RegularExpression.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -DKWSYS_NAMESPACE=cmsys -c ../Source/kwsys/RegularExpression.cxx -o RegularExpression.o +SystemTools.o : ../Source/kwsys/SystemTools.cxx cmConfigure.h cmsys/*.hxx cmsys/*.h ../Source/*.h + CC -cxx -I../Source -I. -DKWSYS_NAMESPACE=cmsys -c ../Source/kwsys/SystemTools.cxx -o SystemTools.o diff --git a/VMSbuild/cmConfigure.h b/VMSbuild/cmConfigure.h new file mode 100644 index 000000000..14baf04f0 --- /dev/null +++ b/VMSbuild/cmConfigure.h @@ -0,0 +1,28 @@ +/* + * Generated by /cygdrive/c/hoffman/My Builds/CMake262/bootstrap + * Version: $Revision$ + * + * Source directory: /cygdrive/c/hoffman/My Builds/CMake262 + * Binary directory: /cygdrive/c/hoffman/My Builds/CMake262-cygwin/Bootstrap.cmk + * + * C compiler: cc + * C flags: + * + * C++ compiler: g++ + * C++ flags: + * + * Make: make + * + * Sources: + * cmake cmakemain cmakewizard cmCommandArgumentLexer cmCommandArgumentParser cmCommandArgumentParserHelper cmDepends cmDependsC cmDocumentationFormatter cmDocumentationFormatterText cmPolicies cmProperty cmPropertyMap cmPropertyDefinition cmPropertyDefinitionMap cmMakeDepend cmMakefile cmExportFileGenerator cmExportInstallFileGenerator cmInstallDirectoryGenerator cmGeneratedFileStream cmGlobalGenerator cmLocalGenerator cmInstallGenerator cmInstallExportGenerator cmInstallFilesGenerator cmInstallScriptGenerator cmInstallTargetGenerator cmSourceFile cmSourceFileLocation cmSystemTools cmVersion cmFileTimeComparison cmGlobalUnixMakefileGenerator3 cmLocalUnixMakefileGenerator3 cmMakefileExecutableTargetGenerator cmMakefileLibraryTargetGenerator cmMakefileTargetGenerator cmMakefileUtilityTargetGenerator cmBootstrapCommands cmCommands cmTarget cmTest cmCustomCommand cmDocumentVariables cmCacheManager cmListFileCache cmComputeLinkDepends cmComputeLinkInformation cmOrderDirectories cmComputeTargetDepends cmComputeComponentGraph cmExprLexer cmExprParser cmExprParserHelper cmListFileLexer + * kwSys Sources: + * Directory Glob RegularExpression SystemTools ProcessUNIX String System + */ + +/* #undef CMAKE_NO_STD_NAMESPACE */ +/* #undef CMAKE_NO_ANSI_STREAM_HEADERS */ +/* #undef CMAKE_NO_ANSI_STRING_STREAM */ +/* #undef CMAKE_NO_ANSI_FOR_SCOPE */ +#define CMAKE_ROOT_DIR "/cygdrive/c/hoffman/My Builds/CMake262" +#define CMAKE_DATA_DIR "/share/cmake-2.6" +#define CMAKE_BOOTSTRAP diff --git a/VMSbuild/cmVersionConfig.h b/VMSbuild/cmVersionConfig.h new file mode 100644 index 000000000..157c32735 --- /dev/null +++ b/VMSbuild/cmVersionConfig.h @@ -0,0 +1,20 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile$ + Language: C++ + Date: $Date$ + Version: $Revision$ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#define CMake_VERSION_MAJOR 2 +#define CMake_VERSION_MINOR 7 +#define CMake_VERSION_PATCH 20090410 +/* #undef CMake_VERSION_RC */ diff --git a/VMSbuild/cmsys/Configure.h b/VMSbuild/cmsys/Configure.h new file mode 100644 index 000000000..34af56ba6 --- /dev/null +++ b/VMSbuild/cmsys/Configure.h @@ -0,0 +1,145 @@ +/* + * Generated by /cygdrive/c/hoffman/My Builds/CMake262/bootstrap + * Version: $Revision$ + * + * Source directory: /cygdrive/c/hoffman/My Builds/CMake262 + * Binary directory: /cygdrive/c/hoffman/My Builds/CMake262-cygwin/Bootstrap.cmk + * + * C compiler: cc + * C flags: + * + * C++ compiler: g++ + * C++ flags: + * + * Make: make + * + * Sources: + * cmake cmakemain cmakewizard cmCommandArgumentLexer cmCommandArgumentParser cmCommandArgumentParserHelper cmDepends cmDependsC cmDocumentationFormatter cmDocumentationFormatterText cmPolicies cmProperty cmPropertyMap cmPropertyDefinition cmPropertyDefinitionMap cmMakeDepend cmMakefile cmExportFileGenerator cmExportInstallFileGenerator cmInstallDirectoryGenerator cmGeneratedFileStream cmGlobalGenerator cmLocalGenerator cmInstallGenerator cmInstallExportGenerator cmInstallFilesGenerator cmInstallScriptGenerator cmInstallTargetGenerator cmSourceFile cmSourceFileLocation cmSystemTools cmVersion cmFileTimeComparison cmGlobalUnixMakefileGenerator3 cmLocalUnixMakefileGenerator3 cmMakefileExecutableTargetGenerator cmMakefileLibraryTargetGenerator cmMakefileTargetGenerator cmMakefileUtilityTargetGenerator cmBootstrapCommands cmCommands cmTarget cmTest cmCustomCommand cmDocumentVariables cmCacheManager cmListFileCache cmComputeLinkDepends cmComputeLinkInformation cmOrderDirectories cmComputeTargetDepends cmComputeComponentGraph cmExprLexer cmExprParser cmExprParserHelper cmListFileLexer + * kwSys Sources: + * Directory Glob RegularExpression SystemTools ProcessUNIX String System + */ + +/*========================================================================= + + Program: KWSys - Kitware System Library + Module: $RCSfile$ + + Copyright (c) Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmsys_Configure_h +#define cmsys_Configure_h + +/* If we are building a kwsys .c or .cxx file, let it use the kwsys + namespace. When not building a kwsys source file these macros are + temporarily defined inside the headers that use them. */ +#if defined(KWSYS_NAMESPACE) +# define kwsys_ns(x) cmsys##x +# define kwsysEXPORT cmsys_EXPORT +#endif + +/* If we are building a kwsys .c or .cxx file, suppress the Microsoft + deprecation warnings. */ +#if defined(KWSYS_NAMESPACE) +# ifndef _CRT_NONSTDC_NO_DEPRECATE +# define _CRT_NONSTDC_NO_DEPRECATE +# endif +# ifndef _CRT_SECURE_NO_DEPRECATE +# define _CRT_SECURE_NO_DEPRECATE +# endif +# ifndef _SCL_SECURE_NO_DEPRECATE +# define _SCL_SECURE_NO_DEPRECATE +# endif +#endif + +/* Whether Large File Support is requested. */ +#define cmsys_LFS_REQUESTED 0 + +/* Whether Large File Support is available. */ +#if cmsys_LFS_REQUESTED +# define cmsys_LFS_AVAILABLE 0 +#endif + +/* Setup Large File Support if requested. */ +#if cmsys_LFS_REQUESTED + /* Since LFS is requested this header must be included before system + headers whether or not LFS is available. */ +# if 0 && (defined(_SYS_TYPES_H) || defined(_SYS_TYPES_INCLUDED)) +# error "cmsys/Configure.h must be included before sys/types.h" +# endif + /* Enable the large file API if it is available. */ +# if cmsys_LFS_AVAILABLE && \ + !defined(cmsys_LFS_NO_DEFINES) +# if !defined(_LARGEFILE_SOURCE) && \ + !defined(cmsys_LFS_NO_DEFINE_LARGEFILE_SOURCE) +# define _LARGEFILE_SOURCE +# endif +# if !defined(_LARGEFILE64_SOURCE) && \ + !defined(cmsys_LFS_NO_DEFINE_LARGEFILE64_SOURCE) +# define _LARGEFILE64_SOURCE +# endif +# if !defined(_LARGE_FILES) && \ + !defined(cmsys_LFS_NO_DEFINE_LARGE_FILES) +# define _LARGE_FILES +# endif +# if !defined(_FILE_OFFSET_BITS) && \ + !defined(cmsys_LFS_NO_DEFINE_FILE_OFFSET_BITS) +# define _FILE_OFFSET_BITS 64 +# endif +# if 0 && (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS < 64) +# error "_FILE_OFFSET_BITS must be defined to at least 64" +# endif +# endif +#endif + +/* Setup the export macro. */ +#if defined(_WIN32) && 0 +# if defined(cmsys_EXPORTS) +# define cmsys_EXPORT __declspec(dllexport) +# else +# define cmsys_EXPORT __declspec(dllimport) +# endif +#else +# define cmsys_EXPORT +#endif + +/* Enable warnings that are off by default but are useful. */ +#if !defined(cmsys_NO_WARNING_ENABLE) +# if defined(_MSC_VER) +# pragma warning ( default : 4263 ) /* no override, call convention differs */ +# endif +#endif + +/* Disable warnings that are on by default but occur in valid code. */ +#if !defined(cmsys_NO_WARNING_DISABLE) +# if defined(_MSC_VER) +# pragma warning (disable: 4097) /* typedef is synonym for class */ +# pragma warning (disable: 4127) /* conditional expression is constant */ +# pragma warning (disable: 4244) /* possible loss in conversion */ +# pragma warning (disable: 4251) /* missing DLL-interface */ +# pragma warning (disable: 4305) /* truncation from type1 to type2 */ +# pragma warning (disable: 4309) /* truncation of constant value */ +# pragma warning (disable: 4514) /* unreferenced inline function */ +# pragma warning (disable: 4706) /* assignment in conditional expression */ +# pragma warning (disable: 4710) /* function not inlined */ +# pragma warning (disable: 4786) /* identifier truncated in debug info */ +# endif +#endif + +/* MSVC 6.0 in release mode will warn about code it produces with its + optimizer. Disable the warnings specifically for this + configuration. Real warnings will be revealed by a debug build or + by other compilers. */ +#if !defined(cmsys_NO_WARNING_DISABLE_BOGUS) +# if defined(_MSC_VER) && (_MSC_VER < 1300) && defined(NDEBUG) +# pragma warning ( disable : 4701 ) /* Variable may be used uninitialized. */ +# pragma warning ( disable : 4702 ) /* Unreachable code. */ +# endif +#endif + +#endif diff --git a/VMSbuild/cmsys/Configure.hxx b/VMSbuild/cmsys/Configure.hxx new file mode 100644 index 000000000..537e4e408 --- /dev/null +++ b/VMSbuild/cmsys/Configure.hxx @@ -0,0 +1,189 @@ +/* + * Generated by /cygdrive/c/hoffman/My Builds/CMake262/bootstrap + * Version: $Revision$ + * + * Source directory: /cygdrive/c/hoffman/My Builds/CMake262 + * Binary directory: /cygdrive/c/hoffman/My Builds/CMake262-cygwin/Bootstrap.cmk + * + * C compiler: cc + * C flags: + * + * C++ compiler: g++ + * C++ flags: + * + * Make: make + * + * Sources: + * cmake cmakemain cmakewizard cmCommandArgumentLexer cmCommandArgumentParser cmCommandArgumentParserHelper cmDepends cmDependsC cmDocumentationFormatter cmDocumentationFormatterText cmPolicies cmProperty cmPropertyMap cmPropertyDefinition cmPropertyDefinitionMap cmMakeDepend cmMakefile cmExportFileGenerator cmExportInstallFileGenerator cmInstallDirectoryGenerator cmGeneratedFileStream cmGlobalGenerator cmLocalGenerator cmInstallGenerator cmInstallExportGenerator cmInstallFilesGenerator cmInstallScriptGenerator cmInstallTargetGenerator cmSourceFile cmSourceFileLocation cmSystemTools cmVersion cmFileTimeComparison cmGlobalUnixMakefileGenerator3 cmLocalUnixMakefileGenerator3 cmMakefileExecutableTargetGenerator cmMakefileLibraryTargetGenerator cmMakefileTargetGenerator cmMakefileUtilityTargetGenerator cmBootstrapCommands cmCommands cmTarget cmTest cmCustomCommand cmDocumentVariables cmCacheManager cmListFileCache cmComputeLinkDepends cmComputeLinkInformation cmOrderDirectories cmComputeTargetDepends cmComputeComponentGraph cmExprLexer cmExprParser cmExprParserHelper cmListFileLexer + * kwSys Sources: + * Directory Glob RegularExpression SystemTools ProcessUNIX String System + */ + +/*========================================================================= + + Program: KWSys - Kitware System Library + Module: $RCSfile$ + + Copyright (c) Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmsys_Configure_hxx +#define cmsys_Configure_hxx + +/* Include C configuration. */ +#include + +/* Whether kwsys namespace is "kwsys". */ +#define cmsys_NAME_IS_KWSYS 0 + +/* Whether ANSI C++ stream headers are to be used. */ +#define cmsys_IOS_USE_ANSI 1 + +/* Whether ANSI C++ streams are in std namespace. */ +#define cmsys_IOS_HAVE_STD 1 + +/* Whether ANSI C++ header is to be used. */ +#define cmsys_IOS_USE_SSTREAM 1 + +/* Whether old C++ header is to be used. */ +#define cmsys_IOS_USE_STRSTREAM_H 0 + +/* Whether old C++ header is to be used. */ +#define cmsys_IOS_USE_STRSTREA_H 0 + +/* Whether STL is in std namespace. */ +#define cmsys_STL_HAVE_STD 1 + +/* Whether the STL string has operator<< for ostream. */ +#define cmsys_STL_STRING_HAVE_OSTREAM 1 + +/* Whether the STL string has operator>> for istream. */ +#define cmsys_STL_STRING_HAVE_ISTREAM 1 + +/* Whether the STL string has operator!= for char*. */ +#define cmsys_STL_STRING_HAVE_NEQ_CHAR 1 + +/* Define the stl namespace macro. */ +#if cmsys_STL_HAVE_STD +# define cmsys_stl std +#else +# define cmsys_stl +#endif + +/* Define the ios namespace macro. */ +#if cmsys_IOS_HAVE_STD +# define cmsys_ios_namespace std +#else +# define cmsys_ios_namespace +#endif +#if cmsys_IOS_USE_SSTREAM +# define cmsys_ios cmsys_ios_namespace +#else +# define cmsys_ios cmsys_ios +#endif + +/* Whether the cstddef header is available. */ +#define cmsys_CXX_HAS_CSTDDEF 1 + +/* Whether the compiler supports null template arguments. */ +#define cmsys_CXX_HAS_NULL_TEMPLATE_ARGS 1 + +/* Define the null template arguments macro. */ +#if cmsys_CXX_HAS_NULL_TEMPLATE_ARGS +# define cmsys_CXX_NULL_TEMPLATE_ARGS <> +#else +# define cmsys_CXX_NULL_TEMPLATE_ARGS +#endif + +/* Whether the compiler supports member templates. */ +#define cmsys_CXX_HAS_MEMBER_TEMPLATES 1 + +/* Whether the compiler supports argument dependent lookup. */ +#define cmsys_CXX_HAS_ARGUMENT_DEPENDENT_LOOKUP 1 + +/* Whether the compiler supports standard full specialization syntax. */ +#define cmsys_CXX_HAS_FULL_SPECIALIZATION 1 + +/* Define the specialization definition macro. */ +#if cmsys_CXX_HAS_FULL_SPECIALIZATION +# define cmsys_CXX_DEFINE_SPECIALIZATION template <> +#else +# define cmsys_CXX_DEFINE_SPECIALIZATION +#endif + +/* Define typename keyword macro for use in declarations. */ +#if defined(_MSC_VER) && _MSC_VER < 1300 +# define cmsys_CXX_DECL_TYPENAME +#else +# define cmsys_CXX_DECL_TYPENAME typename +#endif + +/* Whether the stl has iterator_traits. */ +#define cmsys_STL_HAS_ITERATOR_TRAITS 1 + +/* Whether the stl has iterator_category. */ +#define cmsys_STL_HAS_ITERATOR_CATEGORY 0 + +/* Whether the stl has __iterator_category. */ +#define cmsys_STL_HAS___ITERATOR_CATEGORY 0 + +/* Whether the stl allocator is the standard template. */ +#define cmsys_STL_HAS_ALLOCATOR_TEMPLATE 1 + +/* Whether the stl allocator is not a template. */ +#define cmsys_STL_HAS_ALLOCATOR_NONTEMPLATE 0 + +/* Whether the stl allocator has rebind. */ +#define cmsys_STL_HAS_ALLOCATOR_REBIND 1 + +/* Whether the stl allocator has a size argument for max_size. */ +#define cmsys_STL_HAS_ALLOCATOR_MAX_SIZE_ARGUMENT 0 + +/* Whether the stl containers support allocator objects. */ +#define cmsys_STL_HAS_ALLOCATOR_OBJECTS 1 + +/* Whether struct stat has the st_mtim member for high resolution times. */ +/* #undef cmsys_STAT_HAS_ST_MTIM 1 */ + +/* If building a C++ file in kwsys itself, give the source file + access to the macros without a configured namespace. */ +#if defined(KWSYS_NAMESPACE) +# if !cmsys_NAME_IS_KWSYS +# define kwsys_stl cmsys_stl +# define kwsys_ios cmsys_ios +# define kwsys cmsys +# endif +# define KWSYS_NAME_IS_KWSYS cmsys_NAME_IS_KWSYS +# define KWSYS_STL_HAVE_STD cmsys_STL_HAVE_STD +# define KWSYS_IOS_HAVE_STD cmsys_IOS_HAVE_STD +# define KWSYS_IOS_USE_ANSI cmsys_IOS_USE_ANSI +# define KWSYS_IOS_USE_SSTREAM cmsys_IOS_USE_SSTREAM +# define KWSYS_IOS_USE_STRSTREAM_H cmsys_IOS_USE_STRSTREAM_H +# define KWSYS_IOS_USE_STRSTREA_H cmsys_IOS_USE_STRSTREA_H +# define KWSYS_STAT_HAS_ST_MTIM cmsys_STAT_HAS_ST_MTIM +# define KWSYS_CXX_HAS_CSTDDEF cmsys_CXX_HAS_CSTDDEF +# define KWSYS_STL_STRING_HAVE_OSTREAM cmsys_STL_STRING_HAVE_OSTREAM +# define KWSYS_STL_STRING_HAVE_ISTREAM cmsys_STL_STRING_HAVE_ISTREAM +# define KWSYS_STL_STRING_HAVE_NEQ_CHAR cmsys_STL_STRING_HAVE_NEQ_CHAR +# define KWSYS_CXX_NULL_TEMPLATE_ARGS cmsys_CXX_NULL_TEMPLATE_ARGS +# define KWSYS_CXX_HAS_MEMBER_TEMPLATES cmsys_CXX_HAS_MEMBER_TEMPLATES +# define KWSYS_CXX_HAS_FULL_SPECIALIZATION cmsys_CXX_HAS_FULL_SPECIALIZATION +# define KWSYS_CXX_DEFINE_SPECIALIZATION cmsys_CXX_DEFINE_SPECIALIZATION +# define KWSYS_CXX_DECL_TYPENAME cmsys_CXX_DECL_TYPENAME +# define KWSYS_STL_HAS_ALLOCATOR_REBIND cmsys_STL_HAS_ALLOCATOR_REBIND +# define KWSYS_STL_HAS_ALLOCATOR_MAX_SIZE_ARGUMENT cmsys_STL_HAS_ALLOCATOR_MAX_SIZE_ARGUMENT +# define KWSYS_CXX_HAS_ARGUMENT_DEPENDENT_LOOKUP cmsys_CXX_HAS_ARGUMENT_DEPENDENT_LOOKUP +# define KWSYS_STL_HAS_ITERATOR_TRAITS cmsys_STL_HAS_ITERATOR_TRAITS +# define KWSYS_STL_HAS_ITERATOR_CATEGORY cmsys_STL_HAS_ITERATOR_CATEGORY +# define KWSYS_STL_HAS___ITERATOR_CATEGORY cmsys_STL_HAS___ITERATOR_CATEGORY +# define KWSYS_STL_HAS_ALLOCATOR_TEMPLATE cmsys_STL_HAS_ALLOCATOR_TEMPLATE +# define KWSYS_STL_HAS_ALLOCATOR_NONTEMPLATE cmsys_STL_HAS_ALLOCATOR_NONTEMPLATE +# define KWSYS_STL_HAS_ALLOCATOR_OBJECTS cmsys_STL_HAS_ALLOCATOR_OBJECTS +#endif + +#endif diff --git a/VMSbuild/cmsys/DateStamp.h b/VMSbuild/cmsys/DateStamp.h new file mode 100644 index 000000000..e3b7b452e --- /dev/null +++ b/VMSbuild/cmsys/DateStamp.h @@ -0,0 +1,44 @@ +/*========================================================================= + + Program: KWSys - Kitware System Library + Module: $RCSfile$ + + Copyright (c) Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmsys_DateStamp_h +#define cmsys_DateStamp_h + +/** Version date integer year. The format is CCYY. */ +#define cmsys_DATE_STAMP_YEAR 2009 + +/** Version date integer month. The format is MM. */ +#define cmsys_DATE_STAMP_MONTH 04 + +/** Version date integer day. The format is DD. */ +#define cmsys_DATE_STAMP_DAY 22 + +/** Version date full integer. The format is CCYYMMDD. */ +#define cmsys_DATE_STAMP_FULL 20090422 + +/** Version date string year. The format is "CCYY". */ +#define cmsys_DATE_STAMP_STRING_YEAR "2009" + +/** Version date string month. The format is "MM". */ +#define cmsys_DATE_STAMP_STRING_MONTH "04" + +/** Version date string day. The format is "DD". */ +#define cmsys_DATE_STAMP_STRING_DAY "22" + +/** Version date full string. The format is "CCYYMMDD". */ +#define cmsys_DATE_STAMP_STRING_FULL "20090422" + +/** Version date formatted string. The format is "CCYY-MM-DD". */ +#define cmsys_DATE_STAMP_STRING "2009-04-22" + +#endif diff --git a/VMSbuild/cmsys/Directory.hxx b/VMSbuild/cmsys/Directory.hxx new file mode 100644 index 000000000..1a27b2a43 --- /dev/null +++ b/VMSbuild/cmsys/Directory.hxx @@ -0,0 +1,82 @@ +/*========================================================================= + + Program: KWSys - Kitware System Library + Module: $RCSfile$ + + Copyright (c) Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmsys_Directory_hxx +#define cmsys_Directory_hxx + +#include + +namespace cmsys +{ + +class DirectoryInternals; + +/** \class Directory + * \brief Portable directory/filename traversal. + * + * Directory provides a portable way of finding the names of the files + * in a system directory. + * + * Directory currently works with Windows and Unix operating systems. + */ +class cmsys_EXPORT Directory +{ +public: + Directory(); + ~Directory(); + + /** + * Load the specified directory and load the names of the files + * in that directory. 0 is returned if the directory can not be + * opened, 1 if it is opened. + */ + bool Load(const char*); + + /** + * Return the number of files in the current directory. + */ + unsigned long GetNumberOfFiles() const; + + /** + * Return the number of files in the specified directory. + * A higher performance static method. + */ + static unsigned long GetNumberOfFilesInDirectory(const char*); + + /** + * Return the file at the given index, the indexing is 0 based + */ + const char* GetFile(unsigned long) const; + + /** + * Return the path to Open'ed directory + */ + const char* GetPath() const; + + /** + * Clear the internal structure. Used internally at beginning of Load(...) + * to clear the cache. + */ + void Clear(); + +private: + // Private implementation details. + DirectoryInternals* Internal; + + Directory(const Directory&); // Not implemented. + void operator=(const Directory&); // Not implemented. +}; // End Class: Directory + +} // namespace cmsys + +#endif diff --git a/VMSbuild/cmsys/Glob.hxx b/VMSbuild/cmsys/Glob.hxx new file mode 100644 index 000000000..07ae5500b --- /dev/null +++ b/VMSbuild/cmsys/Glob.hxx @@ -0,0 +1,118 @@ +/*========================================================================= + + Program: KWSys - Kitware System Library + Module: $RCSfile$ + + Copyright (c) Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmsys_Glob_hxx +#define cmsys_Glob_hxx + +#include +#include + +#include +#include + +/* Define this macro temporarily to keep the code readable. */ +#if !defined (KWSYS_NAMESPACE) && !cmsys_NAME_IS_KWSYS +# define kwsys_stl cmsys_stl +#endif + +namespace cmsys +{ + +class GlobInternals; + +/** \class Glob + * \brief Portable globbing searches. + * + * Globbing expressions are much simpler than regular + * expressions. This class will search for files using + * globbing expressions. + * + * Finds all files that match a given globbing expression. + */ +class cmsys_EXPORT Glob +{ +public: + Glob(); + ~Glob(); + + //! Find all files that match the pattern. + bool FindFiles(const kwsys_stl::string& inexpr); + + //! Return the list of files that matched. + kwsys_stl::vector& GetFiles(); + + //! Set recurse to true to match subdirectories. + void RecurseOn() { this->SetRecurse(true); } + void RecurseOff() { this->SetRecurse(false); } + void SetRecurse(bool i) { this->Recurse = i; } + bool GetRecurse() { return this->Recurse; } + + //! Set recurse through symlinks to true if recursion should traverse the + // linked-to directories + void RecurseThroughSymlinksOn() { this->SetRecurseThroughSymlinks(true); } + void RecurseThroughSymlinksOff() { this->SetRecurseThroughSymlinks(false); } + void SetRecurseThroughSymlinks(bool i) { this->RecurseThroughSymlinks = i; } + bool GetRecurseThroughSymlinks() { return this->RecurseThroughSymlinks; } + + //! Get the number of symlinks followed through recursion + unsigned int GetFollowedSymlinkCount() { return this->FollowedSymlinkCount; } + + //! Set relative to true to only show relative path to files. + void SetRelative(const char* dir); + const char* GetRelative(); + + /** Convert the given globbing pattern to a regular expression. + There is no way to quote meta-characters. The + require_whole_string argument specifies whether the regex is + automatically surrounded by "^" and "$" to match the whole + string. This is on by default because patterns always match + whole strings, but may be disabled to support concatenating + expressions more easily (regex1|regex2|etc). */ + static kwsys_stl::string PatternToRegex(const kwsys_stl::string& pattern, + bool require_whole_string = true); + +protected: + //! Process directory + void ProcessDirectory(kwsys_stl::string::size_type start, + const kwsys_stl::string& dir, bool dir_only); + + //! Process last directory, but only when recurse flags is on. That is + // effectively like saying: /path/to/file/**/file + void RecurseDirectory(kwsys_stl::string::size_type start, + const kwsys_stl::string& dir, bool dir_only); + + //! Add regular expression + void AddExpression(const char* expr); + + //! Add a file to the list + void AddFile(kwsys_stl::vector& files, const char* file); + + GlobInternals* Internals; + bool Recurse; + kwsys_stl::string Relative; + bool RecurseThroughSymlinks; + unsigned int FollowedSymlinkCount; + +private: + Glob(const Glob&); // Not implemented. + void operator=(const Glob&); // Not implemented. +}; + +} // namespace cmsys + +/* Undefine temporary macro. */ +#if !defined (KWSYS_NAMESPACE) && !cmsys_NAME_IS_KWSYS +# undef kwsys_stl +#endif + +#endif diff --git a/VMSbuild/cmsys/Process.h b/VMSbuild/cmsys/Process.h new file mode 100644 index 000000000..85b4558d8 --- /dev/null +++ b/VMSbuild/cmsys/Process.h @@ -0,0 +1,430 @@ +/*========================================================================= + + Program: KWSys - Kitware System Library + Module: $RCSfile$ + + Copyright (c) Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmsys_Process_h +#define cmsys_Process_h + +#include + +/* Redefine all public interface symbol names to be in the proper + namespace. These macros are used internally to kwsys only, and are + not visible to user code. Use kwsysHeaderDump.pl to reproduce + these macros after making changes to the interface. */ +#if !defined(KWSYS_NAMESPACE) +# define kwsys_ns(x) cmsys##x +# define kwsysEXPORT cmsys_EXPORT +#endif +#if !cmsys_NAME_IS_KWSYS +# define kwsysProcess kwsys_ns(Process) +# define kwsysProcess_s kwsys_ns(Process_s) +# define kwsysProcess_New kwsys_ns(Process_New) +# define kwsysProcess_Delete kwsys_ns(Process_Delete) +# define kwsysProcess_SetCommand kwsys_ns(Process_SetCommand) +# define kwsysProcess_AddCommand kwsys_ns(Process_AddCommand) +# define kwsysProcess_SetTimeout kwsys_ns(Process_SetTimeout) +# define kwsysProcess_SetWorkingDirectory kwsys_ns(Process_SetWorkingDirectory) +# define kwsysProcess_SetPipeFile kwsys_ns(Process_SetPipeFile) +# define kwsysProcess_SetPipeNative kwsys_ns(Process_SetPipeNative) +# define kwsysProcess_SetPipeShared kwsys_ns(Process_SetPipeShared) +# define kwsysProcess_Option_Detach kwsys_ns(Process_Option_Detach) +# define kwsysProcess_Option_HideWindow kwsys_ns(Process_Option_HideWindow) +# define kwsysProcess_Option_Verbatim kwsys_ns(Process_Option_Verbatim) +# define kwsysProcess_GetOption kwsys_ns(Process_GetOption) +# define kwsysProcess_SetOption kwsys_ns(Process_SetOption) +# define kwsysProcess_Option_e kwsys_ns(Process_Option_e) +# define kwsysProcess_State_Starting kwsys_ns(Process_State_Starting) +# define kwsysProcess_State_Error kwsys_ns(Process_State_Error) +# define kwsysProcess_State_Exception kwsys_ns(Process_State_Exception) +# define kwsysProcess_State_Executing kwsys_ns(Process_State_Executing) +# define kwsysProcess_State_Exited kwsys_ns(Process_State_Exited) +# define kwsysProcess_State_Expired kwsys_ns(Process_State_Expired) +# define kwsysProcess_State_Killed kwsys_ns(Process_State_Killed) +# define kwsysProcess_State_Disowned kwsys_ns(Process_State_Disowned) +# define kwsysProcess_GetState kwsys_ns(Process_GetState) +# define kwsysProcess_State_e kwsys_ns(Process_State_e) +# define kwsysProcess_Exception_None kwsys_ns(Process_Exception_None) +# define kwsysProcess_Exception_Fault kwsys_ns(Process_Exception_Fault) +# define kwsysProcess_Exception_Illegal kwsys_ns(Process_Exception_Illegal) +# define kwsysProcess_Exception_Interrupt kwsys_ns(Process_Exception_Interrupt) +# define kwsysProcess_Exception_Numerical kwsys_ns(Process_Exception_Numerical) +# define kwsysProcess_Exception_Other kwsys_ns(Process_Exception_Other) +# define kwsysProcess_GetExitException kwsys_ns(Process_GetExitException) +# define kwsysProcess_Exception_e kwsys_ns(Process_Exception_e) +# define kwsysProcess_GetExitCode kwsys_ns(Process_GetExitCode) +# define kwsysProcess_GetExitValue kwsys_ns(Process_GetExitValue) +# define kwsysProcess_GetErrorString kwsys_ns(Process_GetErrorString) +# define kwsysProcess_GetExceptionString kwsys_ns(Process_GetExceptionString) +# define kwsysProcess_Execute kwsys_ns(Process_Execute) +# define kwsysProcess_Disown kwsys_ns(Process_Disown) +# define kwsysProcess_WaitForData kwsys_ns(Process_WaitForData) +# define kwsysProcess_Pipes_e kwsys_ns(Process_Pipes_e) +# define kwsysProcess_Pipe_None kwsys_ns(Process_Pipe_None) +# define kwsysProcess_Pipe_STDIN kwsys_ns(Process_Pipe_STDIN) +# define kwsysProcess_Pipe_STDOUT kwsys_ns(Process_Pipe_STDOUT) +# define kwsysProcess_Pipe_STDERR kwsys_ns(Process_Pipe_STDERR) +# define kwsysProcess_Pipe_Timeout kwsys_ns(Process_Pipe_Timeout) +# define kwsysProcess_Pipe_Handle kwsys_ns(Process_Pipe_Handle) +# define kwsysProcess_WaitForExit kwsys_ns(Process_WaitForExit) +# define kwsysProcess_Kill kwsys_ns(Process_Kill) +#endif + +#if defined(__cplusplus) +extern "C" +{ +#endif + +/** + * Process control data structure. + */ +typedef struct kwsysProcess_s kwsysProcess; + +/* Platform-specific pipe handle type. */ +#if defined(_WIN32) && !defined(__CYGWIN__) +typedef void* kwsysProcess_Pipe_Handle; +#else +typedef int kwsysProcess_Pipe_Handle; +#endif + +/** + * Create a new Process instance. + */ +kwsysEXPORT kwsysProcess* kwsysProcess_New(void); + +/** + * Delete an existing Process instance. If the instance is currently + * executing a process, this blocks until the process terminates. + */ +kwsysEXPORT void kwsysProcess_Delete(kwsysProcess* cp); + +/** + * Set the command line to be executed. Argument is an array of + * pointers to the command and each argument. The array must end with + * a NULL pointer. Any previous command lines are removed. Returns + * 1 for success and 0 otherwise. + */ +kwsysEXPORT int kwsysProcess_SetCommand(kwsysProcess* cp, + char const* const* command); + +/** + * Add a command line to be executed. Argument is an array of + * pointers to the command and each argument. The array must end with + * a NULL pointer. If this is not the first command added, its + * standard input will be connected to the standard output of the + * previous command. Returns 1 for success and 0 otherwise. + */ +kwsysEXPORT int kwsysProcess_AddCommand(kwsysProcess* cp, + char const* const* command); + +/** + * Set the timeout in seconds for the child process. The timeout + * period begins when the child is executed. If the child has not + * terminated when the timeout expires, it will be killed. A + * non-positive (<= 0) value will disable the timeout. + */ +kwsysEXPORT void kwsysProcess_SetTimeout(kwsysProcess* cp, double timeout); + +/** + * Set the working directory for the child process. The working + * directory can be absolute or relative to the current directory. + * Returns 1 for success and 0 for failure. + */ +kwsysEXPORT int kwsysProcess_SetWorkingDirectory(kwsysProcess* cp, + const char* dir); + +/** + * Set the name of a file to be attached to the given pipe. Returns 1 + * for success and 0 for failure. + */ +kwsysEXPORT int kwsysProcess_SetPipeFile(kwsysProcess* cp, int pipe, + const char* file); + +/** + * Set whether the given pipe in the child is shared with the parent + * process. The default is no for Pipe_STDOUT and Pipe_STDERR and yes + * for Pipe_STDIN. + */ +kwsysEXPORT void kwsysProcess_SetPipeShared(kwsysProcess* cp, int pipe, + int shared); + +/** + * Specify a platform-specific native pipe for use as one of the child + * interface pipes. The native pipe is specified by an array of two + * descriptors or handles. The first entry in the array (index 0) + * should be the read end of the pipe. The second entry in the array + * (index 1) should be the write end of the pipe. If a null pointer + * is given the option will be disabled. + * + * For Pipe_STDIN the native pipe is connected to the first child in + * the pipeline as its stdin. After the children are created the + * write end of the pipe will be closed in the child process and the + * read end will be closed in the parent process. + * + * For Pipe_STDOUT and Pipe_STDERR the pipe is connected to the last + * child as its stdout or stderr. After the children are created the + * write end of the pipe will be closed in the parent process and the + * read end will be closed in the child process. + */ +kwsysEXPORT void kwsysProcess_SetPipeNative(kwsysProcess* cp, int pipe, + kwsysProcess_Pipe_Handle p[2]); + +/** + * Get/Set a possibly platform-specific option. Possible options are: + * + * kwsysProcess_Option_Detach = Whether to detach the process. + * 0 = No (default) + * 1 = Yes + * + * kwsysProcess_Option_HideWindow = Whether to hide window on Windows. + * 0 = No (default) + * 1 = Yes + * + * kwsysProcess_Option_Verbatim = Whether SetCommand and AddCommand + * should treat the first argument + * as a verbatim command line + * and ignore the rest of the arguments. + * 0 = No (default) + * 1 = Yes + */ +kwsysEXPORT int kwsysProcess_GetOption(kwsysProcess* cp, int optionId); +kwsysEXPORT void kwsysProcess_SetOption(kwsysProcess* cp, int optionId, + int value); +enum kwsysProcess_Option_e +{ + kwsysProcess_Option_HideWindow, + kwsysProcess_Option_Detach, + kwsysProcess_Option_Verbatim +}; + +/** + * Get the current state of the Process instance. Possible states are: + * + * kwsysProcess_State_Starting = Execute has not yet been called. + * kwsysProcess_State_Error = Error administrating the child process. + * kwsysProcess_State_Exception = Child process exited abnormally. + * kwsysProcess_State_Executing = Child process is currently running. + * kwsysProcess_State_Exited = Child process exited normally. + * kwsysProcess_State_Expired = Child process's timeout expired. + * kwsysProcess_State_Killed = Child process terminated by Kill method. + * kwsysProcess_State_Disowned = Child is no longer managed by this object. + */ +kwsysEXPORT int kwsysProcess_GetState(kwsysProcess* cp); +enum kwsysProcess_State_e +{ + kwsysProcess_State_Starting, + kwsysProcess_State_Error, + kwsysProcess_State_Exception, + kwsysProcess_State_Executing, + kwsysProcess_State_Exited, + kwsysProcess_State_Expired, + kwsysProcess_State_Killed, + kwsysProcess_State_Disowned +}; + +/** + * When GetState returns "Exception", this method returns a + * platform-independent description of the exceptional behavior that + * caused the child to terminate abnormally. Possible exceptions are: + * + * kwsysProcess_Exception_None = No exceptional behavior occurred. + * kwsysProcess_Exception_Fault = Child crashed with a memory fault. + * kwsysProcess_Exception_Illegal = Child crashed with an illegal instruction. + * kwsysProcess_Exception_Interrupt = Child was interrupted by user (Cntl-C/Break). + * kwsysProcess_Exception_Numerical = Child crashed with a numerical exception. + * kwsysProcess_Exception_Other = Child terminated for another reason. + */ +kwsysEXPORT int kwsysProcess_GetExitException(kwsysProcess* cp); +enum kwsysProcess_Exception_e +{ + kwsysProcess_Exception_None, + kwsysProcess_Exception_Fault, + kwsysProcess_Exception_Illegal, + kwsysProcess_Exception_Interrupt, + kwsysProcess_Exception_Numerical, + kwsysProcess_Exception_Other +}; + +/** + * When GetState returns "Exited" or "Exception", this method returns + * the platform-specific raw exit code of the process. UNIX platforms + * should use WIFEXITED/WEXITSTATUS and WIFSIGNALED/WTERMSIG to access + * this value. Windows users should compare the value to the various + * EXCEPTION_* values. + * + * If GetState returns "Exited", use GetExitValue to get the + * platform-independent child return value. + */ +kwsysEXPORT int kwsysProcess_GetExitCode(kwsysProcess* cp); + +/** + * When GetState returns "Exited", this method returns the child's + * platform-independent exit code (such as the value returned by the + * child's main). + */ +kwsysEXPORT int kwsysProcess_GetExitValue(kwsysProcess* cp); + +/** + * When GetState returns "Error", this method returns a string + * describing the problem. Otherwise, it returns NULL. + */ +kwsysEXPORT const char* kwsysProcess_GetErrorString(kwsysProcess* cp); + +/** + * When GetState returns "Exception", this method returns a string + * describing the problem. Otherwise, it returns NULL. + */ +kwsysEXPORT const char* kwsysProcess_GetExceptionString(kwsysProcess* cp); + +/** + * Start executing the child process. + */ +kwsysEXPORT void kwsysProcess_Execute(kwsysProcess* cp); + +/** + * Stop management of a detached child process. This closes any pipes + * being read. If the child was not created with the + * kwsysProcess_Option_Detach option, this method does nothing. This + * is because disowning a non-detached process will cause the child + * exit signal to be left unhandled until this process exits. + */ +kwsysEXPORT void kwsysProcess_Disown(kwsysProcess* cp); + +/** + * Block until data are available on a pipe, a timeout expires, or the + * child process terminates. Arguments are as follows: + * + * data = If data are read, the pointer to which this points is + * set to point to the data. + * length = If data are read, the integer to which this points is + * set to the length of the data read. + * timeout = Specifies the maximum time this call may block. Upon + * return after reading data, the time elapsed is subtracted + * from the timeout value. If this timeout expires, the + * value is set to 0. A NULL pointer passed for this argument + * indicates no timeout for the call. A negative or zero + * value passed for this argument may be used for polling + * and will always return immediately. + * + * Return value will be one of: + * + * Pipe_None = No more data will be available from the child process, + * ( == 0) or no process has been executed. WaitForExit should + * be called to wait for the process to terminate. + * Pipe_STDOUT = Data have been read from the child's stdout pipe. + * Pipe_STDERR = Data have been read from the child's stderr pipe. + * Pipe_Timeout = No data available within timeout specified for the + * call. Time elapsed has been subtracted from timeout + * argument. + */ +kwsysEXPORT int kwsysProcess_WaitForData(kwsysProcess* cp, char** data, + int* length, double* timeout); +enum kwsysProcess_Pipes_e +{ + kwsysProcess_Pipe_None, + kwsysProcess_Pipe_STDIN, + kwsysProcess_Pipe_STDOUT, + kwsysProcess_Pipe_STDERR, + kwsysProcess_Pipe_Timeout=255 +}; + +/** + * Block until the child process terminates or the given timeout + * expires. If no process is running, returns immediatly. The + * argument is: + * + * timeout = Specifies the maximum time this call may block. Upon + * returning due to child termination, the elapsed time + * is subtracted from the given value. A NULL pointer + * passed for this argument indicates no timeout for the + * call. + * + * Return value will be one of: + * + * 0 = Child did not terminate within timeout specified for + * the call. Time elapsed has been subtracted from timeout + * argument. + * 1 = Child has terminated or was not running. + */ +kwsysEXPORT int kwsysProcess_WaitForExit(kwsysProcess* cp, double* timeout); + +/** + * Forcefully terminate the child process that is currently running. + * The caller should call WaitForExit after this returns to wait for + * the child to terminate. + */ +kwsysEXPORT void kwsysProcess_Kill(kwsysProcess* cp); + +#if defined(__cplusplus) +} /* extern "C" */ +#endif + +/* If we are building a kwsys .c or .cxx file, let it use these macros. + Otherwise, undefine them to keep the namespace clean. */ +#if !defined(KWSYS_NAMESPACE) +# undef kwsys_ns +# undef kwsysEXPORT +# if !cmsys_NAME_IS_KWSYS +# undef kwsysProcess +# undef kwsysProcess_s +# undef kwsysProcess_New +# undef kwsysProcess_Delete +# undef kwsysProcess_SetCommand +# undef kwsysProcess_AddCommand +# undef kwsysProcess_SetTimeout +# undef kwsysProcess_SetWorkingDirectory +# undef kwsysProcess_SetPipeFile +# undef kwsysProcess_SetPipeNative +# undef kwsysProcess_SetPipeShared +# undef kwsysProcess_Option_Detach +# undef kwsysProcess_Option_HideWindow +# undef kwsysProcess_Option_Verbatim +# undef kwsysProcess_GetOption +# undef kwsysProcess_SetOption +# undef kwsysProcess_Option_e +# undef kwsysProcess_State_Starting +# undef kwsysProcess_State_Error +# undef kwsysProcess_State_Exception +# undef kwsysProcess_State_Executing +# undef kwsysProcess_State_Exited +# undef kwsysProcess_State_Expired +# undef kwsysProcess_State_Killed +# undef kwsysProcess_State_Disowned +# undef kwsysProcess_GetState +# undef kwsysProcess_State_e +# undef kwsysProcess_Exception_None +# undef kwsysProcess_Exception_Fault +# undef kwsysProcess_Exception_Illegal +# undef kwsysProcess_Exception_Interrupt +# undef kwsysProcess_Exception_Numerical +# undef kwsysProcess_Exception_Other +# undef kwsysProcess_GetExitException +# undef kwsysProcess_Exception_e +# undef kwsysProcess_GetExitCode +# undef kwsysProcess_GetExitValue +# undef kwsysProcess_GetErrorString +# undef kwsysProcess_GetExceptionString +# undef kwsysProcess_Execute +# undef kwsysProcess_Disown +# undef kwsysProcess_WaitForData +# undef kwsysProcess_Pipes_e +# undef kwsysProcess_Pipe_None +# undef kwsysProcess_Pipe_STDIN +# undef kwsysProcess_Pipe_STDOUT +# undef kwsysProcess_Pipe_STDERR +# undef kwsysProcess_Pipe_Timeout +# undef kwsysProcess_Pipe_Handle +# undef kwsysProcess_WaitForExit +# undef kwsysProcess_Kill +# endif +#endif + +#endif diff --git a/VMSbuild/cmsys/RegularExpression.hxx b/VMSbuild/cmsys/RegularExpression.hxx new file mode 100644 index 000000000..1efe3c63e --- /dev/null +++ b/VMSbuild/cmsys/RegularExpression.hxx @@ -0,0 +1,410 @@ +/*========================================================================= + + Program: KWSys - Kitware System Library + Module: $RCSfile$ + + Copyright (c) Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +// Original Copyright notice: +// Copyright (C) 1991 Texas Instruments Incorporated. +// +// Permission is granted to any individual or institution to use, copy, modify, +// and distribute this software, provided that this complete copyright and +// permission notice is maintained, intact, in all copies and supporting +// documentation. +// +// Texas Instruments Incorporated provides this software "as is" without +// express or implied warranty. +// +// Created: MNF 06/13/89 Initial Design and Implementation +// Updated: LGO 08/09/89 Inherit from Generic +// Updated: MBN 09/07/89 Added conditional exception handling +// Updated: MBN 12/15/89 Sprinkled "const" qualifiers all over the place! +// Updated: DLS 03/22/91 New lite version +// + +#ifndef cmsys_RegularExpression_hxx +#define cmsys_RegularExpression_hxx + +#include +#include + +#include + +/* Define this macro temporarily to keep the code readable. */ +#if !defined (KWSYS_NAMESPACE) && !cmsys_NAME_IS_KWSYS +# define kwsys_stl cmsys_stl +#endif + +namespace cmsys +{ + +/** \class RegularExpression + * \brief Implements pattern matching with regular expressions. + * + * This is the header file for the regular expression class. An object of + * this class contains a regular expression, in a special "compiled" format. + * This compiled format consists of several slots all kept as the objects + * private data. The RegularExpression class provides a convenient way to + * represent regular expressions. It makes it easy to search for the same + * regular expression in many different strings without having to compile a + * string to regular expression format more than necessary. + * + * This class implements pattern matching via regular expressions. + * A regular expression allows a programmer to specify complex + * patterns that can be searched for and matched against the + * character string of a string object. In its simplest form, a + * regular expression is a sequence of characters used to + * search for exact character matches. However, many times the + * exact sequence to be found is not known, or only a match at + * the beginning or end of a string is desired. The RegularExpression regu- + * lar expression class implements regular expression pattern + * matching as is found and implemented in many UNIX commands + * and utilities. + * + * Example: The perl code + * + * $filename =~ m"([a-z]+)\.cc"; + * print $1; + * + * Is written as follows in C++ + * + * RegularExpression re("([a-z]+)\\.cc"); + * re.find(filename); + * cerr << re.match(1); + * + * + * The regular expression class provides a convenient mechanism + * for specifying and manipulating regular expressions. The + * regular expression object allows specification of such pat- + * terns by using the following regular expression metacharac- + * ters: + * + * ^ Matches at beginning of a line + * + * $ Matches at end of a line + * + * . Matches any single character + * + * [ ] Matches any character(s) inside the brackets + * + * [^ ] Matches any character(s) not inside the brackets + * + * - Matches any character in range on either side of a dash + * + * * Matches preceding pattern zero or more times + * + * + Matches preceding pattern one or more times + * + * ? Matches preceding pattern zero or once only + * + * () Saves a matched expression and uses it in a later match + * + * Note that more than one of these metacharacters can be used + * in a single regular expression in order to create complex + * search patterns. For example, the pattern [^ab1-9] says to + * match any character sequence that does not begin with the + * characters "ab" followed by numbers in the series one + * through nine. + * + * There are three constructors for RegularExpression. One just creates an + * empty RegularExpression object. Another creates a RegularExpression + * object and initializes it with a regular expression that is given in the + * form of a char*. The third takes a reference to a RegularExpression + * object as an argument and creates an object initialized with the + * information from the given RegularExpression object. + * + * The find member function finds the first occurence of the regualr + * expression of that object in the string given to find as an argument. Find + * returns a boolean, and if true, mutates the private data appropriately. + * Find sets pointers to the beginning and end of the thing last found, they + * are pointers into the actual string that was searched. The start and end + * member functions return indicies into the searched string that correspond + * to the beginning and end pointers respectively. The compile member + * function takes a char* and puts the compiled version of the char* argument + * into the object's private data fields. The == and != operators only check + * the to see if the compiled regular expression is the same, and the + * deep_equal functions also checks to see if the start and end pointers are + * the same. The is_valid function returns false if program is set to NULL, + * (i.e. there is no valid compiled exression). The set_invalid function sets + * the program to NULL (Warning: this deletes the compiled expression). The + * following examples may help clarify regular expression usage: + * + * * The regular expression "^hello" matches a "hello" only at the + * beginning of a line. It would match "hello there" but not "hi, + * hello there". + * + * * The regular expression "long$" matches a "long" only at the end + * of a line. It would match "so long\0", but not "long ago". + * + * * The regular expression "t..t..g" will match anything that has a + * "t" then any two characters, another "t", any two characters and + * then a "g". It will match "testing", or "test again" but would + * not match "toasting" + * + * * The regular expression "[1-9ab]" matches any number one through + * nine, and the characters "a" and "b". It would match "hello 1" + * or "begin", but would not match "no-match". + * + * * The regular expression "[^1-9ab]" matches any character that is + * not a number one through nine, or an "a" or "b". It would NOT + * match "hello 1" or "begin", but would match "no-match". + * + * * The regular expression "br* " matches something that begins with + * a "b", is followed by zero or more "r"s, and ends in a space. It + * would match "brrrrr ", and "b ", but would not match "brrh ". + * + * * The regular expression "br+ " matches something that begins with + * a "b", is followed by one or more "r"s, and ends in a space. It + * would match "brrrrr ", and "br ", but would not match "b " or + * "brrh ". + * + * * The regular expression "br? " matches something that begins with + * a "b", is followed by zero or one "r"s, and ends in a space. It + * would match "br ", and "b ", but would not match "brrrr " or + * "brrh ". + * + * * The regular expression "(..p)b" matches something ending with pb + * and beginning with whatever the two characters before the first p + * encounterd in the line were. It would find "repb" in "rep drepa + * qrepb". The regular expression "(..p)a" would find "repa qrepb" + * in "rep drepa qrepb" + * + * * The regular expression "d(..p)" matches something ending with p, + * beginning with d, and having two characters in between that are + * the same as the two characters before the first p encounterd in + * the line. It would match "drepa qrepb" in "rep drepa qrepb". + * + */ +class cmsys_EXPORT RegularExpression +{ +public: + /** + * Instantiate RegularExpression with program=NULL. + */ + inline RegularExpression (); + + /** + * Instantiate RegularExpression with compiled char*. + */ + inline RegularExpression (char const*); + + /** + * Instantiate RegularExpression as a copy of another regular expression. + */ + RegularExpression (RegularExpression const&); + + /** + * Destructor. + */ + inline ~RegularExpression(); + + /** + * Compile a regular expression into internal code + * for later pattern matching. + */ + bool compile (char const*); + + /** + * Matches the regular expression to the given string. + * Returns true if found, and sets start and end indexes accordingly. + */ + bool find (char const*); + + /** + * Matches the regular expression to the given std string. + * Returns true if found, and sets start and end indexes accordingly. + */ + bool find (kwsys_stl::string const&); + + /** + * Index to start of first find. + */ + inline kwsys_stl::string::size_type start() const; + + /** + * Index to end of first find. + */ + inline kwsys_stl::string::size_type end() const; + + /** + * Copy the given regular expression. + */ + RegularExpression& operator= (const RegularExpression& rxp); + + /** + * Returns true if two regular expressions have the same + * compiled program for pattern matching. + */ + bool operator== (RegularExpression const&) const; + + /** + * Returns true if two regular expressions have different + * compiled program for pattern matching. + */ + inline bool operator!= (RegularExpression const&) const; + + /** + * Returns true if have the same compiled regular expressions + * and the same start and end pointers. + */ + bool deep_equal (RegularExpression const&) const; + + /** + * True if the compiled regexp is valid. + */ + inline bool is_valid() const; + + /** + * Marks the regular expression as invalid. + */ + inline void set_invalid(); + + /** + * Destructor. + */ + // awf added + kwsys_stl::string::size_type start(int n) const; + kwsys_stl::string::size_type end(int n) const; + kwsys_stl::string match(int n) const; + + enum { NSUBEXP = 10 }; +private: + const char* startp[NSUBEXP]; + const char* endp[NSUBEXP]; + char regstart; // Internal use only + char reganch; // Internal use only + const char* regmust; // Internal use only + kwsys_stl::string::size_type regmlen; // Internal use only + char* program; + int progsize; + const char* searchstring; +}; + +/** + * Create an empty regular expression. + */ +inline RegularExpression::RegularExpression () +{ + this->program = 0; +} + +/** + * Creates a regular expression from string s, and + * compiles s. + */ +inline RegularExpression::RegularExpression (const char* s) +{ + this->program = 0; + if ( s ) + { + this->compile(s); + } +} + +/** + * Destroys and frees space allocated for the regular expression. + */ +inline RegularExpression::~RegularExpression () +{ +//#ifndef WIN32 + delete [] this->program; +//#endif +} + +/** + * Set the start position for the regular expression. + */ +inline kwsys_stl::string::size_type RegularExpression::start () const +{ + return static_cast( + this->startp[0] - searchstring); +} + + +/** + * Returns the start/end index of the last item found. + */ +inline kwsys_stl::string::size_type RegularExpression::end () const +{ + return static_cast( + this->endp[0] - searchstring); +} + +/** + * Returns true if two regular expressions have different + * compiled program for pattern matching. + */ +inline bool RegularExpression::operator!= (const RegularExpression& r) const +{ + return(!(*this == r)); +} + +/** + * Returns true if a valid regular expression is compiled + * and ready for pattern matching. + */ +inline bool RegularExpression::is_valid () const +{ + return (this->program != 0); +} + + +inline void RegularExpression::set_invalid () +{ +//#ifndef WIN32 + delete [] this->program; +//#endif + this->program = 0; +} + +/** + * Return start index of nth submatch. start(0) is the start of the full match. + */ +inline kwsys_stl::string::size_type RegularExpression::start(int n) const +{ + return static_cast( + this->startp[n] - searchstring); +} + + +/** + * Return end index of nth submatch. end(0) is the end of the full match. + */ +inline kwsys_stl::string::size_type RegularExpression::end(int n) const +{ + return static_cast( + this->endp[n] - searchstring); +} + +/** + * Return nth submatch as a string. + */ +inline kwsys_stl::string RegularExpression::match(int n) const +{ + if (this->startp[n]==0) + { + return kwsys_stl::string(""); + } + else + { + return kwsys_stl::string(this->startp[n], + static_cast( + this->endp[n] - this->startp[n])); + } +} + +} // namespace cmsys + +/* Undefine temporary macro. */ +#if !defined (KWSYS_NAMESPACE) && !cmsys_NAME_IS_KWSYS +# undef kwsys_stl +#endif + +#endif diff --git a/VMSbuild/cmsys/String.h b/VMSbuild/cmsys/String.h new file mode 100644 index 000000000..dd981a6cb --- /dev/null +++ b/VMSbuild/cmsys/String.h @@ -0,0 +1,69 @@ +/*========================================================================= + + Program: KWSys - Kitware System Library + Module: $RCSfile$ + + Copyright (c) Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmsys_String_h +#define cmsys_String_h + +#include + +#include /* size_t */ + +/* Redefine all public interface symbol names to be in the proper + namespace. These macros are used internally to kwsys only, and are + not visible to user code. Use kwsysHeaderDump.pl to reproduce + these macros after making changes to the interface. */ +#if !defined(KWSYS_NAMESPACE) +# define kwsys_ns(x) cmsys##x +# define kwsysEXPORT cmsys_EXPORT +#endif +#if !cmsys_NAME_IS_KWSYS +# define kwsysString_strcasecmp kwsys_ns(String_strcasecmp) +# define kwsysString_strncasecmp kwsys_ns(String_strncasecmp) +#endif + +#if defined(__cplusplus) +extern "C" +{ +#endif + +/** + * Compare two strings ignoring the case of the characters. The + * integer returned is negative, zero, or positive if the first string + * is found to be less than, equal to, or greater than the second + * string, respectively. + */ +kwsysEXPORT int kwsysString_strcasecmp(const char* lhs, const char* rhs); + +/** + * Identical to String_strcasecmp except that only the first n + * characters are considered. + */ +kwsysEXPORT int kwsysString_strncasecmp(const char* lhs, const char* rhs, + size_t n); + +#if defined(__cplusplus) +} /* extern "C" */ +#endif + +/* If we are building a kwsys .c or .cxx file, let it use these macros. + Otherwise, undefine them to keep the namespace clean. */ +#if !defined(KWSYS_NAMESPACE) +# undef kwsys_ns +# undef kwsysEXPORT +# if !cmsys_NAME_IS_KWSYS +# undef kwsysString_strcasecmp +# undef kwsysString_strncasecmp +# endif +#endif + +#endif diff --git a/VMSbuild/cmsys/String.hxx b/VMSbuild/cmsys/String.hxx new file mode 100644 index 000000000..39d4c70fe --- /dev/null +++ b/VMSbuild/cmsys/String.hxx @@ -0,0 +1,67 @@ +/*========================================================================= + + Program: KWSys - Kitware System Library + Module: $RCSfile$ + + Copyright (c) Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmsys_String_hxx +#define cmsys_String_hxx + +#include + +namespace cmsys +{ + +/** \class String + * \brief Short-name version of the STL basic_string class template. + * + * The standard library "string" type is actually a typedef for + * "basic_string<..long argument list..>". This string class is + * simply a subclass of this type with the same interface so that the + * name is shorter in debugging symbols and error messages. + */ +class cmsys_EXPORT String: public cmsys_stl::string +{ + /** The original string type. */ + typedef cmsys_stl::string stl_string; + +public: + + /** String member types. */ + typedef stl_string::value_type value_type; + typedef stl_string::pointer pointer; + typedef stl_string::reference reference; + typedef stl_string::const_reference const_reference; + typedef stl_string::size_type size_type; + typedef stl_string::difference_type difference_type; + typedef stl_string::iterator iterator; + typedef stl_string::const_iterator const_iterator; + typedef stl_string::reverse_iterator reverse_iterator; + typedef stl_string::const_reverse_iterator const_reverse_iterator; + + /** String constructors. */ + String(): stl_string() {} + String(const value_type* s): stl_string(s) {} + String(const value_type* s, size_type n): stl_string(s, n) {} + String(const stl_string& s, size_type pos=0, size_type n=npos): + stl_string(s, pos, n) {} +}; // End Class: String + +#if defined(__WATCOMC__) +inline bool operator<(String const& l, String const& r) + { + return (static_cast(l) < + static_cast(r)); + } +#endif + +} // namespace cmsys + +#endif diff --git a/VMSbuild/cmsys/System.h b/VMSbuild/cmsys/System.h new file mode 100644 index 000000000..a41b6cc33 --- /dev/null +++ b/VMSbuild/cmsys/System.h @@ -0,0 +1,141 @@ +/*========================================================================= + + Program: KWSys - Kitware System Library + Module: $RCSfile$ + + Copyright (c) Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmsys_System_h +#define cmsys_System_h + +#include + +/* Redefine all public interface symbol names to be in the proper + namespace. These macros are used internally to kwsys only, and are + not visible to user code. Use kwsysHeaderDump.pl to reproduce + these macros after making changes to the interface. */ +#if !defined(KWSYS_NAMESPACE) +# define kwsys_ns(x) cmsys##x +# define kwsysEXPORT cmsys_EXPORT +#endif +#if !cmsys_NAME_IS_KWSYS +# define kwsysSystem_Shell_GetArgumentForWindows kwsys_ns(System_Shell_GetArgumentForWindows) +# define kwsysSystem_Shell_GetArgumentForUnix kwsys_ns(System_Shell_GetArgumentForUnix) +# define kwsysSystem_Shell_GetArgumentSizeForWindows kwsys_ns(System_Shell_GetArgumentSizeForWindows) +# define kwsysSystem_Shell_GetArgumentSizeForUnix kwsys_ns(System_Shell_GetArgumentSizeForUnix) +# define kwsysSystem_Shell_Flag_e kwsys_ns(System_Shell_Flag_e) +# define kwsysSystem_Shell_Flag_Make kwsys_ns(System_Shell_Flag_Make) +# define kwsysSystem_Shell_Flag_VSIDE kwsys_ns(System_Shell_Flag_VSIDE) +# define kwsysSystem_Shell_Flag_EchoWindows kwsys_ns(System_Shell_Flag_EchoWindows) +# define kwsysSystem_Shell_Flag_WatcomWMake kwsys_ns(System_Shell_Flag_WatcomWMake) +# define kwsysSystem_Shell_Flag_MinGWMake kwsys_ns(System_Shell_Flag_MinGWMake) +# define kwsysSystem_Shell_Flag_NMake kwsys_ns(System_Shell_Flag_NMake) +# define kwsysSystem_Shell_Flag_AllowMakeVariables kwsys_ns(System_Shell_Flag_AllowMakeVariables) +#endif + +#ifdef __VMS +#define cmsysSystem_Shell_GetArgumentForUnix \ + cmsysSystem_Shell_UnixGA +#define cmsysSystem_Shell_GetArgumentSizeForUnix \ + cmsysSystem_Shell_UnixGAS +#define cmsysSystem_Shell_GetArgumentForWindows \ + cmsysSystem_Shell_WindowsGA +#endif + +#if defined(__cplusplus) +extern "C" +{ +#endif + +/** + * Transform the given command line argument for use in a Windows or + * Unix shell. Returns a pointer to the end of the command line + * argument in the provided output buffer. Flags may be passed to + * modify the generated quoting and escape sequences to work under + * alternative environments. + */ +kwsysEXPORT char* kwsysSystem_Shell_GetArgumentForWindows(const char* in, + char* out, + int flags); +kwsysEXPORT char* kwsysSystem_Shell_GetArgumentForUnix(const char* in, + char* out, + int flags); + +/** + * Compute the size of the buffer required to store the output from + * kwsysSystem_Shell_GetArgumentForWindows or + * kwsysSystem_Shell_GetArgumentForUnix. The flags passed must be + * identical between the two calls. + */ +kwsysEXPORT int kwsysSystem_Shell_GetArgumentSizeForWindows(const char* in, + int flags); +kwsysEXPORT int kwsysSystem_Shell_GetArgumentSizeForUnix(const char* in, + int flags); + +/** + * Flags to pass to kwsysSystem_Shell_GetArgumentForWindows or + * kwsysSystem_Shell_GetArgumentForUnix. These modify the generated + * quoting and escape sequences to work under alternative + * environments. + */ +enum kwsysSystem_Shell_Flag_e +{ + /** The target shell is in a makefile. */ + kwsysSystem_Shell_Flag_Make = (1<<0), + + /** The target shell is in a VS project file. Do not use with + Shell_Flag_Make. */ + kwsysSystem_Shell_Flag_VSIDE = (1<<1), + + /** In a windows shell the argument is being passed to "echo". */ + kwsysSystem_Shell_Flag_EchoWindows = (1<<2), + + /** The target shell is in a Watcom WMake makefile. */ + kwsysSystem_Shell_Flag_WatcomWMake = (1<<3), + + /** The target shell is in a MinGW Make makefile. */ + kwsysSystem_Shell_Flag_MinGWMake = (1<<4), + + /** The target shell is in a NMake makefile. */ + kwsysSystem_Shell_Flag_NMake = (1<<6), + + /** Make variable reference syntax $(MAKEVAR) should not be escaped + to allow a build tool to replace it. Replacement values + containing spaces, quotes, backslashes, or other + non-alphanumeric characters that have significance to some makes + or shells produce undefined behavior. */ + kwsysSystem_Shell_Flag_AllowMakeVariables = (1<<5) +}; + +#if defined(__cplusplus) +} /* extern "C" */ +#endif + +/* If we are building a kwsys .c or .cxx file, let it use these macros. + Otherwise, undefine them to keep the namespace clean. */ +#if !defined(KWSYS_NAMESPACE) +# undef kwsys_ns +# undef kwsysEXPORT +# if !defined(KWSYS_NAMESPACE) && !cmsys_NAME_IS_KWSYS +# undef kwsysSystem_Shell_GetArgumentForWindows +# undef kwsysSystem_Shell_GetArgumentForUnix +# undef kwsysSystem_Shell_GetArgumentSizeForWindows +# undef kwsysSystem_Shell_GetArgumentSizeForUnix +# undef kwsysSystem_Shell_Flag_e +# undef kwsysSystem_Shell_Flag_Make +# undef kwsysSystem_Shell_Flag_VSIDE +# undef kwsysSystem_Shell_Flag_EchoWindows +# undef kwsysSystem_Shell_Flag_WatcomWMake +# undef kwsysSystem_Shell_Flag_MinGWMake +# undef kwsysSystem_Shell_Flag_NMake +# undef kwsysSystem_Shell_Flag_AllowMakeVariables +# endif +#endif + +#endif diff --git a/VMSbuild/cmsys/SystemTools.hxx b/VMSbuild/cmsys/SystemTools.hxx new file mode 100644 index 000000000..8c450e662 --- /dev/null +++ b/VMSbuild/cmsys/SystemTools.hxx @@ -0,0 +1,900 @@ +/*========================================================================= + + Program: KWSys - Kitware System Library + Module: $RCSfile$ + + Copyright (c) Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmsys_SystemTools_hxx +#define cmsys_SystemTools_hxx + +#include +#include +#include +#include + +#include +#include + +#include + +// Required for va_list +#include +#if cmsys_STL_HAVE_STD && !defined(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 +namespace cmsys_VA_LIST +{ + using namespace std; + typedef va_list hack_va_list; +} +namespace cmsys +{ + typedef cmsys_VA_LIST::hack_va_list va_list; +} +#endif // va_list + +#if defined( _MSC_VER ) +typedef unsigned short mode_t; +#endif + +/* Define these macros temporarily to keep the code readable. */ +#if !defined (KWSYS_NAMESPACE) && !cmsys_NAME_IS_KWSYS +# define kwsys_stl cmsys_stl +# define kwsys_ios cmsys_ios +#endif + +namespace cmsys +{ + +class SystemToolsTranslationMap; +/** \class SystemToolsManager + * \brief Use to make sure SystemTools is initialized before it is used + * and is the last static object destroyed + */ +class cmsys_EXPORT SystemToolsManager +{ +public: + SystemToolsManager(); + ~SystemToolsManager(); +}; + +// This instance will show up in any translation unit that uses +// SystemTools. It will make sure SystemTools is initialized +// before it is used and is the last static object destroyed. +static SystemToolsManager SystemToolsManagerInstance; + +/** \class SystemTools + * \brief A collection of useful platform-independent system functions. + */ +class cmsys_EXPORT SystemTools +{ +public: + + /** ----------------------------------------------------------------- + * String Manipulation Routines + * ----------------------------------------------------------------- + */ + + /** + * Replace symbols in str that are not valid in C identifiers as + * defined by the 1999 standard, ie. anything except [A-Za-z0-9_]. + * They are replaced with `_' and if the first character is a digit + * then an underscore is prepended. Note that this can produce + * identifiers that the standard reserves (_[A-Z].* and __.*). + */ + static kwsys_stl::string MakeCindentifier(const char* s); + + /** + * Replace replace all occurences of the string in the source string. + */ + static void ReplaceString(kwsys_stl::string& source, + const char* replace, + const char* with); + + /** + * Return a capitalized string (i.e the first letter is uppercased, + * all other are lowercased). + */ + static kwsys_stl::string Capitalized(const kwsys_stl::string&); + + /** + * Return a 'capitalized words' string (i.e the first letter of each word + * is uppercased all other are left untouched though). + */ + static kwsys_stl::string CapitalizedWords(const kwsys_stl::string&); + + /** + * Return a 'uncapitalized words' string (i.e the first letter of each word + * is lowercased all other are left untouched though). + */ + static kwsys_stl::string UnCapitalizedWords(const kwsys_stl::string&); + + /** + * Return a lower case string + */ + static kwsys_stl::string LowerCase(const kwsys_stl::string&); + + /** + * Return a lower case string + */ + static kwsys_stl::string UpperCase(const kwsys_stl::string&); + + /** + * Count char in string + */ + static size_t CountChar(const char* str, char c); + + /** + * Remove some characters from a string. + * Return a pointer to the new resulting string (allocated with 'new') + */ + static char* RemoveChars(const char* str, const char *toremove); + + /** + * Remove remove all but 0->9, A->F characters from a string. + * Return a pointer to the new resulting string (allocated with 'new') + */ + static char* RemoveCharsButUpperHex(const char* str); + + /** + * Replace some characters by another character in a string (in-place) + * Return a pointer to string + */ + static char* ReplaceChars(char* str, const char *toreplace,char replacement); + + /** + * Returns true if str1 starts (respectively ends) with str2 + */ + static bool StringStartsWith(const char* str1, const char* str2); + static bool StringEndsWith(const char* str1, const char* str2); + + /** + * Returns a pointer to the last occurence of str2 in str1 + */ + static const char* FindLastString(const char* str1, const char* str2); + + /** + * Make a duplicate of the string similar to the strdup C function + * but use new to create the 'new' string, so one can use + * 'delete' to remove it. Returns 0 if the input is empty. + */ + static char* DuplicateString(const char* str); + + /** + * Return the string cropped to a given length by removing chars in the + * center of the string and replacing them with an ellipsis (...) + */ + static kwsys_stl::string CropString(const kwsys_stl::string&,size_t max_len); + + /** split a path by separator into an array of strings, default is /. + If isPath is true then the string is treated like a path and if + s starts with a / then the first element of the returned array will + be /, so /foo/bar will be [/, foo, bar] + */ + static kwsys_stl::vector SplitString(const char* s, char separator = '/', + bool isPath = false); + /** + * Perform a case-independent string comparison + */ + static int Strucmp(const char *s1, const char *s2); + + /** + * Convert a string in __DATE__ or __TIMESTAMP__ format into a time_t. + * Return false on error, true on success + */ + static bool ConvertDateMacroString(const char *str, time_t *tmt); + static bool ConvertTimeStampMacroString(const char *str, time_t *tmt); + + /** + * Split a string on its newlines into multiple lines + * Return false only if the last line stored had no newline + */ + static bool Split(const char* s, kwsys_stl::vector& l); + static bool Split(const char* s, kwsys_stl::vector& l, char separator); + + /** + * Return string with space added between capitalized words + * (i.e. EatMyShorts becomes Eat My Shorts ) + * (note that IEatShorts becomes IEat Shorts) + */ + static kwsys_stl::string AddSpaceBetweenCapitalizedWords( + const kwsys_stl::string&); + + /** + * Append two or more strings and produce new one. + * Programmer must 'delete []' the resulting string, which was allocated + * with 'new'. + * Return 0 if inputs are empty or there was an error + */ + static char* AppendStrings( + const char* str1, const char* str2); + static char* AppendStrings( + const char* str1, const char* str2, const char* str3); + + /** + * Estimate the length of the string that will be produced + * from printing the given format string and arguments. The + * returned length will always be at least as large as the string + * that will result from printing. + * WARNING: since va_arg is called to iterate of the argument list, + * you will not be able to use this 'ap' anymore from the beginning. + * It's up to you to call va_end though. + */ + static int EstimateFormatLength(const char *format, va_list ap); + + /** + * Escape specific characters in 'str'. + */ + static kwsys_stl::string EscapeChars( + const char *str, const char *chars_to_escape, char escape_char = '\\'); + + /** ----------------------------------------------------------------- + * Filename Manipulation Routines + * ----------------------------------------------------------------- + */ + + /** + * Replace Windows file system slashes with Unix-style slashes. + */ + static void ConvertToUnixSlashes(kwsys_stl::string& path); + + /** + * For windows this calls ConvertToWindowsOutputPath and for unix + * it calls ConvertToUnixOutputPath + */ + static kwsys_stl::string ConvertToOutputPath(const char*); + + /** + * Convert the path to a string that can be used in a unix makefile. + * double slashes are removed, and spaces are escaped. + */ + static kwsys_stl::string ConvertToUnixOutputPath(const char*); + + /** + * Convert the path to string that can be used in a windows project or + * makefile. Double slashes are removed if they are not at the start of + * the string, the slashes are converted to windows style backslashes, and + * if there are spaces in the string it is double quoted. + */ + static kwsys_stl::string ConvertToWindowsOutputPath(const char*); + + /** + * Return true if a file exists in the current directory. + * If isFile = true, then make sure the file is a file and + * not a directory. If isFile = false, then return true + * if it is a file or a directory. + */ + static bool FileExists(const char* filename, bool isFile=false); + + /** + * Return file length + */ + static unsigned long FileLength(const char *filename); + + /** + Change the modification time or create a file + */ + static bool Touch(const char* filename, bool create); + + /** + * Compare file modification times. + * Return true for successful comparison and false for error. + * When true is returned, result has -1, 0, +1 for + * f1 older, same, or newer than f2. + */ + static bool FileTimeCompare(const char* f1, const char* f2, + int* result); + + /** + * Get the file extension (including ".") needed for an executable + * on the current platform ("" for unix, ".exe" for Windows). + */ + static const char* GetExecutableExtension(); + + /** + * Given a path that exists on a windows machine, return the + * actuall case of the path as it was created. If the file + * does not exist path is returned unchanged. This does nothing + * on unix but return path. + */ + static kwsys_stl::string GetActualCaseForPath(const char* path); + + /** + * Given the path to a program executable, get the directory part of + * the path with the file stripped off. If there is no directory + * part, the empty string is returned. + */ + static kwsys_stl::string GetProgramPath(const char*); + static bool SplitProgramPath(const char* in_name, + kwsys_stl::string& dir, + kwsys_stl::string& file, + bool errorReport = true); + + /** + * Given argv[0] for a unix program find the full path to a running + * executable. argv0 can be null for windows WinMain programs + * in this case GetModuleFileName will be used to find the path + * to the running executable. If argv0 is not a full path, + * then this will try to find the full path. If the path is not + * found false is returned, if found true is returned. An error + * message of the attempted paths is stored in errorMsg. + * exeName is the name of the executable. + * buildDir is a possibly null path to the build directory. + * installPrefix is a possibly null pointer to the install directory. + */ + static bool FindProgramPath(const char* argv0, + kwsys_stl::string& pathOut, + kwsys_stl::string& errorMsg, + const char* exeName = 0, + const char* buildDir = 0, + const char* installPrefix = 0); + + /** + * Given a path to a file or directory, convert it to a full path. + * This collapses away relative paths relative to the cwd argument + * (which defaults to the current working directory). The full path + * is returned. + */ + static kwsys_stl::string CollapseFullPath(const char* in_relative); + static kwsys_stl::string CollapseFullPath(const char* in_relative, + const char* in_base); + + /** + * Get the real path for a given path, removing all symlinks. In + * the event of an error (non-existent path, permissions issue, + * etc.) the original path is returned. + */ + static kwsys_stl::string GetRealPath(const char* path); + + /** + * Split a path name into its root component and the rest of the + * path. The root component is one of the following: + * "/" = UNIX full path + * "c:/" = Windows full path (can be any drive letter) + * "c:" = Windows drive-letter relative path (can be any drive letter) + * "//" = Network path + * "~" = Home path for current user + * "~u" = Home path for user 'u' + * "" = Relative path + * + * A pointer to the rest of the path after the root component is + * returned. The root component is stored in the "root" string if + * given. + */ + static const char* SplitPathRootComponent(const char* p, + kwsys_stl::string* root=0); + + /** + * Split a path name into its basic components. The first component + * is one of the roots returned by SplitPathRootComponent. + * The remaining components form the path. If there is a trailing + * slash then the last component is the empty string. The + * components can be recombined as "c[0]c[1]/c[2]/.../c[n]" to + * produce the original path. Home directory references are + * automatically expanded if expand_home_dir is true and this + * platform supports them. + */ + static void SplitPath(const char* p, + kwsys_stl::vector& components, + bool expand_home_dir = true); + + /** + * Join components of a path name into a single string. See + * SplitPath for the format of the components. + */ + static kwsys_stl::string JoinPath( + const kwsys_stl::vector& components); + static kwsys_stl::string JoinPath( + kwsys_stl::vector::const_iterator first, + kwsys_stl::vector::const_iterator last); + + /** + * Compare a path or components of a path. + */ + static bool ComparePath(const char* c1, const char* c2); + + + /** + * Return path of a full filename (no trailing slashes) + */ + static kwsys_stl::string GetFilenamePath(const kwsys_stl::string&); + + /** + * Return file name of a full filename (i.e. file name without path) + */ + static kwsys_stl::string GetFilenameName(const kwsys_stl::string&); + + /** + * Split a program from its arguments and handle spaces in the paths + */ + static void SplitProgramFromArgs( + const char* path, + kwsys_stl::string& program, kwsys_stl::string& args); + + /** + * Return longest file extension of a full filename (dot included) + */ + static kwsys_stl::string GetFilenameExtension(const kwsys_stl::string&); + + /** + * Return shortest file extension of a full filename (dot included) + */ + static kwsys_stl::string GetFilenameLastExtension( + const kwsys_stl::string& filename); + + /** + * Return file name without extension of a full filename + */ + static kwsys_stl::string GetFilenameWithoutExtension( + const kwsys_stl::string&); + + /** + * Return file name without its last (shortest) extension + */ + static kwsys_stl::string GetFilenameWithoutLastExtension( + const kwsys_stl::string&); + + /** + * Return whether the path represents a full path (not relative) + */ + static bool FileIsFullPath(const char*); + + /** + * For windows return the short path for the given path, + * Unix just a pass through + */ + static bool GetShortPath(const char* path, kwsys_stl::string& result); + + /** + * Read line from file. Make sure to get everything. Due to a buggy stream + * library on the HP and another on Mac OS X, we need this very carefully + * written version of getline. Returns true if any data were read before the + * end-of-file was reached. If the has_newline argument is specified, it will + * be true when the line read had a newline character. + */ + static bool GetLineFromStream(kwsys_ios::istream& istr, + kwsys_stl::string& line, + bool* has_newline=0, + long sizeLimit=-1); + + /** + * Get the parent directory of the directory or file + */ + static kwsys_stl::string GetParentDirectory(const char* fileOrDir); + + /** + * Check if the given file or directory is in subdirectory of dir + */ + static bool IsSubDirectory(const char* fileOrDir, const char* dir); + + /** ----------------------------------------------------------------- + * File Manipulation Routines + * ----------------------------------------------------------------- + */ + + /** + * Make a new directory if it is not there. This function + * can make a full path even if none of the directories existed + * prior to calling this function. + */ + static bool MakeDirectory(const char* path); + + /** + * Copy the source file to the destination file only + * if the two files differ. If the "copyPermissions" + * argument is true, the permissions of the copy are + * set to be the same as the permissions of the + * original. + */ + static bool CopyFileIfDifferent(const char* source, + const char* destination, + bool copyPermissions = true); + + /** + * Compare the contents of two files. Return true if different + */ + static bool FilesDiffer(const char* source, const char* destination); + + /** + * Return true if the two files are the same file + */ + static bool SameFile(const char* file1, const char* file2); + + /** + * Copy a file. If the "copyPermissions" argument is true, the + * permissions of the copy are set to be the same as the permissions + * of the original. + */ + static bool CopyFileAlways(const char* source, const char* destination, + bool copyPermissions = true); + + /** + * Copy a file. If the "always" argument is true the file is always + * copied. If it is false, the file is copied only if it is new or + * has changed. If the "copyPermissions" argument is true, the + * permissions of the copy are set to be the same as the permissions + * of the original. + */ + static bool CopyAFile(const char* source, const char* destination, + bool always = true, bool copyPermissions = true); + + /** + * Copy content directory to another directory with all files and + * subdirectories. If the "always" argument is true all files are + * always copied. If it is false, only files that have changed or + * are new are copied. + */ + static bool CopyADirectory(const char* source, const char* destination, + bool always = true, bool copyPermissions = true); + + /** + * Remove a file + */ + static bool RemoveFile(const char* source); + + /** + * Remove a directory + */ + static bool RemoveADirectory(const char* source); + + /** + * Get the maximum full file path length + */ + static size_t GetMaximumFilePathLength(); + + /** + * Find a file in the system PATH, with optional extra paths + */ + static kwsys_stl::string FindFile( + const char* name, + const kwsys_stl::vector& path = + kwsys_stl::vector(), + bool no_system_path = false); + + /** + * Find a directory in the system PATH, with optional extra paths + */ + static kwsys_stl::string FindDirectory( + const char* name, + const kwsys_stl::vector& path = + kwsys_stl::vector(), + bool no_system_path = false); + + /** + * Find an executable in the system PATH, with optional extra paths + */ + static kwsys_stl::string FindProgram( + const char* name, + const kwsys_stl::vector& path = + kwsys_stl::vector(), + bool no_system_path = false); + static kwsys_stl::string FindProgram( + const kwsys_stl::vector& names, + const kwsys_stl::vector& path = + kwsys_stl::vector(), + bool no_system_path = false); + + /** + * Find a library in the system PATH, with optional extra paths + */ + static kwsys_stl::string FindLibrary( + const char* name, + const kwsys_stl::vector& path); + + /** + * Return true if the file is a directory + */ + static bool FileIsDirectory(const char* name); + + /** + * Return true if the file is a symlink + */ + static bool FileIsSymlink(const char* name); + + /** + * Return true if the file has a given signature (first set of bytes) + */ + static bool FileHasSignature( + const char* filename, const char *signature, long offset = 0); + + /** + * Attempt to detect and return the type of a file. + * Up to 'length' bytes are read from the file, if more than 'percent_bin' % + * of the bytes are non-textual elements, the file is considered binary, + * otherwise textual. Textual elements are bytes in the ASCII [0x20, 0x7E] + * range, but also \n, \r, \t. + * The algorithm is simplistic, and should probably check for usual file + * extensions, 'magic' signature, unicode, etc. + */ + enum FileTypeEnum + { + FileTypeUnknown, + FileTypeBinary, + FileTypeText + }; + static SystemTools::FileTypeEnum DetectFileType( + const char* filename, + unsigned long length = 256, + double percent_bin = 0.05); + + /** + * Create a symbolic link if the platform supports it. Returns whether + * creation succeded. + */ + static bool CreateSymlink(const char* origName, const char* newName); + + /** + * Read the contents of a symbolic link. Returns whether reading + * succeded. + */ + static bool ReadSymlink(const char* newName, kwsys_stl::string& origName); + + /** + * Try to locate the file 'filename' in the directory 'dir'. + * If 'filename' is a fully qualified filename, the basename of the file is + * used to check for its existence in 'dir'. + * If 'dir' is not a directory, GetFilenamePath() is called on 'dir' to + * get its directory first (thus, you can pass a filename as 'dir', as + * a convenience). + * 'filename_found' is assigned the fully qualified name/path of the file + * if it is found (not touched otherwise). + * If 'try_filename_dirs' is true, try to find the file using the + * components of its path, i.e. if we are looking for c:/foo/bar/bill.txt, + * first look for bill.txt in 'dir', then in 'dir'/bar, then in 'dir'/foo/bar + * etc. + * Return true if the file was found, false otherwise. + */ + static bool LocateFileInDir(const char *filename, + const char *dir, + kwsys_stl::string& filename_found, + int try_filename_dirs = 0); + + /** compute the relative path from local to remote. local must + be a directory. remote can be a file or a directory. + Both remote and local must be full paths. Basically, if + you are in directory local and you want to access the file in remote + what is the relative path to do that. For example: + /a/b/c/d to /a/b/c1/d1 -> ../../c1/d1 + from /usr/src to /usr/src/test/blah/foo.cpp -> test/blah/foo.cpp + */ + static kwsys_stl::string RelativePath(const char* local, const char* remote); + + /** + * Return file's modified time + */ + static long int ModifiedTime(const char* filename); + + /** + * Return file's creation time (Win32: works only for NTFS, not FAT) + */ + static long int CreationTime(const char* filename); + + /** + * Get and set permissions of the file. + */ + static bool GetPermissions(const char* file, mode_t& mode); + static bool SetPermissions(const char* file, mode_t mode); + + /** ----------------------------------------------------------------- + * Time Manipulation Routines + * ----------------------------------------------------------------- + */ + + /** + * Get current time as a double. On certain platforms this will + * return higher resolution than seconds: + * (1) gettimeofday() -- resolution in microseconds + * (2) ftime() -- resolution in milliseconds + * (3) time() -- resolution in seconds + */ + static double GetTime(); + + /** + * Get current date/time + */ + static kwsys_stl::string GetCurrentDateTime(const char* format); + + /** ----------------------------------------------------------------- + * Registry Manipulation Routines + * ----------------------------------------------------------------- + */ + + /** + * Specify access to the 32-bit or 64-bit application view of + * registry values. The default is to match the currently running + * binary type. + */ + enum KeyWOW64 { KeyWOW64_Default, KeyWOW64_32, KeyWOW64_64 }; + + /** + * Read a registry value + */ + static bool ReadRegistryValue(const char *key, kwsys_stl::string &value, + KeyWOW64 view = KeyWOW64_Default); + + /** + * Write a registry value + */ + static bool WriteRegistryValue(const char *key, const char *value, + KeyWOW64 view = KeyWOW64_Default); + + /** + * Delete a registry value + */ + static bool DeleteRegistryValue(const char *key, + KeyWOW64 view = KeyWOW64_Default); + + /** ----------------------------------------------------------------- + * Environment Manipulation Routines + * ----------------------------------------------------------------- + */ + + /** + * Add the paths from the environment variable PATH to the + * string vector passed in. If env is set then the value + * of env will be used instead of PATH. + */ + static void GetPath(kwsys_stl::vector& path, + const char* env=0); + + /** + * Read an environment variable + */ + static const char* GetEnv(const char* key); + static bool GetEnv(const char* key, kwsys_stl::string& result); + + /** + * Get current working directory CWD + */ + static kwsys_stl::string GetCurrentWorkingDirectory(bool collapse =true); + + /** + * Change directory the the directory specified + */ + static int ChangeDirectory(const char* dir); + + /** + * Get the result of strerror(errno) + */ + static kwsys_stl::string GetLastSystemError(); + + /** + * When building DEBUG with MSVC, this enables a hook that prevents + * error dialogs from popping up if the program is being run from + * DART. + */ + static void EnableMSVCDebugHook(); + + /** + * Get the width of the terminal window. The code may or may not work, so + * make sure you have some resonable defaults prepared if the code returns + * some bogus size. + */ + static int GetTerminalWidth(); + + /** + * Add an entry in the path translation table. + */ + static void AddTranslationPath(const char * dir, const char * refdir); + + /** + * If dir is different after CollapseFullPath is called, + * Then insert it into the path translation table + */ + static void AddKeepPath(const char* dir); + + /** + * Update path by going through the Path Translation table; + */ + static void CheckTranslationPath(kwsys_stl::string & path); + + /** + * Delay the execution for a specified amount of time specified + * in miliseconds + */ + static void Delay(unsigned int msec); + + /** + * Get the operating system name and version + * This is implemented for Win32 only for the moment + */ + static kwsys_stl::string GetOperatingSystemNameAndVersion(); + + /** + * Convert windows-style arguments given as a command-line string + * into more traditional argc/argv arguments. + * Note that argv[0] will be assigned the executable name using + * the ::GetModuleFileName function. + */ + static void ConvertWindowsCommandLineToUnixArguments( + const char *cmd_line, int *argc, char ***argv); + + /** ----------------------------------------------------------------- + * URL Manipulation Routines + * ----------------------------------------------------------------- + */ + + /** + * Parse a character string : + * protocol://dataglom + * and fill protocol as appropriate. + * Return false if the URL does not have the required form, true otherwise. + */ + static bool ParseURLProtocol( const kwsys_stl::string& URL, + kwsys_stl::string& protocol, + kwsys_stl::string& dataglom ); + + /** + * Parse a string (a URL without protocol prefix) with the form: + * protocol://[[username[':'password]'@']hostname[':'dataport]]'/'[datapath] + * and fill protocol, username, password, hostname, dataport, and datapath + * when values are found. + * Return true if the string matches the format; false otherwise. + */ + static bool ParseURL( const kwsys_stl::string& URL, + kwsys_stl::string& protocol, + kwsys_stl::string& username, + kwsys_stl::string& password, + kwsys_stl::string& hostname, + kwsys_stl::string& dataport, + kwsys_stl::string& datapath ); + +private: + /** + * Allocate the stl map that serve as the Path Translation table. + */ + static void ClassInitialize(); + + /** + * Deallocate the stl map that serve as the Path Translation table. + */ + static void ClassFinalize(); + + /** + * This method prevents warning on SGI + */ + SystemToolsManager* GetSystemToolsManager() + { + return &SystemToolsManagerInstance; + } + + /** + * Find a filename (file or directory) in the system PATH, with + * optional extra paths. + */ + static kwsys_stl::string FindName( + const char* name, + const kwsys_stl::vector& path = + kwsys_stl::vector(), + bool no_system_path = false); + + + /** + * Path translation table from dir to refdir + * Each time 'dir' will be found it will be replace by 'refdir' + */ + static SystemToolsTranslationMap *TranslationMap; + static SystemToolsTranslationMap *LongPathMap; + friend class SystemToolsManager; +}; + +} // namespace cmsys + +/* Undefine temporary macros. */ +#if !defined (KWSYS_NAMESPACE) && !cmsys_NAME_IS_KWSYS +# undef kwsys_stl +# undef kwsys_ios +#endif + +#endif diff --git a/VMSbuild/cmsys/auto_ptr.hxx b/VMSbuild/cmsys/auto_ptr.hxx new file mode 100644 index 000000000..b33d1db87 --- /dev/null +++ b/VMSbuild/cmsys/auto_ptr.hxx @@ -0,0 +1,203 @@ +/*========================================================================= + + Program: KWSys - Kitware System Library + Module: $RCSfile$ + + Copyright (c) Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmsys_auto_ptr_hxx +#define cmsys_auto_ptr_hxx + +#include + +// The HP compiler and VS6 cannot handle the conversions necessary to use +// auto_ptr_ref to pass an auto_ptr returned from one function +// directly to another function as in use_auto_ptr(get_auto_ptr()). +// We instead use const_cast to achieve the syntax on those platforms. +// We do not use const_cast on other platforms to maintain the C++ +// standard design and guarantee that if an auto_ptr is bound +// to a reference-to-const then ownership will be maintained. +#if defined(__HP_aCC) || (defined(_MSC_VER) && _MSC_VER <= 1200) +# define cmsys_AUTO_PTR_REF 0 +# define cmsys_AUTO_PTR_CONST const +# define cmsys_AUTO_PTR_CAST(a) cast(a) +#else +# define cmsys_AUTO_PTR_REF 1 +# define cmsys_AUTO_PTR_CONST +# define cmsys_AUTO_PTR_CAST(a) a +#endif + +namespace cmsys +{ + +template class auto_ptr; + +#if cmsys_AUTO_PTR_REF +namespace detail +{ +// The auto_ptr_ref template is supposed to be a private member of +// auto_ptr but Borland 5.8 cannot handle it. Instead put it in +// a private namespace. +template struct auto_ptr_ref +{ + Y* p_; + + // The extra constructor argument prevents implicit conversion to + // auto_ptr_ref from auto_ptr through the constructor. Normally + // this should be done with the explicit keyword but Borland 5.x + // generates code in the conversion operator to call itself + // infinately. + auto_ptr_ref(Y* p, int): p_(p) {} +}; +} +#endif + +/** C++98 Standard Section 20.4.5 - Template class auto_ptr. */ +template +class auto_ptr +{ +#if !cmsys_AUTO_PTR_REF + template + static inline auto_ptr& cast(auto_ptr const& a) + { return const_cast&>(a); } +#endif + + /** The pointer to the object held. */ + X* x_; + +public: + /** The type of object held by the auto_ptr. */ + typedef X element_type; + + /** Construct from an auto_ptr holding a compatible object. This + transfers ownership to the newly constructed auto_ptr. */ + template + auto_ptr(auto_ptr cmsys_AUTO_PTR_CONST& a) throw(): + x_(cmsys_AUTO_PTR_CAST(a).release()) + { + } + + /** Assign from an auto_ptr holding a compatible object. This + transfers ownership to the left-hand-side of the assignment. */ + template + auto_ptr& operator=(auto_ptr cmsys_AUTO_PTR_CONST& a) throw() + { + this->reset(cmsys_AUTO_PTR_CAST(a).release()); + return *this; + } + + /** + * Explicitly construct from a raw pointer. This is typically + * called with the result of operator new. For example: + * + * auto_ptr ptr(new X()); + */ + explicit auto_ptr(X* p=0) throw(): x_(p) + { + } + + /** Construct from another auto_ptr holding an object of the same + type. This transfers ownership to the newly constructed + auto_ptr. */ + auto_ptr(auto_ptr cmsys_AUTO_PTR_CONST& a) throw(): + x_(cmsys_AUTO_PTR_CAST(a).release()) + { + } + + /** Assign from another auto_ptr holding an object of the same type. + This transfers ownership to the newly constructed auto_ptr. */ + auto_ptr& operator=(auto_ptr cmsys_AUTO_PTR_CONST& a) throw() + { + this->reset(cmsys_AUTO_PTR_CAST(a).release()); + return *this; + } + + /** Destruct and delete the object held. */ + ~auto_ptr() throw() + { + // Assume object destructor is nothrow. + delete this->x_; + } + + /** Dereference and return a reference to the object held. */ + X& operator*() const throw() + { + return *this->x_; + } + + /** Return a pointer to the object held. */ + X* operator->() const throw() + { + return this->x_; + } + + /** Return a pointer to the object held. */ + X* get() const throw() + { + return this->x_; + } + + /** Return a pointer to the object held and reset to hold no object. + This transfers ownership to the caller. */ + X* release() throw() + { + X* x = this->x_; + this->x_ = 0; + return x; + } + + /** Assume ownership of the given object. The object previously + held is deleted. */ + void reset(X* p=0) throw() + { + if(this->x_ != p) + { + // Assume object destructor is nothrow. + delete this->x_; + this->x_ = p; + } + } + + /** Convert to an auto_ptr holding an object of a compatible type. + This transfers ownership to the returned auto_ptr. */ + template operator auto_ptr() throw() + { + return auto_ptr(this->release()); + } + +#if cmsys_AUTO_PTR_REF + /** Construct from an auto_ptr_ref. This is used when the + constructor argument is a call to a function returning an + auto_ptr. */ + auto_ptr(detail::auto_ptr_ref r) throw(): x_(r.p_) + { + } + + /** Assign from an auto_ptr_ref. This is used when a function + returning an auto_ptr is passed on the right-hand-side of an + assignment. */ + auto_ptr& operator=(detail::auto_ptr_ref r) throw() + { + this->reset(r.p_); + return *this; + } + + /** Convert to an auto_ptr_ref. This is used when a function + returning an auto_ptr is the argument to the constructor of + another auto_ptr. */ + template operator detail::auto_ptr_ref() throw() + { + return detail::auto_ptr_ref(this->release(), 1); + } +#endif +}; + +} // namespace cmsys + +#endif diff --git a/VMSbuild/cmsys/ios/fstream b/VMSbuild/cmsys/ios/fstream new file mode 100644 index 000000000..d450da421 --- /dev/null +++ b/VMSbuild/cmsys/ios/fstream @@ -0,0 +1,48 @@ +/*========================================================================= + + Program: KWSys - Kitware System Library + Module: $RCSfile$ + + Copyright (c) Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmsys_ios_fstream +#define cmsys_ios_fstream + +#include + +#ifdef _MSC_VER +# pragma warning (push, 1) +# pragma warning (disable: 4702) +# pragma warning (disable: 4995) /* Old streams are deprecated. */ +#endif + +#if cmsys_IOS_USE_ANSI +# include +#else +# include +#endif + +#if !cmsys_IOS_USE_SSTREAM +namespace cmsys_ios +{ + using cmsys_ios_namespace::ostream; + using cmsys_ios_namespace::istream; + using cmsys_ios_namespace::ofstream; + using cmsys_ios_namespace::ifstream; + using cmsys_ios_namespace::ios; + using cmsys_ios_namespace::endl; + using cmsys_ios_namespace::flush; +} +#endif + +#ifdef _MSC_VER +# pragma warning(pop) +#endif + +#endif diff --git a/VMSbuild/cmsys/ios/iosfwd b/VMSbuild/cmsys/ios/iosfwd new file mode 100644 index 000000000..5730c1f3d --- /dev/null +++ b/VMSbuild/cmsys/ios/iosfwd @@ -0,0 +1,51 @@ +/*========================================================================= + + Program: KWSys - Kitware System Library + Module: $RCSfile$ + + Copyright (c) Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmsys_ios_iosfwd +#define cmsys_ios_iosfwd + +#include + +#ifdef _MSC_VER +#pragma warning (push, 1) +#pragma warning (disable: 4702) +#endif + +#if cmsys_IOS_USE_ANSI +# include +#else +class fstream; +class ifstream; +class ios; +class istream; +class ofstream; +class ostream; +#endif + +#if !cmsys_IOS_USE_SSTREAM +namespace cmsys_ios +{ + using cmsys_ios_namespace::fstream; + using cmsys_ios_namespace::ifstream; + using cmsys_ios_namespace::ios; + using cmsys_ios_namespace::istream; + using cmsys_ios_namespace::ofstream; + using cmsys_ios_namespace::ostream; +} +#endif + +#ifdef _MSC_VER +#pragma warning(pop) +#endif + +#endif diff --git a/VMSbuild/cmsys/ios/iostream b/VMSbuild/cmsys/ios/iostream new file mode 100644 index 000000000..1bbc89b94 --- /dev/null +++ b/VMSbuild/cmsys/ios/iostream @@ -0,0 +1,101 @@ +/*========================================================================= + + Program: KWSys - Kitware System Library + Module: $RCSfile$ + + Copyright (c) Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmsys_ios_iostream +#define cmsys_ios_iostream + +#include + +#ifdef _MSC_VER +# pragma warning (push, 1) +# pragma warning (disable: 4702) +# pragma warning (disable: 4995) /* Old streams are deprecated. */ +#endif + +#if cmsys_IOS_USE_ANSI +# include +#else +# include +#endif + +// The HP implementation of iostream defines cin, cout, cerr, and clog +// as macros in order to do thread-private streams. +// See /opt/aCC/include/iostream/iostream.h for details. +// This block redefines the macros in a safe way that is also compatible +// with the HP definitions and the using declarations below. + +#if !cmsys_IOS_USE_SSTREAM +# if defined(__HP_aCC) && (defined(HP_THREAD_SAFE) || defined(_THREAD_SAFE)) +# if defined(cin) && !defined(cmsys_IOS_HP_HACK_CIN) +# define cmsys_IOS_HP_HACK_CIN +# undef cin +# define cin __tcin.ref() +# endif +# if defined(cout) && !defined(cmsys_IOS_HP_HACK_COUT) +# define cmsys_IOS_HP_HACK_COUT +# undef cout +# define cout __tcout.ref() +# endif +# if defined(cerr) && !defined(cmsys_IOS_HP_HACK_CERR) +# define cmsys_IOS_HP_HACK_CERR +# undef cerr +# define cerr __tcerr.ref() +# endif +# if defined(clog) && !defined(cmsys_IOS_HP_HACK_CLOG) +# define cmsys_IOS_HP_HACK_CLOG +# undef clog +# define clog __tclog.ref() +# endif +# endif +#endif + +// If using our own sstream emulation code, put the standard +// streams in the same namespace. +#if !cmsys_IOS_USE_SSTREAM +namespace cmsys_ios +{ + typedef int streamsize; + typedef int streamoff; + using cmsys_ios_namespace::ostream; + using cmsys_ios_namespace::istream; + using cmsys_ios_namespace::ios; + using cmsys_ios_namespace::endl; + using cmsys_ios_namespace::flush; +# if defined(cmsys_IOS_HP_HACK_CIN) + using cmsys_ios_namespace::__tcin; +# else + using cmsys_ios_namespace::cin; +# endif +# if defined(cmsys_IOS_HP_HACK_COUT) + using cmsys_ios_namespace::__tcout; +# else + using cmsys_ios_namespace::cout; +# endif +# if defined(cmsys_IOS_HP_HACK_CERR) + using cmsys_ios_namespace::__tcerr; +# else + using cmsys_ios_namespace::cerr; +# endif +# if defined(cmsys_IOS_HP_HACK_CLOG) + using cmsys_ios_namespace::__tclog; +# else + using cmsys_ios_namespace::clog; +# endif +} +#endif + +#ifdef _MSC_VER +# pragma warning(pop) +#endif + +#endif diff --git a/VMSbuild/cmsys/ios/sstream b/VMSbuild/cmsys/ios/sstream new file mode 100644 index 000000000..f82c176b2 --- /dev/null +++ b/VMSbuild/cmsys/ios/sstream @@ -0,0 +1,201 @@ +/*========================================================================= + + Program: KWSys - Kitware System Library + Module: $RCSfile$ + + Copyright (c) Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmsys_ios_sstream +#define cmsys_ios_sstream + +#include + +/* Define this macro temporarily to keep the code readable. */ +#if !defined (KWSYS_NAMESPACE) && !cmsys_NAME_IS_KWSYS +# define kwsys_stl cmsys_stl +#endif + +#if cmsys_IOS_USE_SSTREAM +# ifdef _MSC_VER +# pragma warning (push, 1) +# pragma warning (disable: 4702) +# endif +# include +# ifdef _MSC_VER +# pragma warning(pop) +# endif +#else +# ifdef _MSC_VER +# pragma warning (push, 1) +# pragma warning (disable: 4702) +# pragma warning (disable: 4995) /* Old streams are deprecated. */ +# endif +# if cmsys_IOS_USE_ANSI +# include +# elif cmsys_IOS_USE_STRSTREAM_H +# include +# elif cmsys_IOS_USE_STRSTREA_H +# include +# endif +# if cmsys_IOS_USE_ANSI +# include // Need placement operator new. +# else +# include // Need placement operator new. +# endif +# ifdef _MSC_VER +# pragma warning(pop) +# endif + +// Only have old std strstream classes. Wrap them to look like new +// ostringstream and istringstream classes. + +# include + +namespace cmsys_ios +{ +using cmsys_ios_namespace::streambuf; +using cmsys_ios_namespace::ostream; +using cmsys_ios_namespace::istream; +using cmsys_ios_namespace::strstream; +using cmsys_ios_namespace::istrstream; +using cmsys_ios_namespace::ostrstream; +using cmsys_ios_namespace::ios; +using cmsys_ios_namespace::endl; +using cmsys_ios_namespace::ends; +using cmsys_ios_namespace::flush; + +class stringstream_cleanup +{ +public: + stringstream_cleanup(strstream& str): m_StrStream(str) {} + ~stringstream_cleanup() { m_StrStream.rdbuf()->freeze(0); } + static void IgnoreUnusedVariable(const stringstream_cleanup&) {} +protected: + strstream& m_StrStream; +private: + void operator=(stringstream_cleanup const&); +}; + +class stringstream: public strstream +{ +public: + typedef strstream Superclass; + stringstream() {} + stringstream(const kwsys_stl::string& s) { *this << s.c_str(); } + kwsys_stl::string str() + { + stringstream_cleanup cleanup(*this); + stringstream_cleanup::IgnoreUnusedVariable(cleanup); +// Visual Studio 6 has a strstream::pcount, but this is not rdbuf()->pcount() +#if (cmsys_IOS_USE_STRSTREA_H) && defined(_MSC_VER) && (_MSC_VER == 1200) + int count = this->pcount(); +#elif defined(__WATCOMC__) + int count = this->rdbuf()->out_waiting(); +#else + int count = this->rdbuf()->pcount(); +#endif + const char* ptr = this->Superclass::str(); + return kwsys_stl::string(ptr?ptr:"", count); + } + void str(const kwsys_stl::string& s) + { + this->~stringstream(); + new (this) stringstream(s); + } +private: + stringstream(const stringstream&); + void operator=(const stringstream&); +}; + +class ostringstream_cleanup +{ +public: + ostringstream_cleanup(ostrstream& ostr): m_OStrStream(ostr) {} + ~ostringstream_cleanup() { m_OStrStream.rdbuf()->freeze(0); } + static void IgnoreUnusedVariable(const ostringstream_cleanup&) {} +protected: + ostrstream& m_OStrStream; +private: + void operator=(ostringstream_cleanup const&); +}; + +class ostringstream: public ostrstream +{ +public: + typedef ostrstream Superclass; + ostringstream() {} + ostringstream(const kwsys_stl::string& s) { *this << s.c_str(); } + kwsys_stl::string str() + { + ostringstream_cleanup cleanup(*this); + ostringstream_cleanup::IgnoreUnusedVariable(cleanup); + int count = this->pcount(); + const char* ptr = this->Superclass::str(); + return kwsys_stl::string(ptr?ptr:"", count); + } + void str(const kwsys_stl::string& s) + { + this->~ostringstream(); + new (this) ostringstream(s); + } +private: + ostringstream(const ostringstream&); + void operator=(const ostringstream&); +}; + +#if defined(_MSC_VER) +# pragma warning (push) +# pragma warning (disable: 4097) /* typedef-name used as synonym for class */ +#endif +#if defined(__WATCOMC__) +// W728: class modifiers for 'A' conflict with class modifiers for 'B' +# pragma warning 728 10 +#endif + +class istringstream: private kwsys_stl::string, public istrstream +{ +public: + typedef kwsys_stl::string StdString; + typedef istrstream IStrStream; + istringstream(): StdString(), + IStrStream(const_cast(StdString::c_str())) {} + istringstream(const kwsys_stl::string& s): + StdString(s), IStrStream(const_cast(StdString::c_str())) {} + kwsys_stl::string str() const { return *this; } + void str(const kwsys_stl::string& s) + { + this->~istringstream(); + new (this) istringstream(s); + } + void clear(int flags) + { + this->IStrStream::clear(flags); + } +private: + istringstream(const istringstream&); + void operator=(const istringstream&); +}; + +#if defined(__WATCOMC__) +# pragma warning 728 9 +#endif +#if defined(_MSC_VER) +# pragma warning (pop) +#endif + +} // namespace cmsys_ios + +#endif + +/* Undefine temporary macro. */ +#if !defined (KWSYS_NAMESPACE) && !cmsys_NAME_IS_KWSYS +# undef kwsys_stl +#endif + +#endif diff --git a/VMSbuild/cmsys/stl/algorithm b/VMSbuild/cmsys/stl/algorithm new file mode 100644 index 000000000..5275d1a89 --- /dev/null +++ b/VMSbuild/cmsys/stl/algorithm @@ -0,0 +1,51 @@ +/*========================================================================= + + Program: KWSys - Kitware System Library + Module: $RCSfile$ + + Copyright (c) Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmsys_stl_algorithm +#define cmsys_stl_algorithm + +#include + +/* Avoid warnings in MSVC standard headers. */ +#ifdef _MSC_VER +# pragma warning (push, 1) +# pragma warning (disable: 4702) +# pragma warning (disable: 4786) +#endif + +/* The HP standard library defines the functor "times" instead of + "multiplies" as specified by C++98 20.3.2 for backward + compatibility with earlier specifications. Defining this macro + fixes this behavior. The name "times" also conflicts with the + function declared in sys/times.h on that platform, so we must do + this as a work-around anyway. */ +#if defined(__HP_aCC) && !defined(__HPACC_USING_MULTIPLIES_IN_FUNCTIONAL) +# define __HPACC_USING_MULTIPLIES_IN_FUNCTIONAL +# define cmsys_DEFINED___HPACC_USING_MULTIPLIES_IN_FUNCTIONAL +#endif + +/* Include the real header. */ +#include + +/* Cleanup. */ +#if defined(cmsys_DEFINED___HPACC_USING_MULTIPLIES_IN_FUNCTIONAL) +# undef cmsys_DEFINED___HPACC_USING_MULTIPLIES_IN_FUNCTIONAL +# undef __HPACC_USING_MULTIPLIES_IN_FUNCTIONAL +#endif + +#ifdef _MSC_VER +# pragma warning(pop) +#endif + + +#endif diff --git a/VMSbuild/cmsys/stl/map b/VMSbuild/cmsys/stl/map new file mode 100644 index 000000000..3e18fa75d --- /dev/null +++ b/VMSbuild/cmsys/stl/map @@ -0,0 +1,51 @@ +/*========================================================================= + + Program: KWSys - Kitware System Library + Module: $RCSfile$ + + Copyright (c) Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmsys_stl_map +#define cmsys_stl_map + +#include + +/* Avoid warnings in MSVC standard headers. */ +#ifdef _MSC_VER +# pragma warning (push, 1) +# pragma warning (disable: 4702) +# pragma warning (disable: 4786) +#endif + +/* The HP standard library defines the functor "times" instead of + "multiplies" as specified by C++98 20.3.2 for backward + compatibility with earlier specifications. Defining this macro + fixes this behavior. The name "times" also conflicts with the + function declared in sys/times.h on that platform, so we must do + this as a work-around anyway. */ +#if defined(__HP_aCC) && !defined(__HPACC_USING_MULTIPLIES_IN_FUNCTIONAL) +# define __HPACC_USING_MULTIPLIES_IN_FUNCTIONAL +# define cmsys_DEFINED___HPACC_USING_MULTIPLIES_IN_FUNCTIONAL +#endif + +/* Include the real header. */ +#include + +/* Cleanup. */ +#if defined(cmsys_DEFINED___HPACC_USING_MULTIPLIES_IN_FUNCTIONAL) +# undef cmsys_DEFINED___HPACC_USING_MULTIPLIES_IN_FUNCTIONAL +# undef __HPACC_USING_MULTIPLIES_IN_FUNCTIONAL +#endif + +#ifdef _MSC_VER +# pragma warning(pop) +#endif + + +#endif diff --git a/VMSbuild/cmsys/stl/stl.h.in b/VMSbuild/cmsys/stl/stl.h.in new file mode 100644 index 000000000..3bd1fda85 --- /dev/null +++ b/VMSbuild/cmsys/stl/stl.h.in @@ -0,0 +1,51 @@ +/*========================================================================= + + Program: KWSys - Kitware System Library + Module: $RCSfile$ + + Copyright (c) Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmsys_stl_@KWSYS_STL_HEADER@ +#define cmsys_stl_@KWSYS_STL_HEADER@ + +#include + +/* Avoid warnings in MSVC standard headers. */ +#ifdef _MSC_VER +# pragma warning (push, 1) +# pragma warning (disable: 4702) +# pragma warning (disable: 4786) +#endif + +/* The HP standard library defines the functor "times" instead of + "multiplies" as specified by C++98 20.3.2 for backward + compatibility with earlier specifications. Defining this macro + fixes this behavior. The name "times" also conflicts with the + function declared in sys/times.h on that platform, so we must do + this as a work-around anyway. */ +#if defined(__HP_aCC) && !defined(__HPACC_USING_MULTIPLIES_IN_FUNCTIONAL) +# define __HPACC_USING_MULTIPLIES_IN_FUNCTIONAL +# define cmsys_DEFINED___HPACC_USING_MULTIPLIES_IN_FUNCTIONAL +#endif + +/* Include the real header. */ +#include <@KWSYS_STL_HEADER@> + +/* Cleanup. */ +#if defined(cmsys_DEFINED___HPACC_USING_MULTIPLIES_IN_FUNCTIONAL) +# undef cmsys_DEFINED___HPACC_USING_MULTIPLIES_IN_FUNCTIONAL +# undef __HPACC_USING_MULTIPLIES_IN_FUNCTIONAL +#endif + +#ifdef _MSC_VER +# pragma warning(pop) +#endif + + +#endif diff --git a/VMSbuild/cmsys/stl/stl.hxx.in b/VMSbuild/cmsys/stl/stl.hxx.in new file mode 100644 index 000000000..171d3cc96 --- /dev/null +++ b/VMSbuild/cmsys/stl/stl.hxx.in @@ -0,0 +1,51 @@ +/*========================================================================= + + Program: KWSys - Kitware System Library + Module: $RCSfile$ + + Copyright (c) Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef @KWSYS_NAMESPACE@_stl_@KWSYS_STL_HEADER@ +#define @KWSYS_NAMESPACE@_stl_@KWSYS_STL_HEADER@ + +#include <@KWSYS_NAMESPACE@/Configure.hxx> + +/* Avoid warnings in MSVC standard headers. */ +#ifdef _MSC_VER +# pragma warning (push, 1) +# pragma warning (disable: 4702) +# pragma warning (disable: 4786) +#endif + +/* The HP standard library defines the functor "times" instead of + "multiplies" as specified by C++98 20.3.2 for backward + compatibility with earlier specifications. Defining this macro + fixes this behavior. The name "times" also conflicts with the + function declared in sys/times.h on that platform, so we must do + this as a work-around anyway. */ +#if defined(__HP_aCC) && !defined(__HPACC_USING_MULTIPLIES_IN_FUNCTIONAL) +# define __HPACC_USING_MULTIPLIES_IN_FUNCTIONAL +# define @KWSYS_NAMESPACE@_DEFINED___HPACC_USING_MULTIPLIES_IN_FUNCTIONAL +#endif + +/* Include the real header. */ +#include <@KWSYS_STL_HEADER@> + +/* Cleanup. */ +#if defined(@KWSYS_NAMESPACE@_DEFINED___HPACC_USING_MULTIPLIES_IN_FUNCTIONAL) +# undef @KWSYS_NAMESPACE@_DEFINED___HPACC_USING_MULTIPLIES_IN_FUNCTIONAL +# undef __HPACC_USING_MULTIPLIES_IN_FUNCTIONAL +#endif + +#ifdef _MSC_VER +# pragma warning(pop) +#endif + + +#endif diff --git a/VMSbuild/cmsys/stl/string b/VMSbuild/cmsys/stl/string new file mode 100644 index 000000000..6769ddb30 --- /dev/null +++ b/VMSbuild/cmsys/stl/string @@ -0,0 +1,51 @@ +/*========================================================================= + + Program: KWSys - Kitware System Library + Module: $RCSfile$ + + Copyright (c) Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmsys_stl_string +#define cmsys_stl_string + +#include + +/* Avoid warnings in MSVC standard headers. */ +#ifdef _MSC_VER +# pragma warning (push, 1) +# pragma warning (disable: 4702) +# pragma warning (disable: 4786) +#endif + +/* The HP standard library defines the functor "times" instead of + "multiplies" as specified by C++98 20.3.2 for backward + compatibility with earlier specifications. Defining this macro + fixes this behavior. The name "times" also conflicts with the + function declared in sys/times.h on that platform, so we must do + this as a work-around anyway. */ +#if defined(__HP_aCC) && !defined(__HPACC_USING_MULTIPLIES_IN_FUNCTIONAL) +# define __HPACC_USING_MULTIPLIES_IN_FUNCTIONAL +# define cmsys_DEFINED___HPACC_USING_MULTIPLIES_IN_FUNCTIONAL +#endif + +/* Include the real header. */ +#include + +/* Cleanup. */ +#if defined(cmsys_DEFINED___HPACC_USING_MULTIPLIES_IN_FUNCTIONAL) +# undef cmsys_DEFINED___HPACC_USING_MULTIPLIES_IN_FUNCTIONAL +# undef __HPACC_USING_MULTIPLIES_IN_FUNCTIONAL +#endif + +#ifdef _MSC_VER +# pragma warning(pop) +#endif + + +#endif diff --git a/VMSbuild/cmsys/stl/vector b/VMSbuild/cmsys/stl/vector new file mode 100644 index 000000000..e2b5b471a --- /dev/null +++ b/VMSbuild/cmsys/stl/vector @@ -0,0 +1,51 @@ +/*========================================================================= + + Program: KWSys - Kitware System Library + Module: $RCSfile$ + + Copyright (c) Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmsys_stl_vector +#define cmsys_stl_vector + +#include + +/* Avoid warnings in MSVC standard headers. */ +#ifdef _MSC_VER +# pragma warning (push, 1) +# pragma warning (disable: 4702) +# pragma warning (disable: 4786) +#endif + +/* The HP standard library defines the functor "times" instead of + "multiplies" as specified by C++98 20.3.2 for backward + compatibility with earlier specifications. Defining this macro + fixes this behavior. The name "times" also conflicts with the + function declared in sys/times.h on that platform, so we must do + this as a work-around anyway. */ +#if defined(__HP_aCC) && !defined(__HPACC_USING_MULTIPLIES_IN_FUNCTIONAL) +# define __HPACC_USING_MULTIPLIES_IN_FUNCTIONAL +# define cmsys_DEFINED___HPACC_USING_MULTIPLIES_IN_FUNCTIONAL +#endif + +/* Include the real header. */ +#include + +/* Cleanup. */ +#if defined(cmsys_DEFINED___HPACC_USING_MULTIPLIES_IN_FUNCTIONAL) +# undef cmsys_DEFINED___HPACC_USING_MULTIPLIES_IN_FUNCTIONAL +# undef __HPACC_USING_MULTIPLIES_IN_FUNCTIONAL +#endif + +#ifdef _MSC_VER +# pragma warning(pop) +#endif + + +#endif diff --git a/VMSbuild/stdstring.cxx b/VMSbuild/stdstring.cxx new file mode 100644 index 000000000..951a3ec79 --- /dev/null +++ b/VMSbuild/stdstring.cxx @@ -0,0 +1,8 @@ +// This file is a hack to get the VMS CC to define the templates for basic_string + +#include + +#pragma define_template std::basic_string, std::allocator > + + +