From a6fc3b5c539c0a35e4447a12cc395294952d7561 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 5 Nov 2011 13:34:56 +0200 Subject: Support MSVC build with newer versions of Visual Studio. Small portions of the changes by Fabrice Popineau . src/makefile.w32-in (TAGS-gmake): Don't use $(patsubst ...), as Nmake barfs on that. Use $(OBJ*_c) variables instead, defined on nt/gmake.defs. src/lisp.h (ENUM_BF): New macro, for enumerated types in bitfields, which are not supported by MSVC. (Lisp_Symbol, Lisp_Misc_Any, Lisp_Marker, Lisp_Misc_Overlay) (Lisp_Save_Value, Lisp_Free): Use ENUM_BF for enumerated types in bitfields. (Lisp_Object) [USE_LISP_UNION_TYPE]: Use ENUM_BF for enumerated types in bitfields. (DEFUN) [_MSC_VER]: Define in a different way for MSVC. src/w32fns.c [_MSC_VER]: DECLARE_HANDLE for any MSVC version. src/w32.c: Don't include w32api.h for MSVC. (init_environment) [_MSC_VER]: Call sys_access, not _access. src/s/ms-w32.h [_MSC_VER]: Typedefs for MSVC. [_MSC_VER]: Include sys/timeb.h, sys/stat.h, and signal.h. (fstat, stat, utime) [_MSC_VER]: Redirect to their sys_* cousins. (malloc, free, realloc, calloc) [_MSC_VER]: Always redirect to the e_* cousins. (alloca) [_MSC_VER]: Define to _alloca. src/lisp.h (DECL_ALIGN) [_MSC_VER]: Define for MSVC. src/regex.c [_MSC_VER]: A separate definition for MSVC. nt/makefile.w32-in (clean-other-dirs-nmake) (distclean-other-dirs-nmake, maintainer-clean-other-dirs-nmake): Update for current structure of doc/ subdirectories. nt/gmake.defs (OBJ0_c, OBJ1_c, OBJ2_c): New variables. nt/INSTALL: Update for newer versions of MSVC. lib/makefile.w32-in (FRC): New dummy target. (TAGS): Depend on FRC. Fixes: debbugs:9960 --- src/regex.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/regex.c') diff --git a/src/regex.c b/src/regex.c index 8033ab9edaa..ccbad58abb3 100644 --- a/src/regex.c +++ b/src/regex.c @@ -530,7 +530,11 @@ init_syntax_once (void) #define MIN(a, b) ((a) < (b) ? (a) : (b)) /* Type of source-pattern and string chars. */ +#ifdef _MSC_VER +typedef unsigned char re_char; +#else typedef const unsigned char re_char; +#endif typedef char boolean; #define false 0 -- cgit v1.2.1