Author: Amaury Forgeot d'Arc <[email protected]>
Branch:
Changeset: r44149:b1ee25246024
Date: 2011-05-13 18:14 +0000
http://bitbucket.org/pypy/pypy/changeset/b1ee25246024/
Log: Try to fix translation on Windows (with VS2008)
diff --git a/pypy/translator/c/src/cjkcodecs/multibytecodec.h
b/pypy/translator/c/src/cjkcodecs/multibytecodec.h
--- a/pypy/translator/c/src/cjkcodecs/multibytecodec.h
+++ b/pypy/translator/c/src/cjkcodecs/multibytecodec.h
@@ -4,19 +4,14 @@
#include <stddef.h>
-#include <stdint.h>
#include <assert.h>
-#ifndef _WIN32
-#include <unistd.h>
-#endif
-
#ifdef _WIN64
typedef __int64 ssize_t
+#elif defined(_WIN32)
+typedef int ssize_t;
#else
-#ifdef _WIN32
-typedef int ssize_t;
-#endif
+#include <unistd.h>
#endif
#ifndef Py_UNICODE_SIZE
@@ -30,8 +25,15 @@
#define PY_SSIZE_T_MAX ((Py_ssize_t)(((size_t) -1) >> 1))
#endif
+#ifdef _WIN32
+typedef unsigned int ucs4_t;
+typedef unsigned short ucs2_t, DBCHAR;
+#else
+#include <stdint.h>
typedef uint32_t ucs4_t;
typedef uint16_t ucs2_t, DBCHAR;
+#endif
+
typedef union {
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit