From 8398491f0ef159eb51b0417ef578bf7254494349 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Sun, 26 Oct 2008 19:44:57 +0000 Subject: [PATCH] Fix builds on VC++ 2008 (STR #80) --- vcnet/config.h | 30 ++++--- vcnet/mxml.sln | 43 +++++---- vcnet/mxml1.vcproj | 205 +++++++++++++++++++++++++++++------------- vcnet/mxml1d.def | 59 ------------ vcnet/mxmldoc.vcproj | 163 +++++++++++++++++++++++---------- vcnet/testmxml.vcproj | 171 ++++++++++++++++++++++++----------- 6 files changed, 417 insertions(+), 254 deletions(-) delete mode 100644 vcnet/mxml1d.def diff --git a/vcnet/config.h b/vcnet/config.h index 24ef617..9097836 100644 --- a/vcnet/config.h +++ b/vcnet/config.h @@ -3,7 +3,7 @@ * * Configuration file for Mini-XML, a small XML-like file parsing library. * - * Copyright 2003-2007 by Michael Sweet. + * Copyright 2003-2008 by Michael Sweet. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -22,9 +22,26 @@ * when many of the affected functions are otherwise completely secure. * The _CRT_SECURE_NO_DEPRECATE definition ensures that we won't get * warnings from their use... + * + * Then Microsoft decided that they should ignore this in VC2008 and use + * yet another define (_CRT_SECURE_NO_WARNINGS) instead. Bastards. */ #define _CRT_SECURE_NO_DEPRECATE +#define _CRT_SECURE_NO_WARNINGS + + +/* + * Include necessary headers... + */ + +#include +#include +#include +#include +#include +#include + /* * Microsoft also renames the POSIX functions to _name, and introduces @@ -45,17 +62,6 @@ #define write _write -/* - * Include necessary headers... - */ - -#include -#include -#include -#include -#include - - /* * Version number... */ diff --git a/vcnet/mxml.sln b/vcnet/mxml.sln index a4e65cb..5aea693 100644 --- a/vcnet/mxml.sln +++ b/vcnet/mxml.sln @@ -1,39 +1,36 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mxmldoc", "mxmldoc.vcproj", "{D909892E-520A-4322-9A47-DAEBDA9CC7A7}" ProjectSection(ProjectDependencies) = postProject {E5AA9476-9751-4654-8109-B1A2112D5E73} = {E5AA9476-9751-4654-8109-B1A2112D5E73} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mxml1", "mxml1.vcproj", "{E5AA9476-9751-4654-8109-B1A2112D5E73}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testmxml", "testmxml.vcproj", "{D909892E-520A-4322-9A47-DAEBDA9CC7A7}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testmxml", "testmxml.vcproj", "{75CAC6C4-A6BC-4935-A3C9-8F0AE0744227}" ProjectSection(ProjectDependencies) = postProject {E5AA9476-9751-4654-8109-B1A2112D5E73} = {E5AA9476-9751-4654-8109-B1A2112D5E73} EndProjectSection EndProject Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {D909892E-520A-4322-9A47-DAEBDA9CC7A7}.Debug.ActiveCfg = Debug|Win32 - {D909892E-520A-4322-9A47-DAEBDA9CC7A7}.Debug.Build.0 = Debug|Win32 - {D909892E-520A-4322-9A47-DAEBDA9CC7A7}.Release.ActiveCfg = Release|Win32 - {D909892E-520A-4322-9A47-DAEBDA9CC7A7}.Release.Build.0 = Release|Win32 - {E5AA9476-9751-4654-8109-B1A2112D5E73}.Debug.ActiveCfg = Debug|Win32 - {E5AA9476-9751-4654-8109-B1A2112D5E73}.Debug.Build.0 = Debug|Win32 - {E5AA9476-9751-4654-8109-B1A2112D5E73}.Release.ActiveCfg = Release|Win32 - {E5AA9476-9751-4654-8109-B1A2112D5E73}.Release.Build.0 = Release|Win32 - {D909892E-520A-4322-9A47-DAEBDA9CC7A7}.Debug.ActiveCfg = Debug|Win32 - {D909892E-520A-4322-9A47-DAEBDA9CC7A7}.Debug.Build.0 = Debug|Win32 - {D909892E-520A-4322-9A47-DAEBDA9CC7A7}.Release.ActiveCfg = Release|Win32 - {D909892E-520A-4322-9A47-DAEBDA9CC7A7}.Release.Build.0 = Release|Win32 + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D909892E-520A-4322-9A47-DAEBDA9CC7A7}.Debug|Win32.ActiveCfg = Debug|Win32 + {D909892E-520A-4322-9A47-DAEBDA9CC7A7}.Debug|Win32.Build.0 = Debug|Win32 + {D909892E-520A-4322-9A47-DAEBDA9CC7A7}.Release|Win32.ActiveCfg = Release|Win32 + {D909892E-520A-4322-9A47-DAEBDA9CC7A7}.Release|Win32.Build.0 = Release|Win32 + {E5AA9476-9751-4654-8109-B1A2112D5E73}.Debug|Win32.ActiveCfg = Debug|Win32 + {E5AA9476-9751-4654-8109-B1A2112D5E73}.Debug|Win32.Build.0 = Debug|Win32 + {E5AA9476-9751-4654-8109-B1A2112D5E73}.Release|Win32.ActiveCfg = Release|Win32 + {E5AA9476-9751-4654-8109-B1A2112D5E73}.Release|Win32.Build.0 = Release|Win32 + {75CAC6C4-A6BC-4935-A3C9-8F0AE0744227}.Debug|Win32.ActiveCfg = Debug|Win32 + {75CAC6C4-A6BC-4935-A3C9-8F0AE0744227}.Debug|Win32.Build.0 = Debug|Win32 + {75CAC6C4-A6BC-4935-A3C9-8F0AE0744227}.Release|Win32.ActiveCfg = Release|Win32 EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE EndGlobalSection EndGlobal diff --git a/vcnet/mxml1.vcproj b/vcnet/mxml1.vcproj index 2839606..cb933a4 100644 --- a/vcnet/mxml1.vcproj +++ b/vcnet/mxml1.vcproj @@ -1,72 +1,124 @@ + Keyword="Win32Proj" + TargetFrameworkVersion="131072" + > + Name="Win32" + /> + + + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + Detect64BitPortabilityProblems="false" + DebugInformationFormat="4" + /> + + Name="VCResourceCompilerTool" + /> + - - - + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + ImportLibrary="mxml1.lib" + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCPostBuildEventTool" + /> @@ -117,55 +182,71 @@ + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + RelativePath="..\mxml-attr.c" + > + RelativePath="..\mxml-entity.c" + > + RelativePath="..\mxml-file.c" + > + RelativePath="..\mxml-index.c" + > + RelativePath="..\mxml-node.c" + > + RelativePath="..\mxml-private.c" + > + RelativePath="..\mxml-search.c" + > + RelativePath="..\mxml-set.c" + > + RelativePath="..\mxml-string.c" + > + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + RelativePath="..\vcnet\config.h" + > + RelativePath="..\mxml-private.h" + > + RelativePath="..\mxml.h" + > + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + RelativePath=".\mxml1.def" + > diff --git a/vcnet/mxml1d.def b/vcnet/mxml1d.def deleted file mode 100644 index 09c9492..0000000 --- a/vcnet/mxml1d.def +++ /dev/null @@ -1,59 +0,0 @@ -LIBRARY "MXML1D" -EXPORTS - _mxml_strdupf - _mxml_vstrdupf - mxml_ignore_cb - mxml_integer_cb - mxml_opaque_cb - mxml_real_cb - mxmlAdd - mxmlDelete - mxmlElementDeleteAttr - mxmlElementGetAttr - mxmlElementSetAttr - mxmlElementSetAttrf - mxmlEntityAddCallback - mxmlEntityGetName - mxmlEntityGetValue - mxmlEntityRemoveCallback - mxmlFindElement - mxmlIndexDelete - mxmlIndexEnum - mxmlIndexFind - mxmlIndexNew - mxmlIndexReset - mxmlLoadFd - mxmlLoadFile - mxmlLoadString - mxmlNewCDATA - mxmlNewCustom - mxmlNewElement - mxmlNewInteger - mxmlNewOpaque - mxmlNewReal - mxmlNewText - mxmlNewTextf - mxmlNewXML - mxmlRelease - mxmlRemove - mxmlRetain - mxmlSaveAllocString - mxmlSaveFd - mxmlSaveFile - mxmlSaveString - mxmlSAXLoadFd - mxmlSAXLoadFile - mxmlSAXLoadString - mxmlSetCDATA - mxmlSetCustom - mxmlSetCustomHandlers - mxmlSetElement - mxmlSetErrorCallback - mxmlSetInteger - mxmlSetOpaque - mxmlSetReal - mxmlSetText - mxmlSetTextf - mxmlSetWrapMargin - mxmlWalkNext - mxmlWalkPrev diff --git a/vcnet/mxmldoc.vcproj b/vcnet/mxmldoc.vcproj index 3f8a3a5..fa8ed22 100644 --- a/vcnet/mxmldoc.vcproj +++ b/vcnet/mxmldoc.vcproj @@ -1,70 +1,122 @@ + Keyword="Win32Proj" + TargetFrameworkVersion="131072" + > + Name="Win32" + /> + + + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + Detect64BitPortabilityProblems="false" + DebugInformationFormat="4" + /> + + Name="VCResourceCompilerTool" + /> + - - - + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - - + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCPostBuildEventTool" + /> @@ -113,20 +178,24 @@ + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + RelativePath="..\mxmldoc.c" + > + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > diff --git a/vcnet/testmxml.vcproj b/vcnet/testmxml.vcproj index 64d82ea..40a4a87 100644 --- a/vcnet/testmxml.vcproj +++ b/vcnet/testmxml.vcproj @@ -1,70 +1,122 @@ + Version="9.00" + Name="testmxml" + ProjectGUID="{75CAC6C4-A6BC-4935-A3C9-8F0AE0744227}" + Keyword="Win32Proj" + TargetFrameworkVersion="131072" + > + Name="Win32" + /> + + + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + Detect64BitPortabilityProblems="false" + DebugInformationFormat="4" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - - + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - - + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCPostBuildEventTool" + /> @@ -113,20 +178,24 @@ + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + RelativePath="..\testmxml.c" + > + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + >