1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00
Commit Graph

212 Commits

Author SHA1 Message Date
Eli Zaretskii
cae528457c ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
Stefan Kangas
6f48b46b03 ; Fix typos 2022-11-11 15:52:37 +01:00
Eli Zaretskii
53e8f00111 Emulate 'clock' for MS-Windows
* src/w32.c (sys_clock): New function.  (Bug#44674)
* nt/inc/ms-w32.h (clock): Redirect to sys_clock.
2022-04-27 21:06:55 +03:00
Eli Zaretskii
19dcb237b5 ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
Paul Eggert
ba05d005e5 Update copyright year to 2021
Run "TZ=UTC0 admin/update-copyright".
2021-01-01 01:13:56 -08:00
Eli Zaretskii
9d5b675f2c Fix MS-Windows compilation of Gnulib with old versions of MinGW
* 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>.
2020-09-15 18:09:03 +03:00
Eli Zaretskii
360d7c716d Remove private prototype for 'execve' and its uses in MinGW build
* 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.
2020-05-30 13:56:20 +03:00
Eli Zaretskii
3f8b771da9 Don't use Gnulib's explicit_bzero on MS-Windows
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.
2020-04-19 19:38:53 +03:00
Eli Zaretskii
66bc47d12a Fix the MinGW build as followup to recent "nofollow" changes
* 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.
2020-03-08 17:00:10 +02:00
Glenn Morris
215d9fcb79 Merge from origin/emacs-27
52080b5778 (origin/emacs-27) * lisp/minibuffer.el (read-file-name-def...
e4cec1fd10 ; * etc/NEWS: Fix some file name quotations.
13995f31a2 Make emacs prefer an existing ~/.emacs.d to an existing XD...
91cac24952 ; etc/NEWS minor edits
5505babc07 Describe --with-cairo non-support for bitmapped fonts.
caf00066ee Mention GTK font chooser changes in NEWS
23b87db628 ; Unmaintain fortran elisp
3b0d1a50aa f90: handle F2008 module function
55803cc189 Move shell-related menu items to "Shell Commands" submenu ...
2be48605c0 * admin/notes/font-backend: Remove outdated file. (Bug#34663)
f07a470124 Declare the ftx font backend driver obsolete
6c08a430fb ; Fix wording of a comment.

# Conflicts:
#	admin/notes/font-backend
#	etc/NEWS
2020-01-16 07:50:22 -08:00
Eli Zaretskii
6c08a430fb ; Fix wording of a comment.
* nt/inc/ms-w32.h (BROKEN_DATAGRAM_SOCKETS): Fix wording of
commentary.
2020-01-15 18:28:44 +02:00
Eli Zaretskii
2b6d702e5d Fix the MS-Windows build broken by "Let the OS clear large new objects"
* 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.
2020-01-03 18:27:35 +02:00
Paul Eggert
365e01cc9f Update copyright year to 2020
Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
2020-01-01 00:59:52 +00:00
Robert Pluim
650a514e99 Extend network-interface-list to return IPv6 and network info
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.
2019-11-26 08:46:13 +01:00
Eli Zaretskii
f37000aeb2 Support (locale-info 'paper) on MS-Windows
* 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.
2019-02-04 18:05:59 +02:00
Paul Eggert
ba809612c0 Merge from origin/emacs-26
2fcf2df Fix copyright years by hand
26bed8b Update copyright year to 2019
2814292 Fix value of default frame height.  (Bug#33921)
2018-12-31 17:57:29 -08:00
Paul Eggert
26bed8ba10 Update copyright year to 2019
Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
2019-01-01 01:01:13 +00:00
Eli Zaretskii
2ff9dca17c Fix WINDOWSNT/DOS_NT build
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.
2018-12-03 12:29:34 +02:00
Eli Zaretskii
414a4969b9 Avoid gettimeofday deprecation warnings with MinGW
* 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.
2018-07-29 20:07:09 +03:00
Eli Zaretskii
bd52f37cae ; Fix last change: only MinGW runtime 5.0.2 and later needs that. 2018-07-28 17:21:53 +03:00
Eli Zaretskii
024d20f81e Fix compilation with mingw.org's MinGW 5.x headers 2018-07-28 15:34:00 +03:00
Paul Eggert
5c7dd8a783 Update copyright year to 2018
Run admin/update-copyright.
2018-01-01 00:57:59 -08:00
Paul Eggert
cbc8324488 Prefer HTTPS to HTTP for gnu.org
This catches some URLs I missed in my previous scan,
or perhaps were added after the scan.
2017-09-29 17:48:22 -07:00
Eli Zaretskii
8cc8ad02bd Use Gnulib 'tempname' on MS-Windows
* 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.
2017-08-12 11:29:37 +03:00
Eli Zaretskii
3241c84fd8 Remove unneeded stuff from nt/inc/sys/time.h
* 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.
2017-05-15 22:45:57 +03:00
Eli Zaretskii
792ffa0223 Remove gettimeofday from w32 sources
* lib-src/ntlib.c (gettimeofday):
* nt/inc/sys/time.h (gettimeofday, struct timezone): Remove unused
function 'gettimeofday' and all of its supporting code.
2017-05-14 19:02:50 +03:00
Eli Zaretskii
3af6909f32 Fix the MS-Windows build
* nt/inc/sys/time.h (gettimeofday):
* src/w32.c (gettimeofday): Adjust signature to match Gnulib.
2017-05-14 17:53:39 +03:00
Eli Zaretskii
53348c6b9f ; Remove redundant definition of the 'DebPrint' macro
* nt/inc/ms-w32.h (DebPrint): Remove redundant definition (defined
in src/conf_post.h).
2017-05-04 18:11:53 +03:00
Eli Zaretskii
b7c5af2bbd Temporary fix for the MS_Windows build
* 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.
2017-05-02 09:24:25 +03:00
Paul Eggert
e6a782ee1a Update copyright year to 2017 in master
Run admin/update-copyright in the master branch.  This fixes files
that were not already fixed in the emacs-25 branch before it was
merged here.
2017-01-01 01:48:59 -08:00
Paul Eggert
bcf244ef9b Merge from origin/emacs-25
2e2a806 Fix copyright years by hand
5badc81 Update copyright year to 2017
2017-01-01 01:10:47 -08:00
Paul Eggert
5badc81c1c Update copyright year to 2017
Run admin/update-copyright.
2016-12-31 19:42:26 -08:00
Eli Zaretskii
de4624c99e Merge branch 'concurrency'
Conflicts (resolved):
	configure.ac
	src/Makefile.in
	src/alloc.c
	src/bytecode.c
	src/emacs.c
	src/eval.c
	src/lisp.h
	src/process.c
	src/regex.c
	src/regex.h
2016-12-04 19:59:17 +02:00
Eli Zaretskii
4cdd14eabe Implement getrlimit and setrlimit for MS-Windows
* 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".
2016-11-19 12:17:23 +02:00
Eli Zaretskii
d48369db9c Fix compilation with MinGW runtime 3.22.2 and w32api 3.18.2
* 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)
2016-10-06 18:11:43 +03:00
Eli Zaretskii
34b6df19a4 Fix compilation with MinGW runtime 3.22.2 and w32api 3.18.2
* 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!
2016-10-06 18:08:31 +03:00
Eli Zaretskii
0c94b84708 * nt/inc/ms-w32.h (execve) [MINGW_W64]: Make commentary more accurate. 2016-09-01 20:15:25 +03:00
Eli Zaretskii
51b14b1f53 Avoid compiler warnings with MinGW64 GCC 6
* nt/inc/ms-w32.h (execve) [MINGW_W64]: Make the prototype match
the GCC 6 builtin, to avoid warnings.  For more details, see
http://lists.gnu.org/archive/html/emacs-devel/2016-08/msg00721.html.
2016-09-01 17:12:12 +03:00
Eli Zaretskii
d0e1774a58 Fix compilation warning in the MinGW build
* 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.
2016-07-22 20:38:22 +03:00
John Wiegley
63efcc2686 Merge from origin/emacs-25
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
2016-03-11 13:33:32 -08:00
Paul Eggert
7352c6c695 Rework C source files to avoid ^(
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.
2016-03-10 07:59:19 -08:00
Eli Zaretskii
69e03ddccf Unbreak the MinGW64 build
* nt/inc/ms-w32.h [MINGW_W64]: Undefine HAVE_GAI_STRERROR.  See
http://lists.gnu.org/archive/html/emacs-devel/2016-03/msg00130.html
for the details.  Reported by Angelo Graziosi
<angelo.graziosi@alice.it>.
2016-03-06 18:52:32 +02:00
Eli Zaretskii
bc96f6e827 Implement getaddrinfo fallback for MS-Windows
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.
2016-03-05 12:12:58 +02:00
Jussi Lahdenniemi
15c23aaf83 Ensure 8-byte aligned memory allocation on MS-Windows 9X
* 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
2016-01-16 11:11:12 +02:00
Paul Eggert
0e963201d0 Update copyright year to 2016
Run admin/update-copyright.
2016-01-01 01:34:24 -08:00
Eli Zaretskii
470e3028d8 Fix the MS-Windows build
* src/thread.h [WINDOWSNT]: Include sys/socket.h.

* src/sysselect.h: Don't define fd_set and FD_* macros for
MS-Windows here.
* src/w32.h: Define them here.

* src/process.h (sys_select): Declare prototype.

* src/sysdep.c:
* src/process.c:
* src/filelock.c:
* src/emacs.c:
* src/callproc.c: Move inclusion of sys/select.h after lisp.h.
* nt/inc/socket.h: Include w32.h instead of sysselect.h
2015-11-02 19:04:06 +02:00
Ken Raeburn
39372e1a10 merge from trunk 2015-11-01 01:42:21 -04:00
Eli Zaretskii
7afa4f300b Support recovery from C stack overflow on MS-Windows
* 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.
2015-08-08 11:12:06 +03:00
Eli Zaretskii
70096743d5 MS-Windows follow-up for recent TZ-related changes
* 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.
2015-07-27 15:16:06 +03:00
Eli Zaretskii
aa83b5ecb0 Adapt 'struct timespec' to next release of MinGW runtime
* nt/inc/ms-w32.h (struct timespec): Don't declare if
__struct_timespec_defined is defined.
2015-06-07 18:36:25 +03:00