pthread_setname_np takes only a single argument on BSD and macOS,
and affects the current thread only.
* configure.ac: Add check for single-argument pthread_setname_np
* src/systhread.c (sys_thread_set_name): New (w32 and pthread versions).
(sys_thread_create): Remove name argument and name-setting.
(w32_beginthread_wrapper): Remove name-setting.
* src/systhread.h (sys_thread_create, sys_thread_set_name):
Update prototypes.
* src/thread.c (run_thread): Call sys_thread_set_name.
(Fmake_thread): Adapt call to sys_thread_create.
* src/thread.h (struct thread_state): Adjust comment.
* configure.ac: Remove check for sys/prctl.h and prctl, check for
pthread_setname_np instead.
* systhread.c: Remove sys/prctl.h include.
(sys_thread_create) [HAVE_PTHREAD_SETNAME_NP]: Use pthread_setname_np
to set the name of the newly created thread (Bug#38632).
* thread.c (Fmake_thread): Use ENCODE_SYSTEM instead of
ENCODE_UTF_8 on the thread name.
* lisp/cus-edit.el (customize-changed-options-previous-release):
Change the value to 26.3.
* README:
* configure.ac:
* nt/README.W32:
* msdos/sed2v2.inp: Bump Emacs version to 27.0.60.
* configure.ac (HAVE_HARFBUZZ): Remove the check for explicit
harfbuzz -- have_harfbuzz defaults to "yes", so we have no way of
checking whether the user really asked for it, apparently.
Problem reported by Richard Copley (Bug#37852).
This patch causes the problem to not occur if one uses plain
‘configure’. The problem can still occur if with ‘configure
--enable-gcc-warnings’, so a further fix may be needed.
* configure.ac (GNULIB_PORTCHECK, _FORTIFY_SOURCE):
Define these only with an explicit --enable-gcc-warnings.
With --enable-checking, make_fixnum (N) now checks that N is
in fixnum range. Suggested by Pip Cet in:
https://lists.gnu.org/r/emacs-devel/2019-07/msg00548.html
A new function make_ufixnum (N) is for the rare cases where N
is intended to be unsigned and is in the range 0..INTMASK.
* configure.ac (AC_C_TYPEOF): Add.
(HAVE_STATEMENT_EXPRESSIONS): Resurrect this macro.
* src/fns.c (Frandom, hashfn_eq, hashfn_equal, hashfn_user_defined):
* src/profiler.c (hashfn_profiler):
Use make_ufixnum rather than make_fixum, since the argument is
an unsigned integer in the range 0..INTMASK rather than a signed
integer in the range MOST_NEGATIVE_FIXNUM..MOST_POSITIVE_FIXNUM.
Typically this is for hashes.
* src/lisp.h (lisp_h_make_fixnum_wrap) [USE_LSB_TAG]:
Rename from lisp_h_make_fixnum.
(lisp_h_make_fixnum): Redefine in terms of lisp_h_make_fixnum_wrap.
Check for fixnum overflow on compilers like GCC that
have statement expressions and typeof.
(FIXNUM_OVERFLOW_P): Move up.
(make_fixnum): Check for fixnum overflow.
(make_ufixnum): New function, which checks that the arg
fits into 0..INTMASK range.
Suggested by Paul Eggert (Bug#36405#22).
* configure.ac (HAVE_CYGWIN_O_PATH_BUG): New AC_DEFINE, for Cygwin
versions 3.0.0 through 3.0.7.
* src/dired.c (O_PATH) [__CYGWIN__]: Remove #undef.
(file_attributes) [HAVE_CYGWIN_O_PATH_BUG]: Don't use O_PATH.
* admin/unidata/Makefile.in (maintainer-clean):
Instead of removing macuvs.h here ...
(extraclean): ... Remove it here.
* admin/unidata/uvs.el (uvs-print-table-ivd):
Add to comment explaining why macuvs.h is in Git.
* src/macuvs.h: Regenerate and re-add to Git.
* configure.ac (HAVE_X_WINDOWS): Add xfont.o to FONT_OBJ if HAVE_CAIRO.
* doc/lispref/frames.texi (Font and Color Parameters): Mention X core font
driver with Cairo drawing.
* src/font.c (syms_of_font) [HAVE_X_WINDOWS && USE_CAIRO]: Call syms_of_xfont.
* src/xfns.c (x_create_tip_frame) [USE_CAIRO]: Register xfont_driver.
* src/xterm.c (x_cr_gc_clip) [USE_CAIRO]: New function extracted from
x_begin_cr_clip.
(x_begin_cr_clip) [USE_CAIRO]: Use it.
(xlib_surface_key, saved_drawable_key) [USE_CAIRO]: New variables.
(x_cr_destroy_xlib_surface, x_try_cr_xlib_drawable)
(x_end_cr_xlib_drawable) [USE_CAIRO]: New functions.
(x_draw_composite_glyph_string_foreground)
(x_draw_glyph_string_foreground) [USE_CAIRO]: Get Xlib surface when drawing
text with X core fonts into bitmap surfaces. Add fallback code for drawing
into outline surfaces.
* src/hbfont.c: New file, with code moved from w32uniscribe.c
and renamed/modified as appropriate.
* src/w32uniscribe.c: Move to hbfont.c DEF_DLL_FN and macro
definitions for HarfBuzz functions used in hbfont.c
(load_harfbuzz_funcs): Move loading of HarfBuzz functions used
by hbfont.c to hbfont.c:hbfont_init_w32_funcs, and call that
function from here.
(syms_of_w32uniscribe_for_pdumper): Fill the 'shape' and
'combining_capability' members with hbfont.c function names.
* src/w32common.h (hbfont_init_w32_funcs) [HAVE_HARFBUZZ]: Add
prototype.
* src/font.h (hbfont_shape, hbfont_combining_capability)
[HAVE_HARFBUZZ]: Add prototypes.
* src/Makefile.in (SOME_MACHINE_OBJECTS): Add hbfont.o.
* configure.ac (FONT_OBJ): Add hbfont.o if HAVE_HARFBUZZ.
* src/w32uniscribe.c [HAVE_HARFBUZZ]: Include math.h and
hb.h.
(bswap_32): Define for GCC 4.3.0 and later; else include
<byteswap.h> from Gnulib.
(struct uniscribe_font_info): Extend for HarfBuzz; 'cache' is
now a 'void *' (all users changed).
[HAVE_HARFBUZZ]: Define typedefs for HarfBuzz functions to be
loaded dynamically from the HarfBuzz DLL. Define macros to
call those functions via function pointers.
(uniscribe_open) [HAVE_HARFBUZZ]: Use the HarfBuzz font driver
if the type of the font entity is 'harfbuzz'.
(uniscribe_close) [HAVE_HARFBUZZ]: For fonts using the
HarfBuzz backend, call hb_font_destroy to free memory used for
the cached hb_font data.
(uniscribe_shape): Fix assignment of character codepoints to
glyphs from a single cluster.
(w32hb_list, w32hb_match, free_cb, w32hb_get_font_table)
(w32hb_get_font, w32hb_encode_char, w32hb_begin_font)
(w32uni_combining, w32uni_general, w32uni_mirroring)
(get_hb_unicode_funcs, w32hb_shape)
(w32hb_combining_capability, load_harfbuzz_funcs)
[HAVE_HARFBUZZ]: New functions.
(syms_of_w32uniscribe_for_pdumper) [HAVE_HARFBUZZ]: Load the
HarfBuzz DLL and register the HarfBuzz backend with its
functions.
* src/w32font.c (syms_of_w32font) <Qharfbuzz>: New DEFSYM.
* src/w32fns.c (Fx_create_frame, w32_create_tip_frame)
[HAVE_HARFBUZZ]: Register the harfbuzz font backend.
* src/lisp.h (get_unicode_property): Declare prototype.
* src/font.h (harfbuzz_font_driver) [HAVE_NTGUI]: Declare.
* src/chartab.c (get_unicode_property): New function, body
taken from get-unicode-property-internal.
(Fget_unicode_property_internal): Call get_unicode_property
after validating input.
* doc/lispref/frames.texi (Font and Color Parameters):
* doc/emacs/msdos.texi (Windows Fonts): Document support for
HarfBuzz text shaping on MS-Windows.
* configure.ac (HAVE_HARFBUZZ): Move out of the X-specific
part, and consider HarfBuzz also for HAVE_W32 systems.
Require HarfBuzz v1.2.3 for w32.
* INSTALL, INSTALL.REPO, admin/make-tarball.txt:
Mention ‘make check’.
* configure.ac: Update comment.
* etc/NEWS: Say that tarballs have a test directory.
* make-dist (with_tests): Default to "yes".
Add an option --no-tests to make it "no".
ImageMagick has continuing stability and security problems, suggesting
that 'configure' should disable it by default. See Glenn Morris's notes
at: https://lists.gnu.org/r/emacs-devel/2018-12/msg00036.html
* INSTALL, etc/NEWS, nt/INSTALL.W64: Mention this.
* configure.ac (imagemagick): Default to off.
* Makefile.in (top_distclean): Clean makefile as well as Makefile.
* configure.ac: If not using plain ‘make’, create a makefile
so that plain ‘make’ simply calls $(MAKE).
It doesn’t work anymore, and these days ‘gcc -fsanitize=address’
does a better job anyway.
* configure.ac: Remove the option.
* configure.ac (ac_xmalloc_overrun, XMALLOC_OVERRUN_CHECK):
* src/alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD)
(XMALLOC_OVERRUN_CHECK_SIZE, XMALLOC_OVERRUN_SIZE_SIZE)
(xmalloc_overrun_check_header, xmalloc_overrun_check_trailer)
(xmalloc_put_size, xmalloc_get_size, overrun_check_malloc)
(overrun_check_realloc, overrun_check_free):
Remove. All uses removed.
* etc/NEWS: Mention this.
* configure.ac: Use EMACS_CHECK_MODULES fors LCMS2 rather than
AC_SEARCH_LIBS.
* src/Makefile.in: Get LCMS2_LIBS and LCMS2_CFLAGS from configure,
instead of just LIBLCMS2.
(cherry picked from commit cb3863370c)
* configure.ac: Bump required GTK 2 and GTK 3 versions and the
associated GLib versions. Remove obsolete AC_CHECK_FUNCS calls. These
check for functions available in later GTK 2 versions. These checks
and can safely be removed with the exception of
gtk_window_set_has_resize_grip, which according to a comment in
gtkutil.c causes an issue in Ubuntu's GTK 2.
* src/gtkutil.c:
* src/xfns.c:
* src/xterm.c:
* src/xterm.h: Remove now unused conditional blocks. Use HAVE_GTK3
instead of GTK_CHECK_VERSION where now applicable. Remove checks of
now always true USE_GTK_TOOLTIP.
* admin/merge-gnulib (GNULIB_MODULES): Add memmem-simple.
(AVOIDED_MODULES): Add memchr.
* configure.ac (HAVE_PDUMPER): AC_SUBST it, too, for use in makefiles.
* lib/Makefile.in (libgnu_a_OBJECTS): Add fingerprint.o.
* lib/fingerprint.c: New file.
* lib/memmem.c, lib/str-two-way.h, m4/memmem.m4: New files,
copied from Gnulib.
* lib/fingerprint.h: Rename from src/fingerprint.h.
* lib-src/make-fingerprint.c: Include limits.h, sys/stat.h,
fingerprint.h, intprops.h, min-max.h.
(SSIZE_MAX): New macro, if not already defined.
(main): Without -r, Replace the fingerprint in the input file
instead of generating a fingerprint.c.
* lib/Makefile.in (libgnu_a_OBJECTS): Add fingerprint.o.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* src/Makefile.in (HAVE_PDUMPER, MAKE_PDUMPER_FINGERPRINT):
New macros.
(temacs$(EXEEXT)): Use them to replace the fingerprint instead
of precalculating it.
(mostlyclean, ctagsfiles1): Do not worry about fingerprint.c.
Bring back the dmpstruct.h checking, and use it when
--enable-checking=structs is specified. The checking can be helpful
to some developers, although it gets in the way of others and is
not needed for ordinary tarball builds.
* src/dmpstruct.awk: Restore this file, with mode 644 not 755.
* configure.ac: New option-arg --enable-checking=structs,
implied by --enable-checking.
(CHECK_STRUCTS): New macro and var.
* src/Makefile.in (CHECK_STRUCTS): New macro.
(dmpstruct_headers, dmpstruct.h, dmpstruct.h):
Restore these macros and rules.
(pdumper.o): Restore this dependency if $(CHECK_STRUCTS) is true.
(mostlyclean): Remove dmpstruct.h.
* src/pdumper.c [CHECK_STRUCTS]: Include dmpstruct.h,
and restore checks against hashes.