(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/stat.h>
#include <unistd.h>
#include "CDAccess.h"

View File

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

View File

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

View File

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

View File

@ -22,7 +22,6 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <string>
#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)
{
#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)
{
ai[0] = value_32;
ai[1] = value_32;
}
#endif
}
#endif

View File

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

View File

@ -20,6 +20,7 @@
#undef UNICODE // Do not bother with UNICODE at this time.
#include <stddef.h>
#include <io.h>
#include <math.h>
// Python headers defines ssize_t and sets HAVE_SSIZE_T. Cannot duplicate these efforts.
@ -32,9 +33,17 @@ typedef int ssize_t;
#endif
#define snprintf _snprintf
#define strtoll _strtoi64
#define strtoull _strtoui64
#undef strcasecmp
#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.
#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))
#ifndef PATH_MAX
#define PATH_MAX _MAX_PATH
#define PATH_MAX MAX_PATH
#endif
#endif

View File

@ -20,13 +20,13 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@ -50,7 +50,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<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>
</ClCompile>
<Link>
@ -66,7 +66,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<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>
</ClCompile>
<Link>