* Makefile.in (lispdirrel): Add replace template.
(epaths-force): Form correctly 'PATH_REL_LOADSEARCH' into epath.h
* configure.ac (lispdirrel): Define variable (relative path of the
lisp files from the installation directory).
* src/comp.c (Fcomp_el_to_eln_filename): Update algorithm not to
rely on 'PATH_DUMPLOADSEARCH' but on 'PATH_REL_LOADSEARCH'.
* src/epaths.in (PATH_REL_LOADSEARCH): Add macro template.
Inspired by a straightforward patch by Bruno Haible.
* admin/merge-gnulib (GNULIB_MODULES): Add sigdescr_np.
* configure.ac: Do not check for sys_siglist or __sys_siglist.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib/sigdescr_np.c, m4/sigdescr_np.m4: New files, copied from Gnulib.
* src/sysdep.c (sys_siglist, sys_siglist_entries): Remove.
(init_signals): Do not initialize sys_siglist.
(safe_strsignal): Use sigdescr_np instead of sys_siglist.
Generate eln filename hashing also the source file content in the form:
/absolute/path/filename.el + content ->
eln-cache/filename-path_hash-content_hash.eln
* src/lread.c (maybe_swap_for_eln): Always call
Fcomp_el_to_eln_filename on an existing source file.
* src/comp.c (md5.h, sysstdio.h, zlib.h): New include.
(comp_hash_string): Use md5 instead of sha512.
(MD5_BLOCKSIZE): New macro.
(accumulate_and_process_md5, final_process_md5, md5_gz_stream)
(comp_hash_source_file): New functions.
(Fcomp_el_to_eln_filename): Rework for hasing using also source
file content.
* src/lread.c (maybe_swap_for_eln): Rename el_name -> src_name as
this can be also a have .el.gz extention.
* configure.ac (OPTION_DEFAULT_IFAVAILABLE): New macro. Use it to
define the --with-json option. Add with_json and HAVE_JSON to the
'MISSING' checks (bug#39953).
Co-authored-by: Jaesup Kwak <veshboo@gmail.com>
* configure.ac: Allow '--with-xwidgets' for "${NS_IMPL_COCOA}".
* etc/NEWS: Mention new feature.
* etc/TODO: Remove done TODO to implement xwidget in NeXTstep port.
* lisp/xwidget.el (xwidget-webkit-clone-and-split-below)
(xwidget-webkit-clone-and-split-right): New procedures.
(xwidget-webkit-callback): Remove call to
'xwidget-webkit-adjust-size-to-window' as adjusting xwidget size is
handled in 'x_draw_xwidget_glyph_string'.
(xwidget-webkit-enable-plugins): New variable.
* nextstep/templates/Info.plist.in: Add 'NSAppTransportSecurity'.
* src/Makefile.in: Add nsxwidget.o for compilation.
* src/emacs.c (main): Move conditional call to 'syms_of_xwidget'.
* src/nsterm.m (ns_draw_glyph_string): Add case for 'XWIDGET_GLYPH'.
(note_mouse_movement mouseMoved): Make it easy to resize window by
dragging mode-line or vertical separator adjacent to large glyph.
* src/nsxwidget.h src/nsxwidget.m: Newly added files, xwidget webkit
backend for macOS Cocoa.
* src/xwidget.c (Fmake_xwidget, xwidget_init_view)
(x_draw_xwidget_glyph_string, xwidget_is_web_view)
(Fxwidget_webkit_goto_uri, Fxwidget_webkit_zoom, Fxwidget_resize)
(Fxwidget_size_request, Fdelete_xwidget_view, xwidget_end_redisplay)
(kill_buffer_xwidgets): Add macOS Cocoa specific functions and code
with 'NS_IMPL_COCOA' and guard GTK specific functions and code with
'USE_GTK'.
(x_draw_xwidget_glyph_string): Handle adjusting xwidget size.
* src/xwidget.h (xwidget, xwidget_view): Add macOS Cocoa specific
fields with 'NS_IMPL_COCOA' and guard GTK specific fields with
USE_GTK.
This should avoid some configuration confusion as exemplified
by Jeffrey Walton’s recent bug report (Bug#42675).
* configure.ac (opsys): Simplify Solaris configuration by
not worrying about Solaris 9 and earlier, as they are no
longer supported by the Solaris developers. This should
support Walton’s ‘./configure --build=x86_64-sun-solaris’.
Instead of bothering with ‘opsys=sol2-6’ and ‘opsys=sol2-10’,
just use ‘opsys=solaris’. All uses changed.
(emacs_check_sunpro_c): Remove unused var.
* doc/misc/tramp.texi (Remote programs):
* etc/MACHINES, etc/PROBLEMS:
Modernize PATH for Oracle Developer Studio.
* etc/PROBLEMS: Move Solaris-related problems to legacy area,
except those that are still relevant.
* configure.ac: Use AC_CHECK_FUNCS_ONCE for __lsan_ignore_object.
* src/buffer.c, src/data.c, src/emacs-module.c, src/regex-emacs.c:
* src/search.c: Use __lsan_ignore_object unconditionally, and don’t
include sanitizer/lsan_interface.h.
* src/lisp.h (__lsan_ignore_object): Provide a dummy in the
typical case where leak sanitization is not available.
We intentionally leak some objects. Prevent the ASan leak detector
from raising false alarms in these cases.
* configure.ac: Search for lsan_interface.h header.
* src/data.c (make_blv): Allow leaking of buffer-local values.
* src/buffer.c (enlarge_buffer_text): Allow leaking of buffer text.
* src/emacs-module.c (Fmodule_load, initialize_environment): Allow
intentional leak of runtime and environment objects if module
assertions are enabled.
Instead of doing GMP by hand, use the Gnulib libgmp module.
* .gitignore: Add lib/gmp.h.
* admin/merge-gnulib (GNULIB_MODULES): Add libgmp.
* configure.ac (GMP_LIB, GMP_OBJ): Remove. Gnulib uses the name
LIB_GMP, so all uses changed. All uses of GMP_OBJ removed.
(HAVE_GMP): Set this from Gnulib’s variables.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib/mini-gmp-gnulib.c, lib/mini-gmp.c, lib/mini-gmp.h, m4/libgmp.m4:
New files, copied from Gnulib.
* src/bignum.h, test/data/emacs-module/mod-test.c:
Include gmp.h unconditionally.
* src/mini-gmp-emacs.c, src/mini-gmp.c, src/mini-gmp.h:
Remove. This moves these files from src to lib, and
updates them to the current GMP version.
* test/Makefile.in (GMP_H): New macro.
($(test_module)): Use it to decide whether to compile
mini-gmp-gnulib.c too.
* configure.ac (nw): GCC 10.1 introduced warnings enabled by -fanalyzer
that slow down compilation considerably. Generate these warnings only
if --enable-gcc-warnings is explicitly given. Also, do not bother to
eliminate warnings that Gnulib’s revised manywarnings module no longer
generates.
OpenBSD has pthread_set_name_np; FreeBSD appears to have both
this call and pthread_setname_np (the latter call is used in preference).
* configure.ac: Detect pthread_set_name_np.
* sys/systhread.c:
Include <pthread_np.h> and call pthread_set_name_np if available.
* configure.ac: Clarify wording for --with-wide-int help.
* src/pdumper.c (dump_vectorlike_generic):
Do the eassert even if --with-wide-int was specified unnecessarily.
* configure.ac: don't add linker flags if compiling on
Windows. Compile dynlib.c if modules or native compilation are
enabled. Always compile comp.c
* lisp/term/w32-win.el: Map 'gccjit to "libgccjit.dll" in
`dynamic-library-alist`.
* src/Makefile.in: Update comments. Update to handle changes in
configure.ac.
* src/comp.c: Add declarations of used libgccjit functions using
DEF_DLL_FN. Add calls to load_gccjit_if_necessary() where necessary.
Add `native-comp-available-p`
* src/comp.h: Remove Fnative_elisp_load. Add syms_of_comp().
* src/emacs.c (main): Always call syms_of_comp()
* src/w32.c (globals_of_w32): Clear Vlibrary_cache when starting
because the libraries loaded when dumping will not be loaded when
starting.
* src/w32fns.c: Add Qgccjit symbol.
* configure.ac (NATIVE_IMAGE_API): Move above NS definitions.
(HAVE_NATIVE_IMAGE_API): Set for NS.
(HAVE_PNG, HAVE_JPEG, HAVE_GIF, HAVE_TIFF): Enable on NS builds.
* src/image.c (HAVE_NS): Fix a number of #if's so they no longer rely
on HAVE_NS.
(PIX_MASK_DRAW): Add for HAVE_NS so libpng support will compile.
(image_can_use_native_api):
(native_image_load): Add NS support.
(png_load):
(jpeg_load):
(tiff_load):
(gif_load): Remove NS specific definitions.
* src/nsimage.m (ns_can_use_native_image_api): New function.
* src/nsterm.h: (ns_can_use_native_image_api): New function.
* etc/NEWS: Fix wording of the entry for native image API support.
Reported by Juanma Barranquero <lekktu@gmail.com>.
* configure.ac (native-image-api): Fix the "--help" description.
* configure.ac: Minor cleanup in how w32image.o is added to the
build when native image APIs are requested.
* src/w32gui.h (w32_load_image, w32_can_use_native_image_api)
(w32_gdiplus_shutdown): Move prototypes from w32term.h here, since
w32.c doesn't include w32term.h.
* src/image.c (struct image_type): No need to pass TYPE to the
'valid_p' method. All callers changed.
(initialize_image_type) [HAVE_NATIVE_IMAGE_API]: Call
'image_can_use_native_api' before trying image-specific methods.
(image_can_use_native_api): New function.
(image_types): Remove the native_image_type parts.
(syms_of_image): New symbol 'native-image'.
(parse_image_spec): Accept native-image "type" for any image type.
* src/w32term.c (syms_of_w32term): New variable
'w32-use-native-image-API'.
* src/w32image.c: (w32_can_use_native_image_api): New function.
(gdiplus_init): Rename from w32_gdiplus_startup. Simplify code.
Move the call to GdiplusStartup to a separate function. Use
ordinal number for SHCreateMemStream if cannot load it by name.
(w32_load_image): Ignore Win32Error status from
w32_select_active_frame.
Move DEFSYMs from here...
* src/image.c (syms_of_image) [HAVE_NATIVE_IMAGE_API]: ...to here.
* etc/NEWS: Update the entry about native image API use.
* src/w32image.c: New file.
* src/w32term.h: Add prototypes of 'w32_load_image',
'w32_gdiplus_startup', 'w32_gdiplus_shutdown', and
'w32_query_frame_background_color'.
* src/w32term.c (w32_query_frame_background_color): No longer
static.
* src/w32.c (term_ntproc) [HAVE_GDIPLUS]: Call
'w32_gdiplus_shutdown'.
* src/image.c (struct image_type) <valid_p>: Accept an additional
argument, the image type. All implementations changed.
(init_native_image_functions, native_image_p, native_image_load)
[HAVE_NATIVE_IMAGE_API]: New methods for "native image type".
(initialize_image_type) [HAVE_NATIVE_IMAGE_API]: Call
'init_native_image_functions'.
(image_types) [HAVE_NATIVE_IMAGE_API]: Add settings for native
image API.
(lookup_image_type) [HAVE_NATIVE_IMAGE_API]: Initialize native
functions if needed.
* lisp/term/w32-win.el (dynamic-library-alist): Add gdiplus and
shlwapi.
* etc/NEWS: Announce the new feature.
* configure.ac (native-image-api): New option, OFF by default.
(HAVE_NATIVE_IMAGE_API): If native-image-api is selected, add
w32image.o to W32_OBJ.