* nt/inc/ms-w32.h (_WIN32_WINNT_WIN2K, _WIN32_WINNT_WINXP)
(_WIN32_WINNT_WS03, _WIN32_WINNT_VISTA, _WIN32_WINNT_WIN7,
_WIN32_WINNT_WIN8, _WIN32_WINNT_WINBLUE, _WIN32_WINNT_WIN10)
[__MINGW32__]: Define if any of these is not defined. Reported by
martin rudalics <rudalics@gmx.at>.
* src/sysdep.c (emacs_exec_file): Don't compile this function
anymore on WINDOWSNT, since it is not used there. This function
was the only reason for having 'execve' prototype in ms-w32.h.
* nt/inc/ms-w32.h (execve): Remove prototype and the MinGW64 vs
ming.org mess that it causes.
This is a preventive change, since Gnulib was recently changed
its explicit_bzero to call SecureZeroMemory on MS-Windows,
disregarding systems older than XP, which didn't have it.
* src/w32.c (explicit_bzero): New function.
* nt/mingw-cfg.site (ac_cv_func_explicit_bzero): Avoid using the
Gnulib replacement for explicit_bzero.
* nt/inc/ms-w32.h (explicit_bzero): Add prototype.
* src/w32.c (fdutimens): Call utimensat instead of utime.
(set_file_times): Function deleted.
(convert_from_timespec): Renamed from convert_from_time_t and
modified to accept 'struct timespec' argument instead of 'time_t'.
(utimensat): Renamed from utime and modified to accept 'struct
timespec [2]' argument and an additional argument FLAG. Emulate
Posix 'utimensat'. Call 'convert_from_timespec'.
(w32_copy_file): Call 'utimensat' instead of 'set_file_times'.
* src/fileio.c (Fcopy_file) [WINDOWSNT]: Make the error message be
identical to that on Posix platforms.
* nt/inc/sys/stat.h (utimensat): Provide prototype.
* nt/mingw-cfg.site (ac_cv_func_futimens)
(gl_cv_func_futimens_works, ac_cv_func_utimensat)
(gl_cv_func_utimensat_works): Override Gnulib tests.
* nt/gnulib-cfg.mk (OMIT_GNULIB_MODULE_futimens)
(OMIT_GNULIB_MODULE_utimensat): Disable these Gnulib modules.
* src/w32heap.c (sys_calloc): New function, implements calloc
in terms of our private implementations of malloc.
* nt/inc/ms-w32.h (calloc): Redirect to sys_calloc.
Bug#38218
* src/process.c (Fnetwork_interface_list): Extend argument list to
allow requesting full network info and/or IPv4/IPv6 info.
(network_interface_list) [HAVE_GETIFADDRS]: Use getifaddrs to retrieve
interface IP addresses.
* src/process.h: Update prototype of network_interface_list.
* src/w32.c (g_b_init_get_adapters_addresses): New init flag.
(globals_of_w32): Initialize it.
(GetAdaptersAddresses_Proc): New function typedef.
(get_adapters_addresses): New wrapper function.
(init_winsock): Load htonl and ntohl.
(sys_htonl, sys_ntohl): New wrapper functions.
(network_interface_list): Implement in terms of
get_adapters_addresses.
* nt/inc/sys/socket.h: Add sys_htonl and sys_ntohl prototypes.
* etc/NEWS: Announce IPv4/IPv6 changes in network-interface-list.
* doc/lispref/processes.texi (Misc Network): Document updated arglist
and return values for network-interface-list.
* src/w32proc.c (LOCALE_IPAPERSIZE): Define if undefined.
(nl_langinfo): Support _NL_PAPER_WIDTH and _NL_PAPER_HEIGHT
like glibc does.
* src/fns.c (Flocale_info): Update the doc string.
* nt/inc/langinfo.h: Add _NL_PAPER_WIDTH and _NL_PAPER_HEIGHT
to the enumeration.
(_NL_PAPER_WIDTH, _NL_PAPER_HEIGHT): Define namesake macros.
* nt/mingw-cfg.site (emacs_cv_langinfo__nl_paper_width): Set
to 'yes'.
* doc/lispref/nonascii.texi (Locales): Update the
documentation of 'locale-info' for the argument of 'paper'.
* etc/NEWS: Update the locale-info entry.
Recent changes in sysdep.c and emacsclient unnecessarily
removed useful code from DOS_NT builds. This changeset
reinstates that code.
* nt/inc/ms-w32.h (tcdrain): Redirect to _commit.
(fdatasync): No need to redirect anymore.
* lib-src/emacsclient.c (flush_stdout): Don't avoid calling
tcdrain on DOS_NT platforms.
* src/sysdep.c (reset_sys_modes): Don't ifdef away the call to
tcdrain on DOS_NT platforms.
* nt/inc/ms-w32.h (__POSIX_2008_DEPRECATED)
[__MINGW32_VERSION >= 5001000L]: Define to nothing, to avoid
deprecation warnings about gettimeofday with mingw.org's MinGW
runtime 5.1 and later.
* lib-src/ntlib.h (mkdir, open): Remove redefinitions. They are
now in nt/inc/ms-w32.h.
* lib-src/ntlib.c (sys_mkdir, sys_open): New functions.
(mkostemp): Remove.
* src/w32.c (mkostemp): Remove.
(sys_mkdir): Accept a second (unused) argument.
* src/fileio.c (Fmake_directory_internal): Remove the WINDOWSNT
specific call to mkdir. (Bug#28023)
* nt/inc/ms-w32.h (mkdir): Remove from "#ifdef emacs" and redefine
to accept 2 arguments.
(open): Remove from "#ifdef emacs".
* nt/mingw-cfg.site (ac_cv_func_mkostemp): Remove.
* nt/gnulib-cfg.mk (OMIT_GNULIB_MODULE_mkostemp)
(OMIT_GNULIB_MODULE_tempname): Remove.
* nt/inc/sys/time.h (_TIMEVAL_DEFINED, struct timevat, timerisset)
(timercmp, timerclear): Don't define. Instead, include the system
header sys/time.h, and add only the interval timers stuff. This
avoids compiler warnings about 'gettimeofday's prototype, and also
avoids redefinition of macros from system headers.
* lib-src/ntlib.c (gettimeofday):
* nt/inc/sys/time.h (gettimeofday, struct timezone): Remove unused
function 'gettimeofday' and all of its supporting code.
* nt/inc/ms-w32.h (WIN32_LEAN_AND_MEAN): Define to an empty value,
to be consistent with Gnulib's utimens.c. This is because utimens.c
unconditionally defines WIN32_LEAN_AND_MEAN to an empty value, so the
previous definition here conflicted with that.
* src/w32heap.c (getrlimit, setrlimit): New functions.
Include w32.h.
* src/emacs.c (main): Use 'rlim_t', not 'long', for values that
should be compatible with 'struct rlimit' members.
* nt/inc/sys/resource.h: New header file.
* nt/mingw-cfg.site (ac_cv_func_getrlimit, ac_cv_func_setrlimit):
Set to "yes".
* nt/inc/ms-w32.h (_WIN32_WINNT) [!MINGW_W64]: Undefine before
defining to avoid redefinition warnings.
* nt/inc/sys/stat.h (_SYS_STAT_H, _INC_STAT_H): Define, to avoid
inclusion of sys/stat.h from the system headers, which could then
lead to compilation errors due to redefinition of 'struct stat'
etc. This is needed because latest versions of MinGW runtime
include sys/stat.h from wchar.h.
* src/image.c (__MINGW_MAJOR_VERSION) [WINDOWSNT]: Temporarily
redefine to 4 to avoid conflict between 2 definitions of
MemoryBarrier. (Bug#24613)
* nt/inc/ms-w32.h (_WIN32_WINNT) [!MINGW_W64]: Undefine before
defining to avoid redefinition warnings.
* nt/inc/sys/stat.h (_SYS_STAT_H, _INC_STAT_H): Define, to avoid
inclusion of sys/stat.h from the system headers, which could then
lead to compilation errors due to redefinition of 'struct stat'
etc. This is needed because latest versions of MinGW runtime
include sys/stat.h from wchar.h.
* src/image.c (__MINGW_MAJOR_VERSION) [WINDOWSNT]: Temporarily
redefine to 4 to avoid conflict between 2 definitions of
MemoryBarrier. (Bug#24613)
Do not merge to master!
* nt/inc/ms-w32.h: Include stdint.h.
(_execvp, execve): Provide prototypes.
* lib-src/emacsclient.c [WINDOWSNT]: Remove prototype for execvp,
it is now in nt/inc/ms-w32.h.
* lib-src/ntlib.c (getppid): Avoid compiler warnings due to format
mismatch.
(sys_ctime): Remove, not used.
facb5e2 Update Emacs manual section related to character folding
4efea8e ; * etc/DEBUG: Fix a typo. (Bug#22984)
f8df21b Update admin/notes/unicode
950be68 Add symref-filepattern entries for c?perl-mode
8b8a6ad Don't use XRANDR 1.3 extensions if the server doesn't support them.
985dacf ; NEWS update for the last change in etags
741a6f8 Sync with gnulib
7352c6c Rework C source files to avoid ^(
a589e9a By default, etags produces unqualified Perl tag names
72c7438 Indent methods with keyword names correctly
28532a9 Propertize character literals and special global variables
differently
a7d6f39 ; Fix last change in NEWS
83b2a20 Change how /etc/NEWS presents character folding
b417c5a Revert "Revert "Backport: * lisp/isearch.el: Turn char-folding
off by default""
711ca36 Properly handle lambda as read function (bug 22961)
1b9d616 Propertize operator symbol names with symbol syntax class
9b16bc2 Stop recognizing :#{} as symbol in ruby-mode
366ec77 Allow using the left shift operator without spaces on both sides
02bf7cc Properly handle unquoting in wdired (bug 22938)
16cf469 ; Spelling fix and tighten up comment
f50bc04 Allow splat operator before percent literal
991c801 Don't apply the return value of goto-char as syntax class
6e63b3e Guard against nested percent literals
066f3bc Recognize iuwu-mod after an escaped newline
6f7a57c Fix symbolic mode string conversion for s and t
50b9826 Update 'ucs-names' database
993b2fb Improve doc string of 'shell-command'
b71c717 Make the code in movemail_strftime more general
cc057e4 Speed up redisplay of binary files with long series of nulls
e51b27e Remove the highlighting support for quoting 'like this' inside
Lisp docstrings
b1abce1 Restore leading space in movemail pop output
98b8d44 Fix bidi-paragraph-direction in Rmail view buffer
dc9d837 Don't misindent computed property generator methods
7923112 Fix mbox files produced by movemail on MS-Windows
c45a1ca doc string file descriptor exhaustion fix
265141b Fix Bug#22814
Work around Bug#22884 by rewording comments and strings to avoid ‘(’
at the start of a line unless it starts a function. This change
is a short-term hack; in the longer run we plan to fix cc-mode’s
performance for C files that have ‘(’ at the start of a line in a
comment or string.
See http://lists.gnu.org/archive/html/emacs-devel/2016-02/msg01602.html
for more details.
* nt/mingw-cfg.site (ac_cv_func_getaddrinfo)
(ac_cv_func_gai_strerror): Set to "yes", as the configure script's
test program is not smart enough to auto-detect these.
* nt/inc/sys/socket.h (getaddrinfo, freeaddrinfo): Redirect to
sys_getaddrinfo and sys_freeaddrinfo. Provide prototypes for
sys_getaddrinfo and sys_freeaddrinfo.
* src/w32.c (init_winsock): Try loading getaddrinfo and
freeaddrinfo from ws2_32.dll.
(sys_getaddrinfo, sys_freeaddrinfo): New functions.
* lib-src/pop.c [WINDOWSNT]: Include winsock2.h, not winsock.h,
and also ws2tcpip.h.
(getaddrinfo, freeaddrinfo) [WINDOWSNT]: Redirect to
sys_getaddrinfo and sys_freeaddrinfo, respectively.
(load_ws2, sys_getaddrinfo, sys_freeaddrinfo) [WINDOWSNT]: New
functions.
* src/w32heap.c (init_heap): Redirect malloc, realloc, and free to
special functions on Windows 9X. Refuse to dump Emacs on Windows 9X.
(malloc_after_dump_9x, realloc_after_dump_9x)
(free_after_dump_9x): New functions. (Bug#22379) See also
http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00852.html
for more details about the original problem.
* nt/inc/ms-w32.h (malloc_after_dump_9x, realloc_after_dump_9x)
(free_after_dump_9x): Add prototypes.
Copyright-paperwork-exempt: yes
* src/w32fns.c (w32_reset_stack_overflow_guard)
(stack_overflow_handler): New functions for handling C stack
overflow exceptions.
(my_exception_handler): Handle EXCEPTION_STACK_OVERFLOW exceptions
specially, and zero out except_addr if we do.
(globals_of_w32fns): Initialize dwMainThreadId in non-interactive
mode.
* src/sysdep.c [HAVE_STACK_OVERFLOW_HANDLING]: Add !WINDOWSNT to
the condition, as HAVE_STACK_OVERFLOW_HANDLING is now defined for
the MinGW build, but the code guarded by that is for Posix hosts.
* src/keyboard.c (command_loop) [WINDOWSNT]: Call
w32_reset_stack_overflow_guard.
* nt/inc/ms-w32.h (sigjmp_buf): New typedef.
(sigsetjmp): New macro.
(w32_reset_stack_overflow_guard): Declare the prototype.
* configure.ac (HAVE_STACK_OVERFLOW_HANDLING): Set to 1 for MinGW.
* nt/mingw-cfg.site (ac_cv_header_pthread_h)
(gl_cv_sys_struct_timespec_in_pthread_h): Force to "no", to avoid
picking up 'struct timespec' from pthread.h, if it is installed on
the user's system. We want either the definitions from MinGW
system headers, if available, or the Gnulib replacements if not.
* nt/inc/ms-w32.h <struct timespec>: Don't define, as we now use
lib/time.h.
* lib/time.in.h: Don't let __need_* symbols affect what happens on
MinGW. These symbols are defined by MinGW system headers, but we
don't want that to affect whether Gnulib portions of the header
are or aren't used.