[pypy-commit] pypy py3.5: win32 does not have stdint.h, work around
mattip
pypy.commits at gmail.com
Sun Apr 9 07:49:00 EDT 2017
Author: Matti Picus <matti.picus at gmail.com>
Branch: py3.5
Changeset: r91020:afb359dd552e
Date: 2017-04-09 14:48 +0300
http://bitbucket.org/pypy/pypy/changeset/afb359dd552e/
Log: win32 does not have stdint.h, work around
diff --git a/lib_pypy/_decimal_build.py b/lib_pypy/_decimal_build.py
--- a/lib_pypy/_decimal_build.py
+++ b/lib_pypy/_decimal_build.py
@@ -226,6 +226,16 @@
_libdir = os.path.join(os.path.dirname(__file__), '_libmpdec')
ffi.set_source('_decimal_cffi',
"""
+#ifdef _MSC_VER
+ #if defined(_WIN64)
+ typedef __int64 LONG_PTR;
+ #else
+ typedef long LONG_PTR;
+ #endif
+ typedef LONG_PTR ssize_t;
+#else
+ #define HAVE_STDINT_H
+#endif
#include "mpdecimal.h"
#define MPD_Float_operation MPD_Not_implemented
@@ -266,7 +276,6 @@
include_dirs=[_libdir],
extra_compile_args=[
"-DANSI",
- "-DHAVE_STDINT_H",
"-DHAVE_INTTYPES_H",
"-DCONFIG_64" if sys.maxsize > 1 << 32 else "-DCONFIG_32",
],
More information about the pypy-commit
mailing list