From 4a3418502c34b22d6d8533561cd8476527a831da Mon Sep 17 00:00:00 2001 From: Yuguo Zhang Date: Tue, 8 Aug 2017 13:14:15 +0800 Subject: [PATCH 1/2] minor MSVC version modifications due to C99 compilance, you need msvc 2013 at least to build ECL. --- msvc/ecl/config-internal.h.msvc6 | 2 +- msvc/ecl/config.h.msvc6 | 2 +- src/h/ecl.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/msvc/ecl/config-internal.h.msvc6 b/msvc/ecl/config-internal.h.msvc6 index b405393e7..438c8b30d 100644 --- a/msvc/ecl/config-internal.h.msvc6 +++ b/msvc/ecl/config-internal.h.msvc6 @@ -198,7 +198,7 @@ #endif #define strcasecmp _stricmp -#if defined(_MSC_VER) && (_MSC_VER < 1900) +#if defined(_MSC_VER) && (_MSC_VER < 1800) #define isnan _isnan #endif #define finite _finite diff --git a/msvc/ecl/config.h.msvc6 b/msvc/ecl/config.h.msvc6 index cc760a729..af1c67a8d 100755 --- a/msvc/ecl/config.h.msvc6 +++ b/msvc/ecl/config.h.msvc6 @@ -210,7 +210,7 @@ typedef unsigned char ecl_base_char; /* #undef HAVE_FLOAT_COMPLEX */ /* Missing integer types */ -#if _MSC_VER < 1900 +#if _MSC_VER < 1600 typedef signed char int8_t; typedef signed short int16_t; typedef signed int int32_t; diff --git a/src/h/ecl.h b/src/h/ecl.h index 0515917dd..dc2cb0f44 100644 --- a/src/h/ecl.h +++ b/src/h/ecl.h @@ -28,7 +28,7 @@ #include /* setjmp and buffers */ #include /* FILE */ /* Microsoft VC++ does not have va_copy() */ -#if ( defined(_MSC_VER) && (_MSC_VER < 1900) ) || !defined(va_copy) +#if ( defined(_MSC_VER) && (_MSC_VER < 1800) ) || !defined(va_copy) #define va_copy(dst, src) \ ((void) memcpy(&(dst), &(src), sizeof(va_list))) #endif From 74b673479ecf905b536b725d6c609f95539425b3 Mon Sep 17 00:00:00 2001 From: Yuguo Zhang Date: Tue, 8 Aug 2017 14:10:58 +0800 Subject: [PATCH 2/2] using 16bit unicode on windows platform. because windows using utf16 internally, by using 16bit unicode chararcter, there is no need to convert ecl_character to wchar_t in embedding environment. --- msvc/c/Makefile | 7 +++---- msvc/ecl/config.h.msvc6 | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/msvc/c/Makefile b/msvc/c/Makefile index e0b33570f..e4b3204c3 100755 --- a/msvc/c/Makefile +++ b/msvc/c/Makefile @@ -20,10 +20,9 @@ THREADS_OBJ= !endif !if "$(ECL_UNICODE)" != "" -ECL_UNICODE_FLAG=21 -ECL_UCD_OBJ = ucd.obj ucd-0000.obj ucd-0016.obj \ - ucd-0032.obj ucd-0048.obj ucd-0064.obj \ - ucd-0080.obj ucd-0096.obj +ECL_UNICODE_FLAG=16 +ECL_UCD_OBJ = ucd16.obj ucd16-0000.obj ucd16-0016.obj \ + ucd16-0032.obj ucd16-0048.obj ucd16-0064.obj !else ECL_UNICODE_FLAG=0 !endif diff --git a/msvc/ecl/config.h.msvc6 b/msvc/ecl/config.h.msvc6 index af1c67a8d..2ec93f60e 100755 --- a/msvc/ecl/config.h.msvc6 +++ b/msvc/ecl/config.h.msvc6 @@ -155,11 +155,11 @@ typedef unsigned int cl_hashkey; * The character type */ #ifdef ECL_UNICODE -#define ECL_CHAR_CODE_LIMIT 1114112 /* unicode character code limit */ +#define ECL_CHAR_CODE_LIMIT 65536 /* unicode character code limit */ #else #define ECL_CHAR_CODE_LIMIT 256 /* unicode character code limit */ #endif -typedef int ecl_character; +typedef short ecl_character; typedef unsigned char ecl_base_char; /*