(MSVC 2010) More build fixes

This commit is contained in:
twinaphex 2012-11-10 20:44:37 +01:00
parent f6a4d35498
commit 0527e4a971
9 changed files with 26 additions and 33 deletions

View File

@ -19,7 +19,6 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h>
#include "CDAccess.h" #include "CDAccess.h"

View File

@ -53,6 +53,10 @@
#include <map> #include <map>
#ifdef _WIN32
#include "../msvc_compat.h"
#endif
using namespace CDUtility; using namespace CDUtility;
enum enum

View File

@ -25,6 +25,10 @@
#include <algorithm> #include <algorithm>
#ifdef _WIN32
#include "../msvc_compat.h"
#endif
using namespace CDUtility; using namespace CDUtility;
CDIF::CDIF() : UnrecoverableError(false), is_phys_cache(false), disc_cdaccess(NULL), DiscEjected(false) CDIF::CDIF() : UnrecoverableError(false), is_phys_cache(false), disc_cdaccess(NULL), DiscEjected(false)

View File

@ -40,7 +40,6 @@
#include <ctype.h> #include <ctype.h>
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>
#include <getopt.h>
#include <math.h> #include <math.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
@ -49,7 +48,6 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <unistd.h>
/*** /***
*** dvdisaster.c *** dvdisaster.c

View File

@ -22,7 +22,6 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h>
#include <string> #include <string>
#include <map> #include <map>

View File

@ -17,35 +17,11 @@ void MDFN_free(void *ptr);
static inline void MDFN_FastU32MemsetM8(uint32_t *array, uint32_t value_32, unsigned int u32len) static inline void MDFN_FastU32MemsetM8(uint32_t *array, uint32_t value_32, unsigned int u32len)
{ {
#ifdef ARCH_X86
uint32_t dummy_output0, dummy_output1;
#ifdef __x86_64__
asm volatile(
"cld\n\t"
"rep stosq\n\t"
: "=D" (dummy_output0), "=c" (dummy_output1)
: "a" (value_32 | ((uint64_t)value_32 << 32)), "D" (array), "c" (u32len >> 1)
: "cc", "memory");
#else
asm volatile(
"cld\n\t"
"rep stosl\n\t"
: "=D" (dummy_output0), "=c" (dummy_output1)
: "a" (value_32), "D" (array), "c" (u32len)
: "cc", "memory");
#endif
#else
for(uint32_t *ai = array; ai < array + u32len; ai += 2) for(uint32_t *ai = array; ai < array + u32len; ai += 2)
{ {
ai[0] = value_32; ai[0] = value_32;
ai[1] = value_32; ai[1] = value_32;
} }
#endif
} }
#endif #endif

View File

@ -27,6 +27,10 @@
#include "md5.h" #include "md5.h"
#include "mempatcher.h" #include "mempatcher.h"
#ifdef _WIN32
#include "msvc_compat.h"
#endif
static uint8 **RAMPtrs = NULL; static uint8 **RAMPtrs = NULL;
static uint32 PageSize; static uint32 PageSize;
static uint32 NumPages; static uint32 NumPages;

View File

@ -20,6 +20,7 @@
#undef UNICODE // Do not bother with UNICODE at this time. #undef UNICODE // Do not bother with UNICODE at this time.
#include <stddef.h> #include <stddef.h>
#include <io.h>
#include <math.h> #include <math.h>
// Python headers defines ssize_t and sets HAVE_SSIZE_T. Cannot duplicate these efforts. // Python headers defines ssize_t and sets HAVE_SSIZE_T. Cannot duplicate these efforts.
@ -32,9 +33,17 @@ typedef int ssize_t;
#endif #endif
#define snprintf _snprintf #define snprintf _snprintf
#define strtoll _strtoi64
#define strtoull _strtoui64 #define strtoull _strtoui64
#undef strcasecmp #undef strcasecmp
#define strcasecmp _stricmp #define strcasecmp _stricmp
#define lseek _lseek
#include <tchar.h>
#define strlen _tcslen
# define S_IRUSR S_IREAD /* read, user */
# define S_IWUSR S_IWRITE /* write, user */
// Disable some of the annoying warnings. // Disable some of the annoying warnings.
#pragma warning(disable : 4800) #pragma warning(disable : 4800)
@ -46,7 +55,7 @@ typedef int ssize_t;
#define roundf(in) (in >= 0.0f ? floorf(in + 0.5f) : ceilf(in - 0.5f)) #define roundf(in) (in >= 0.0f ? floorf(in + 0.5f) : ceilf(in - 0.5f))
#ifndef PATH_MAX #ifndef PATH_MAX
#define PATH_MAX _MAX_PATH #define PATH_MAX MAX_PATH
#endif #endif
#endif #endif

