Add python build. Fix ssize_t define.

This commit is contained in:
Themaister 2011-12-25 18:25:37 +01:00
parent c26f527c20
commit a4767d3d43
4 changed files with 18 additions and 11 deletions

View File

@ -23,7 +23,6 @@
#include "boolean.h"
#include <stdlib.h>
#include <stdint.h>
//#include <unistd.h>
#include "msvc/msvc_compat.h"
#include "input/keysym.h"

1
file.h
View File

@ -55,5 +55,4 @@ void fill_pathname_noext(char *out_path, const char *in_path, const char *replac
// Concatenates in_basename and replace to in_dir.
void fill_pathname_dir(char *in_dir, const char *in_basename, const char *replace, size_t size);
#endif

View File

@ -90,7 +90,7 @@
<ExceptionHandling>false</ExceptionHandling>
<FloatingPointModel>Precise</FloatingPointModel>
<CompileAs>CompileAsCpp</CompileAs>
<AdditionalOptions>/D HAVE_SDL /D PACKAGE_VERSION=\"0.9.3\" /D _CRT_SECURE_NO_WARNINGS /D HAVE_NETPLAY /D HAVE_THREADS /D HAVE_OPENGL /D HAVE_DYLIB /D HAVE_DYNAMIC /D HAVE_CG /D HAVE_XAUDIO /D HAVE_FBO /D HAVE_CONFIGFILE /D HAVE_DSOUND /D HAVE_FFMPEG /D HAVE_FFMPEG_ALLOC_CONTEXT3 /D HAVE_FFMPEG_AVCODEC_OPEN2 /D HAVE_FFMPEG_AVIO_OPEN /D HAVE_FFMPEG_AVFORMAT_WRITE_HEADER /D HAVE_FFMPEG_AVFORMAT_NEW_STREAM /D HAVE_X264RGB %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions>/D HAVE_SDL /D PACKAGE_VERSION=\"0.9.3\" /D _CRT_SECURE_NO_WARNINGS /D HAVE_NETPLAY /D HAVE_THREADS /D HAVE_OPENGL /D HAVE_DYLIB /D HAVE_DYNAMIC /D HAVE_CG /D HAVE_XAUDIO /D HAVE_FBO /D HAVE_CONFIGFILE /D HAVE_DSOUND /D HAVE_FFMPEG /D HAVE_FFMPEG_ALLOC_CONTEXT3 /D HAVE_FFMPEG_AVCODEC_OPEN2 /D HAVE_FFMPEG_AVIO_OPEN /D HAVE_FFMPEG_AVFORMAT_WRITE_HEADER /D HAVE_FFMPEG_AVFORMAT_NEW_STREAM /D HAVE_X264RGB /D HAVE_PYTHON %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
@ -108,7 +108,7 @@
<ExceptionHandling>false</ExceptionHandling>
<FloatingPointModel>Precise</FloatingPointModel>
<CompileAs>CompileAsCpp</CompileAs>
<AdditionalOptions>/D HAVE_SDL /D PACKAGE_VERSION=\"0.9.3\" /D _CRT_SECURE_NO_WARNINGS /D HAVE_NETPLAY /D HAVE_THREADS /D HAVE_OPENGL /D HAVE_DYLIB /D HAVE_DYNAMIC /D HAVE_CG /D HAVE_XAUDIO /D HAVE_FBO /D HAVE_CONFIGFILE /D HAVE_DSOUND /D HAVE_FFMPEG /D HAVE_FFMPEG_ALLOC_CONTEXT3 /D HAVE_FFMPEG_AVCODEC_OPEN2 /D HAVE_FFMPEG_AVIO_OPEN /D HAVE_FFMPEG_AVFORMAT_WRITE_HEADER /D HAVE_FFMPEG_AVFORMAT_NEW_STREAM /D HAVE_X264RGB %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions>/D HAVE_SDL /D PACKAGE_VERSION=\"0.9.3\" /D _CRT_SECURE_NO_WARNINGS /D HAVE_NETPLAY /D HAVE_THREADS /D HAVE_OPENGL /D HAVE_DYLIB /D HAVE_DYNAMIC /D HAVE_CG /D HAVE_XAUDIO /D HAVE_FBO /D HAVE_CONFIGFILE /D HAVE_DSOUND /D HAVE_FFMPEG /D HAVE_FFMPEG_ALLOC_CONTEXT3 /D HAVE_FFMPEG_AVCODEC_OPEN2 /D HAVE_FFMPEG_AVIO_OPEN /D HAVE_FFMPEG_AVFORMAT_WRITE_HEADER /D HAVE_FFMPEG_AVFORMAT_NEW_STREAM /D HAVE_X264RGB /D HAVE_PYTHON %(AdditionalOptions)</AdditionalOptions>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
</ClCompile>
<Link>
@ -126,7 +126,7 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalOptions>/D HAVE_SDL /D PACKAGE_VERSION=\"0.9.3\" /D _CRT_SECURE_NO_WARNINGS /D HAVE_NETPLAY /D HAVE_THREADS /D HAVE_OPENGL /D HAVE_DYLIB /D HAVE_DYNAMIC /D HAVE_CG /D HAVE_XAUDIO /D HAVE_FBO /D HAVE_CONFIGFILE /D HAVE_DSOUND /D HAVE_FFMPEG /D HAVE_FFMPEG_ALLOC_CONTEXT3 /D HAVE_FFMPEG_AVCODEC_OPEN2 /D HAVE_FFMPEG_AVIO_OPEN /D HAVE_FFMPEG_AVFORMAT_WRITE_HEADER /D HAVE_FFMPEG_AVFORMAT_NEW_STREAM /D HAVE_X264RGB %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions>/D HAVE_SDL /D PACKAGE_VERSION=\"0.9.3\" /D _CRT_SECURE_NO_WARNINGS /D HAVE_NETPLAY /D HAVE_THREADS /D HAVE_OPENGL /D HAVE_DYLIB /D HAVE_DYNAMIC /D HAVE_CG /D HAVE_XAUDIO /D HAVE_FBO /D HAVE_CONFIGFILE /D HAVE_DSOUND /D HAVE_FFMPEG /D HAVE_FFMPEG_ALLOC_CONTEXT3 /D HAVE_FFMPEG_AVCODEC_OPEN2 /D HAVE_FFMPEG_AVIO_OPEN /D HAVE_FFMPEG_AVFORMAT_WRITE_HEADER /D HAVE_FFMPEG_AVFORMAT_NEW_STREAM /D HAVE_X264RGB /D HAVE_PYTHON %(AdditionalOptions)</AdditionalOptions>
<CompileAs>CompileAsCpp</CompileAs>
<FloatingPointModel>Fast</FloatingPointModel>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@ -148,7 +148,7 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalOptions>/D HAVE_SDL /D PACKAGE_VERSION=\"0.9.3\" /D _CRT_SECURE_NO_WARNINGS /D HAVE_NETPLAY /D HAVE_THREADS /D HAVE_OPENGL /D HAVE_DYLIB /D HAVE_DYNAMIC /D HAVE_CG /D HAVE_XAUDIO /D HAVE_FBO /D HAVE_CONFIGFILE /D HAVE_DSOUND /D HAVE_FFMPEG /D HAVE_FFMPEG_ALLOC_CONTEXT3 /D HAVE_FFMPEG_AVCODEC_OPEN2 /D HAVE_FFMPEG_AVIO_OPEN /D HAVE_FFMPEG_AVFORMAT_WRITE_HEADER /D HAVE_FFMPEG_AVFORMAT_NEW_STREAM /D HAVE_X264RGB %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions>/D HAVE_SDL /D PACKAGE_VERSION=\"0.9.3\" /D _CRT_SECURE_NO_WARNINGS /D HAVE_NETPLAY /D HAVE_THREADS /D HAVE_OPENGL /D HAVE_DYLIB /D HAVE_DYNAMIC /D HAVE_CG /D HAVE_XAUDIO /D HAVE_FBO /D HAVE_CONFIGFILE /D HAVE_DSOUND /D HAVE_FFMPEG /D HAVE_FFMPEG_ALLOC_CONTEXT3 /D HAVE_FFMPEG_AVCODEC_OPEN2 /D HAVE_FFMPEG_AVIO_OPEN /D HAVE_FFMPEG_AVFORMAT_WRITE_HEADER /D HAVE_FFMPEG_AVFORMAT_NEW_STREAM /D HAVE_X264RGB /D HAVE_PYTHON %(AdditionalOptions)</AdditionalOptions>
<CompileAs>CompileAsCpp</CompileAs>
<FloatingPointModel>Fast</FloatingPointModel>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@ -182,6 +182,7 @@
<ClCompile Include="..\..\..\gfx\gfx_common.c" />
<ClCompile Include="..\..\..\gfx\gl.c" />
<ClCompile Include="..\..\..\gfx\image.c" />
<ClCompile Include="..\..\..\gfx\py_state\py_state.c" />
<ClCompile Include="..\..\..\gfx\sdl_gfx.c" />
<ClCompile Include="..\..\..\gfx\sdlwrap.c" />
<ClCompile Include="..\..\..\gfx\shader_cg.c" />
@ -226,6 +227,7 @@
<ClInclude Include="..\..\..\gfx\gfx_common.h" />
<ClInclude Include="..\..\..\gfx\gl_common.h" />
<ClInclude Include="..\..\..\gfx\image.h" />
<ClInclude Include="..\..\..\gfx\py_state\py_state.h" />
<ClInclude Include="..\..\..\gfx\sdlwrap.h" />
<ClInclude Include="..\..\..\gfx\shader_cg.h" />
<ClInclude Include="..\..\..\gfx\snes_state.h" />

View File

@ -19,16 +19,23 @@
#define __SSNES_MSVC_COMPAT_H
#ifdef _MSC_VER
#undef UNICODE
#undef UNICODE // Do not bother with UNICODE at this time.
#include <stddef.h>
#include <math.h>
#if defined(_WIN32)
typedef signed long ssize_t;
#elif defined(_WIN64)
typedef signed long long ssize_t;
// Python headers defines ssize_t and sets HAVE_SSIZE_T. Cannot duplicate these efforts.
#ifndef HAVE_SSIZE_T
#if defined(_WIN64)
typedef __int64 ssize_t;
#elif defined(_WIN32)
typedef int ssize_t;
#endif
#endif
#define snprintf _snprintf
// Disable some of the annoying warnings.
#pragma warning(disable : 4800)
#pragma warning(disable : 4244)
#pragma warning(disable : 4305)