mirror of
https://github.com/joncampbell123/dosbox-x.git
synced 2025-05-09 03:41:10 +08:00
apparently MSVC doesn't like my __be_float32 macro. Fine.
include io.h for standard unix IO and add define to shut their stupid library up about "unsafe" functions.
This commit is contained in:
parent
801eb7d7b1
commit
a470e1522b
@ -156,28 +156,6 @@ static inline void __w_be_u64(const void *p,const uint64_t val) {
|
||||
((uint8_t*)(p))[7] = val;
|
||||
}
|
||||
|
||||
static inline float __be_float32(void *p) {
|
||||
union f {
|
||||
uint32_t i;
|
||||
float f;
|
||||
};
|
||||
union f fv;
|
||||
|
||||
fv.i = __be_u32(p);
|
||||
return fv.f;
|
||||
}
|
||||
|
||||
static inline double __be_float64(void *p) {
|
||||
union f {
|
||||
uint64_t i;
|
||||
double f;
|
||||
};
|
||||
union f fv;
|
||||
|
||||
fv.i = __be_u64(p);
|
||||
return fv.f;
|
||||
}
|
||||
|
||||
static inline uint16_t __be_to_he_16(uint16_t val) {
|
||||
return (val << 8) | (val >> 8);
|
||||
}
|
||||
|
@ -1,4 +1,7 @@
|
||||
|
||||
/* Shut up! */
|
||||
#define _CRT_NONSTDC_NO_DEPRECATE
|
||||
|
||||
#include "rawint.h"
|
||||
#include "avi.h"
|
||||
#include "avi_writer.h"
|
||||
@ -7,6 +10,9 @@
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <fcntl.h>
|
||||
#ifdef _MSC_VER
|
||||
# include <io.h>
|
||||
#endif
|
||||
|
||||
/* FIXME: I made the mistake of putting critical calls in assert() calls, which under MSVC++ may evaluate to nothing in Release builds */
|
||||
#ifdef _MSC_VER
|
||||
|
@ -1,7 +1,9 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <inttypes.h>
|
||||
#ifndef _MSC_VER
|
||||
# include <inttypes.h>
|
||||
#endif
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -1,10 +1,16 @@
|
||||
|
||||
/* Shut up! */
|
||||
#define _CRT_NONSTDC_NO_DEPRECATE
|
||||
|
||||
#include "rawint.h"
|
||||
#include "riff.h"
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#ifdef _MSC_VER
|
||||
# include <io.h>
|
||||
#endif
|
||||
|
||||
int riff_std_read(void *a,void *b,size_t c) {
|
||||
riff_stack *rs;
|
||||
|
@ -1,4 +1,7 @@
|
||||
|
||||
/* Shut up! */
|
||||
#define _CRT_NONSTDC_NO_DEPRECATE
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <stdlib.h>
|
||||
@ -8,6 +11,9 @@
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#ifdef _MSC_VER
|
||||
# include <io.h>
|
||||
#endif
|
||||
|
||||
#include "riff_wav_writer.h"
|
||||
#include "rawint.h"
|
||||
|
@ -99,6 +99,87 @@
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
OutputDirectory="$(SolutionDir)/.."
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UseUnicodeResponseFiles="false"
|
||||
Optimization="0"
|
||||
EnableIntrinsicFunctions="true"
|
||||
AdditionalIncludeDirectories="$(SolutionDir)/../include;$(SolutionDir)/../src;$(SolutionDir);$(SolutionDir)/zlib;$(SolutionDir)/sdl/include;$(SolutionDir)/libpng;$(SolutionDir)/sdlnet"
|
||||
PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS;WIN32;__WIN32__"
|
||||
GeneratePreprocessedFile="0"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
UseUnicodeResponseFiles="false"
|
||||
AdditionalDependencies="winmm.lib opengl32.lib $(SolutionDir)\..\zlibstat.lib"
|
||||
ShowProgress="2"
|
||||
OutputFile="$(OutDir)\DOSBox.exe"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)/.."
|
||||
@ -181,87 +262,6 @@
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
OutputDirectory="$(SolutionDir)/.."
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UseUnicodeResponseFiles="false"
|
||||
Optimization="0"
|
||||
EnableIntrinsicFunctions="true"
|
||||
AdditionalIncludeDirectories="$(SolutionDir)/../include;$(SolutionDir)/../src;$(SolutionDir);$(SolutionDir)/zlib;$(SolutionDir)/sdl/include;$(SolutionDir)/libpng;$(SolutionDir)/sdlnet"
|
||||
PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS;WIN32;__WIN32__"
|
||||
GeneratePreprocessedFile="0"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
UseUnicodeResponseFiles="false"
|
||||
AdditionalDependencies="winmm.lib opengl32.lib $(SolutionDir)\..\zlibstat.lib"
|
||||
ShowProgress="2"
|
||||
OutputFile="$(OutDir)\DOSBox.exe"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
OutputDirectory="$(SolutionDir)/.."
|
||||
@ -366,6 +366,14 @@
|
||||
RelativePath="..\src\gui\AReverbModel.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\gui\avi_rw_iobuf.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\gui\avi_writer.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\ints\bios.cpp"
|
||||
>
|
||||
@ -610,6 +618,10 @@
|
||||
RelativePath="..\src\libs\gui_tk\gui_tk.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\gui\guid.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\hardware\gus.cpp"
|
||||
>
|
||||
@ -694,6 +706,10 @@
|
||||
RelativePath="..\src\hardware\keyboard.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\gui\ksdataformat.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\gui\LA32Ramp.cpp"
|
||||
>
|
||||
@ -834,6 +850,14 @@
|
||||
RelativePath="..\src\gui\freeverb\revmodel.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\gui\riff.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\gui\riff_wav_writer.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\gui\ROMInfo.cpp"
|
||||
>
|
||||
|
Loading…
x
Reference in New Issue
Block a user