View File

@ -20,13 +20,13 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings"> <ImportGroup Label="ExtensionSettings">
@ -50,7 +50,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;__SSE2__;_DEBUG;_WINDOWS;_USRDLL;MEDNAFENPSXLIBRETRO_EXPORTS;%(PreprocessorDefinitions);LSB_FIRST;HAVE_MKDIR;SIZEOF_DOUBLE=8;MEDNAFEN_VERSION="0.9.24";PACKAGE="mednafen";MEDNAFEN_VERSION_NUMERIC=924;PSS_STYLE=1;MPC_FIXED_POINT;ARCH_X86;WANT_PSX_EMU;STDC_HEADERS</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MEDNAFENPSXLIBRETRO_EXPORTS;%(PreprocessorDefinitions);LSB_FIRST;HAVE_MKDIR;SIZEOF_DOUBLE=8;MEDNAFEN_VERSION="0.9.24";PACKAGE="mednafen";MEDNAFEN_VERSION_NUMERIC=924;PSS_STYLE=1;MPC_FIXED_POINT;ARCH_X86;WANT_PSX_EMU;STDC_HEADERS;_CRT_SECURE_NO_WARNINGS</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)/../mednafen;$(SolutionDir)/../;$(SolutionDir)/../mednafen-libretro;$(SolutionDir)/../mednafen/intl;$(SolutionDir)/../mednafen/psx;$(SolutionDir)/../mednafen/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)/../mednafen;$(SolutionDir)/../;$(SolutionDir)/../mednafen-libretro;$(SolutionDir)/../mednafen/intl;$(SolutionDir)/../mednafen/psx;$(SolutionDir)/../mednafen/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
<Link> <Link>
@ -66,7 +66,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;__SSE2__;NDEBUG;_WINDOWS;_USRDLL;MEDNAFENPSXLIBRETRO_EXPORTS;%(PreprocessorDefinitions);LSB_FIRST;HAVE_MKDIR;SIZEOF_DOUBLE=8;MEDNAFEN_VERSION="0.9.24";PACKAGE="mednafen";MEDNAFEN_VERSION_NUMERIC=924;PSS_STYLE=1;MPC_FIXED_POINT;ARCH_X86;WANT_PSX_EMU;STDC_HEADERS</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MEDNAFENPSXLIBRETRO_EXPORTS;%(PreprocessorDefinitions);LSB_FIRST;HAVE_MKDIR;SIZEOF_DOUBLE=8;MEDNAFEN_VERSION="0.9.24";PACKAGE="mednafen";MEDNAFEN_VERSION_NUMERIC=924;PSS_STYLE=1;MPC_FIXED_POINT;ARCH_X86;WANT_PSX_EMU;STDC_HEADERS;_CRT_SECURE_NO_WARNINGS</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)/../mednafen;$(SolutionDir)/../;$(SolutionDir)/../mednafen-libretro;$(SolutionDir)/../mednafen/intl;$(SolutionDir)/../mednafen/psx;$(SolutionDir)/../mednafen/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)/../mednafen;$(SolutionDir)/../;$(SolutionDir)/../mednafen-libretro;$(SolutionDir)/../mednafen/intl;$(SolutionDir)/../mednafen/psx;$(SolutionDir)/../mednafen/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
<Link> <Link>