fix MzCOM's atexit replacement

This commit is contained in:
Matthew Flatt 2015-08-17 10:16:02 -06:00
parent 641c56b6e9
commit 1b493f2146
2 changed files with 101 additions and 1 deletions

View File

@ -302,9 +302,10 @@ static int do_evalLoop(Scheme_Env *env, int argc, char **_args)
return 0;
}
static void record_at_exit(Scheme_At_Exit_Callback_Proc p) XFORM_SKIP_PROC
static int record_at_exit(Scheme_At_Exit_Callback_Proc p) XFORM_SKIP_PROC
{
at_exit_callback = p;
return 0;
}
static __declspec(thread) void *tls_space;

View File

@ -0,0 +1,99 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject ProjectType="Visual C++" Version="9.00" Name="MzCOM" ProjectGUID="{36F31050-55C6-41A3-A23E-3008EBFC1273}" TargetFrameworkVersion="131072">
<Platforms>
<Platform Name="Win32" />
<Platform Name="x64" />
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration Name="BDebug|Win32" OutputDirectory="..\..\..\lib" IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" ConfigurationType="1" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" UseOfMFC="0" ATLMinimizesCRunTimeLibraryUsage="false" CharacterSet="2">
<Tool Name="VCMIDLTool" TypeLibraryName="$(OutDir)\$(ProjectName).tlb" />
<Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..,..\..\racket\include,." PreprocessorDefinitions="WIN32,_DEBUG,_WINDOWS,GC_DLL" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" CompileAs="0" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" AdditionalIncludeDirectories="..\..\mzcom,$(OutDir),$(NOINHERIT)" />
<Tool Name="VCLinkerTool" AdditionalOptions="/MACHINE:I386 /DELAYLOAD:libracketxxxxxxx.dll /DELAYLOAD:libmzgcxxxxxxx.dll" AdditionalDependencies="delayimp.lib" OutputFile="..\..\..\lib\$(ProjectName)CGC.exe" SuppressStartupBanner="true" GenerateDebugInformation="true" ProgramDatabaseFile="..\..\..\lib\$(ProjectName)CGC.pdb" SubSystem="2" StackReserveSize="8388608" RandomizedBaseAddress="1" DataExecutionPrevention="0" />
</Configuration>
<Configuration Name="BDebug|x64" OutputDirectory="..\..\..\lib" IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" ConfigurationType="1" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" UseOfMFC="0" ATLMinimizesCRunTimeLibraryUsage="false" CharacterSet="2">
<Tool Name="VCMIDLTool" TargetEnvironment="3" TypeLibraryName="$(OutDir)\$(ProjectName).tlb" />
<Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..,..\..\racket\include,." PreprocessorDefinitions="WIN32,_DEBUG,_WINDOWS,GC_DLL" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" CompileAs="0" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" AdditionalIncludeDirectories="..\..\mzcom,$(OutDir),$(NOINHERIT)" />
<Tool Name="VCLinkerTool" AdditionalOptions="/MACHINE:I386 /DELAYLOAD:libracketxxxxxxx.dll /DELAYLOAD:libmzgcxxxxxxx.dll" AdditionalDependencies="delayimp.lib" OutputFile="..\..\..\lib\$(ProjectName)CGC.exe" SuppressStartupBanner="true" GenerateDebugInformation="true" ProgramDatabaseFile="..\..\..\lib\$(ProjectName)CGC.pdb" SubSystem="2" StackReserveSize="8388608" RandomizedBaseAddress="1" DataExecutionPrevention="0" TargetMachine="17" />
</Configuration>
<Configuration Name="BRelease|Win32" OutputDirectory="..\..\..\lib" IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" ConfigurationType="1" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" UseOfMFC="0" ATLMinimizesCRunTimeLibraryUsage="false" CharacterSet="2">
<Tool Name="VCMIDLTool" TypeLibraryName="$(OutDir)\$(ProjectName).tlb" />
<Tool Name="VCCLCompilerTool" InlineFunctionExpansion="2" EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" AdditionalIncludeDirectories="..,..\..\racket\include,." PreprocessorDefinitions="WIN32,NDEBUG,_WINDOWS,GC_DLL" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" UsePrecompiledHeader="0" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" CompileAs="0" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" AdditionalIncludeDirectories="..\..\mzcom,$(OutDir),$(NOINHERIT)" />
<Tool Name="VCLinkerTool" AdditionalOptions="/MACHINE:I386 /DELAYLOAD:libracketxxxxxxx.dll /DELAYLOAD:libmzgcxxxxxxx.dll" AdditionalDependencies="delayimp.lib" OutputFile="..\..\..\lib\$(ProjectName)CGC.exe" LinkIncremental="1" SuppressStartupBanner="true" GenerateDebugInformation="true" ProgramDatabaseFile="..\..\..\lib\$(ProjectName)CGC.pdb" SubSystem="2" StackReserveSize="8388608" RandomizedBaseAddress="1" DataExecutionPrevention="0" />
</Configuration>
<Configuration Name="BRelease|x64" OutputDirectory="..\..\..\lib" IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" ConfigurationType="1" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" UseOfMFC="0" ATLMinimizesCRunTimeLibraryUsage="false" CharacterSet="2">
<Tool Name="VCMIDLTool" TargetEnvironment="3" TypeLibraryName="$(OutDir)\$(ProjectName).tlb" />
<Tool Name="VCCLCompilerTool" InlineFunctionExpansion="2" EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" AdditionalIncludeDirectories="..,..\..\racket\include,." PreprocessorDefinitions="WIN32,NDEBUG,_WINDOWS,GC_DLL" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" UsePrecompiledHeader="0" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" CompileAs="0" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" AdditionalIncludeDirectories="..\..\mzcom,$(OutDir),$(NOINHERIT)" />
<Tool Name="VCLinkerTool" AdditionalOptions="/DELAYLOAD:libracketxxxxxxx.dll /DELAYLOAD:libmzgcxxxxxxx.dll" AdditionalDependencies="delayimp.lib" OutputFile="..\..\..\lib\$(ProjectName)CGC.exe" LinkIncremental="1" SuppressStartupBanner="true" GenerateDebugInformation="true" ProgramDatabaseFile="..\..\..\lib\$(ProjectName)CGC.pdb" SubSystem="2" StackReserveSize="8388608" RandomizedBaseAddress="1" DataExecutionPrevention="0" TargetMachine="17" />
</Configuration>
<Configuration Name="SDebug|Win32" OutputDirectory="..\..\..\lib" IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" ConfigurationType="1" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" UseOfMFC="0" ATLMinimizesCRunTimeLibraryUsage="false" CharacterSet="2">
<Tool Name="VCMIDLTool" TypeLibraryName="$(OutDir)\$(ProjectName).tlb" />
<Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..,..\..\racket\include,." PreprocessorDefinitions="WIN32,_DEBUG,_WINDOWS,GC_DLL,USE_SENORA_GC" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" CompileAs="0" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" AdditionalIncludeDirectories="..\..\mzcom,$(OutDir),$(NOINHERIT)" />
<Tool Name="VCLinkerTool" AdditionalOptions="/MACHINE:I386 /DELAYLOAD:libracketxxxxxxx.dll /DELAYLOAD:libmzgcxxxxxxx.dll" AdditionalDependencies="delayimp.lib" OutputFile="..\..\..\lib\$(ProjectName)CGC.exe" SuppressStartupBanner="true" GenerateDebugInformation="true" ProgramDatabaseFile="..\..\..\lib\$(ProjectName)CGC.pdb" SubSystem="2" StackReserveSize="8388608" RandomizedBaseAddress="1" DataExecutionPrevention="0" />
</Configuration>
<Configuration Name="SDebug|x64" OutputDirectory="..\..\..\lib" IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" ConfigurationType="1" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" UseOfMFC="0" ATLMinimizesCRunTimeLibraryUsage="false" CharacterSet="2">
<Tool Name="VCMIDLTool" TargetEnvironment="3" TypeLibraryName="$(OutDir)\$(ProjectName).tlb" />
<Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..,..\..\racket\include,." PreprocessorDefinitions="WIN32,_DEBUG,_WINDOWS,GC_DLL,USE_SENORA_GC" BasicRuntimeChecks="3" RuntimeLibrary="1" UsePrecompiledHeader="0" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" CompileAs="0" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" AdditionalIncludeDirectories="..\..\mzcom,$(OutDir),$(NOINHERIT)" />
<Tool Name="VCLinkerTool" AdditionalOptions="/MACHINE:I386 /DELAYLOAD:libracketxxxxxxx.dll /DELAYLOAD:libmzgcxxxxxxx.dll" AdditionalDependencies="delayimp.lib" OutputFile="..\..\..\lib\$(ProjectName)CGC.exe" SuppressStartupBanner="true" GenerateDebugInformation="true" ProgramDatabaseFile="..\..\..\lib\$(ProjectName)CGC.pdb" SubSystem="2" StackReserveSize="8388608" RandomizedBaseAddress="1" DataExecutionPrevention="0" TargetMachine="17" />
</Configuration>
<Configuration Name="SRelease|Win32" OutputDirectory="..\..\..\lib" IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" ConfigurationType="1" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" UseOfMFC="0" ATLMinimizesCRunTimeLibraryUsage="false" CharacterSet="2">
<Tool Name="VCMIDLTool" TypeLibraryName="$(OutDir)\$(ProjectName).tlb" />
<Tool Name="VCCLCompilerTool" InlineFunctionExpansion="2" EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" AdditionalIncludeDirectories="..,..\..\racket\include,." PreprocessorDefinitions="WIN32,NDEBUG,_WINDOWS,GC_DLL,USE_SENORA_GC" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" UsePrecompiledHeader="0" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" CompileAs="0" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" AdditionalIncludeDirectories="..\..\mzcom,$(OutDir),$(NOINHERIT)" />
<Tool Name="VCLinkerTool" AdditionalOptions="/MACHINE:I386 /DELAYLOAD:libracketxxxxxxx.dll /DELAYLOAD:libmzgcxxxxxxx.dll" AdditionalDependencies="delayimp.lib" OutputFile="..\..\..\lib\$(ProjectName)CGC.exe" LinkIncremental="1" SuppressStartupBanner="true" GenerateDebugInformation="true" ProgramDatabaseFile="..\..\..\lib\$(ProjectName)CGC.pdb" SubSystem="2" StackReserveSize="8388608" RandomizedBaseAddress="1" DataExecutionPrevention="0" />
</Configuration>
<Configuration Name="SRelease|x64" OutputDirectory="..\..\..\lib" IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" ConfigurationType="1" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" UseOfMFC="0" ATLMinimizesCRunTimeLibraryUsage="false" CharacterSet="2">
<Tool Name="VCMIDLTool" TargetEnvironment="3" TypeLibraryName="$(OutDir)\$(ProjectName).tlb" />
<Tool Name="VCCLCompilerTool" InlineFunctionExpansion="2" EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" AdditionalIncludeDirectories="..,..\..\racket\include,." PreprocessorDefinitions="WIN32,NDEBUG,_WINDOWS,GC_DLL,USE_SENORA_GC" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" UsePrecompiledHeader="0" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" CompileAs="0" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" AdditionalIncludeDirectories="..\..\mzcom,$(OutDir),$(NOINHERIT)" />
<Tool Name="VCLinkerTool" AdditionalOptions="/DELAYLOAD:libracketxxxxxxx.dll /DELAYLOAD:libmzgcxxxxxxx.dll" AdditionalDependencies="delayimp.lib C:\Users\mflatt\plt\racket\src\worksp\libracket\..\..\..\lib\msvc\libracketxxxxxxx.lib C:\Users\mflatt\plt\racket\src\worksp\libmzgc\..\..\..\lib\msvc\libmzgcxxxxxxx.lib C:\Users\mflatt\plt\racket\src\worksp\sgc\..\..\..\lib\msvc\libmzgcxxxxxxx.lib" OutputFile="..\..\..\lib\$(ProjectName)CGC.exe" LinkIncremental="1" SuppressStartupBanner="true" GenerateDebugInformation="true" ProgramDatabaseFile="..\..\..\lib\$(ProjectName)CGC.pdb" SubSystem="2" StackReserveSize="8388608" RandomizedBaseAddress="1" DataExecutionPrevention="0" TargetMachine="17" />
</Configuration>
<Configuration Name="3m|Win32" OutputDirectory="..\..\..\lib" IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" ConfigurationType="1" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" UseOfMFC="0" ATLMinimizesCRunTimeLibraryUsage="false" CharacterSet="2">
<Tool Name="VCMIDLTool" TypeLibraryName="$(OutDir)\$(ProjectName).tlb" />
<Tool Name="VCCLCompilerTool" InlineFunctionExpansion="2" EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" AdditionalIncludeDirectories="..,..\..\racket\include,." PreprocessorDefinitions="WIN32,NDEBUG,_WINDOWS,GC_DLL,MZCOM_3M" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" UsePrecompiledHeader="0" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" CompileAs="0" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" AdditionalIncludeDirectories="..\..\mzcom,$(OutDir),$(NOINHERIT)" />
<Tool Name="VCLinkerTool" LinkLibraryDependencies="false" AdditionalOptions="/MACHINE:I386 /DELAYLOAD:libracket3mxxxxxxx.dll" AdditionalDependencies="delayimp.lib ..\..\..\lib\msvc\libracket3mxxxxxxx.lib" OutputFile="..\..\..\lib\$(ProjectName).exe" LinkIncremental="1" SuppressStartupBanner="true" GenerateDebugInformation="true" ProgramDatabaseFile="..\..\..\lib\$(ProjectName).pdb" SubSystem="2" StackReserveSize="8388608" RandomizedBaseAddress="1" DataExecutionPrevention="0" />
</Configuration>
<Configuration Name="3m|x64" OutputDirectory="..\..\..\lib" IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" ConfigurationType="1" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" UseOfMFC="0" ATLMinimizesCRunTimeLibraryUsage="false" CharacterSet="2">
<Tool Name="VCMIDLTool" TargetEnvironment="3" TypeLibraryName="$(OutDir)\$(ProjectName).tlb" />
<Tool Name="VCCLCompilerTool" InlineFunctionExpansion="2" EnableIntrinsicFunctions="true" FavorSizeOrSpeed="1" AdditionalIncludeDirectories="..,..\..\racket\include,." PreprocessorDefinitions="WIN32,NDEBUG,_WINDOWS,GC_DLL,MZCOM_3M" StringPooling="true" RuntimeLibrary="0" EnableFunctionLevelLinking="true" UsePrecompiledHeader="0" WarningLevel="3" SuppressStartupBanner="true" DebugInformationFormat="3" CompileAs="0" />
<Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" AdditionalIncludeDirectories="..\..\mzcom,$(OutDir),$(NOINHERIT)" />
<Tool Name="VCLinkerTool" LinkLibraryDependencies="false" AdditionalOptions="/DELAYLOAD:libracket3mxxxxxxx.dll" AdditionalDependencies="delayimp.lib ..\..\..\lib\msvc\libracket3mxxxxxxx.lib" OutputFile="..\..\..\lib\$(ProjectName).exe" LinkIncremental="1" SuppressStartupBanner="true" GenerateDebugInformation="true" ProgramDatabaseFile="..\..\..\lib\$(ProjectName).pdb" SubSystem="2" StackReserveSize="8388608" RandomizedBaseAddress="1" DataExecutionPrevention="0" TargetMachine="17" />
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter Name="Source Files" Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
<File RelativePath="..\..\mzcom\mzcom.cxx">
</File>
<File RelativePath="..\..\mzcom\com_glue.c">
</File>
<File RelativePath="..\..\mzcom\mzcom.idl">
</File>
<File RelativePath="..\..\mzcom\mzobj.cxx">
</File>
</Filter>
<Filter Name="Header Files" Filter="h;hpp;hxx;hm;inl">
<File RelativePath="..\..\mzcom\mzobj.h">
</File>
<File RelativePath="..\..\mzcom\com_glue.h">
</File>
</Filter>
<Filter Name="Resource Files" Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
<File RelativePath=".\mzcom.ico">
</File>
<File RelativePath=".\mzcom.rc">
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>