Small portions of the changes by Fabrice Popineau <fabrice.popineau@supelec.fr>.
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 <sigset_t, ssize_t> [_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 <re_char> [_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
Assume support for memcmp, memcpy, memmove, memset.
This simplifies the code a bit. All current platforms have these,
as they are required for C89. If this turns into a problem we
can add the gnulib modules for these (a 1-line change to Makefile.in).
* configure.in: Don't check for memcmp, memcpy, memmove, memset.
[lib-src/ChangeLog]
Assume support for memcmp, memcpy, memmove, memset.
* etags.c (absolute_filename): Assume memmove exists.
[src/ChangeLog]
Assume support for memcmp, memcpy, memmove, memset.
* lisp.h, sysdep.c (memcmp, memcpy, memmove, memset):
* regex.c (memcmp, memcpy):
Remove; we assume C89 now.
* gmalloc.c (memcpy, memset, memmove): Remove; we assume C89 now.
(__malloc_safe_bcopy): Remove; no longer needed.
src/syntax.h (struct gl_state_s): Declare character position members
EMACS_INT.
src/syntax.c (update_syntax_table): Declare 2nd argument EMACS_INT.
src/textprop.c (verify_interval_modification, interval_of): Declare
arguments EMACS_INT.
src/intervals.c (adjust_intervals_for_insertion): Declare arguments
EMACS_INT.
src/intervals.h (CHECK_TOTAL_LENGTH): Cast to EMACS_INT, not `int'.
src/indent.c (Fvertical_motion): Local variable it_start is now
EMACS_INT.
src/regex.c (re_match, re_match_2, re_match_2_internal)
(bcmp_translate, regcomp, regexec, print_double_string)
(group_in_compile_stack, re_search, re_search_2, regex_compile)
(re_compile_pattern, re_exec): Declare arguments and local
variables `size_t' and `ssize_t' and return values `regoff_t', as
appropriate.
(POP_FAILURE_REG_OR_COUNT) <pfreg>: Declare `long'.
(CHECK_INFINITE_LOOP) <failure>: Declare `ssize_t'.
<compile_stack_type>: `size' and `avail' are now `size_t'.
src/regex.h <regoff_t>: Use ssize_t, not int.
(re_search, re_search_2, re_match, re_match_2): Arguments that
specify buffer/string position and length are now ssize_t and
size_t. Return type is regoff_t.
(WORDCHAR_P): Likewise. This one is never needed, but is used
only in a comment talking about a compiler bug, so put inside
the #if 0 of that comment.
(CHARSET_LOOKUP_BITMAP, FAIL_STACK_FULL, RESET_FAIL_STACK):
(PUSH_FAILURE_ELT, BUF_PUSH_3, STOP_ADDR_VSTRING):
Remove; unused.
* src/strftime.c (LOCALE_PARAM_DECL): Update for standard C.
(LOCALE_PARAM, LOCALE_PARAM_PROTO): Remove, unused.
(memcpy_lowcase, so_week_days, extra_args_spec, emacs_strftimeu):
Convert definitions to standard C.
* src/regex.c: Do not include <stdlib.h>, config.h does it.
Include unistd.h.
(xrealloc, init_syntax_once, re_match, regcomp, regexec)
(regerror, regfree): Convert definitions to standard C.
* src/mktime.c (my_mktime_localtime_r, ydhms_tm_diff, ranged_convert)
(__mktime_internal): Convert definitions to standard C.
* dired.c (file_name_completion_stat): Use DIRENTRY, not struct dirent.
* fileio.c (read_non_regular, read_non_regular_quit): Pass Lisp_Object,
as required by internal_condition_case_1.
* regex.c (bcmp_translate): Use RE_TRANSLATE_TYPE, not Lisp_Object.
(analyse_first): Fix "const const".
* syntax.h (SETUP_BUFFER_SYNTAX_TABLE): New macro.
(SETUP_SYNTAX_TABLE, SETUP_SYNTAX_TABLE_FOR_OBJECT):
* syntax.c (find_defun_start, Fchar_syntax, Fmatching_paren, skip_chars):
* regex.c (regex_compile): Use it.
(re_compile_pattern): Don't set gl_state.current_syntax_table since
it's now set in regex_compile when/if we need it.
* character.c (Fmultibyte_char_to_unibyte): Obey the docstring.
* regex.c (RE_CHAR_TO_UNIBYTE): Use the new macro.
(WEAK_ALIAS): Simplify.
* syntax.c (skip_chars): Don't mark non-byte chars in the fastmap
when searching a unibyte buffer.