Problem reported by David Caldwell (bug#79879).
* configure.ac: When configuring for GNUstep and the
Objective C compiler does not support even C99 features,
use the first flag of -std=gnu23, -std=gnu17, -std=gnu11, -std=gnu99
that works, instead of insisting on -std=c99 which (a) is too
strict and (b) can override another -std= option in an
undesirable way.
* configure.ac: Use gl_CHECK_FUNCS_ANDROID_MACOS to check for
'posix_spawn_file_actions_addchdir', since it checks which
version of macOS is being used for the build, rather than what
is available in the SDK. (Bug#79489)
Document the change in dependency. As we still need to work
around GCC bug 119085, there is no functional change in ‘configure’.
* configure.ac (emacs_cv_gcc_bug_119085_CFLAGS):
Rename from emacs_cv_gcc_bug_117423_CFLAGS. All uses changed.
Problem reported by Oliver Reiter and Pip Cet (Emacs bug#78473).
It looks like GCC tree-sra is trouble in general with how Emacs
uses unions, so disable tree-sra until the GCC bug is fixed.
* configure.ac (C_SWITCH_MACHINE): Also work around GCC bug 117423.
* configure.ac (gl_cv_onwards_func_tzalloc): Define to "future
OS version" on Android API 35 and later.
Detect posix_spawn* by means of gl_CHECK_FUNCS_ANDROID.
* src/conf_post.h (tzalloc, tzfree): Define to non-conflicting
names on Android 35 and later.
* configure.ac (systemduserunitdir): New variable and option.
* Makefile.in (systemduserunitdir): New, set by configure.
(install-etc, uninstall): Don't install emacs.service when
systemduserunitdir is unspecified.
* etc/NEWS: Announce the new configure option. (Bug#76924)
* configure.ac: Don't claim that Xft is being considered for
deletion or that recent releases are buggy, or imply that
HarfBuzz support is exclusive to Cairo.
* configure.ac (ALIGNOF_INT, ALIGNOF_LONG, ALIGNOF_LONG_LONG):
New variables.
(emacs_cv_alignas_unavailable): Define if alignas and structure
alignment primitives are unavailable. In such an environment,
the MSB tagging scheme must be enabled, as must the GNU malloc.
* msdos/sed2v2.inp: Adjust correspondingly.
* src/alloc.c (union emacs_align_type): Remove types which
contain flexible array members. The address of a field
subsequent to an aggregate with flexible array members cannot
validly be taken.
(mark_memory) [!USE_LSB_TAG && !WIDE_EMACS_INT]: Strip type bits
before scanning memory.
* src/emacs.c (main):
* src/eval.c (Fautoload_do_load):
* src/fns.c (Frequire): Rename a number of illogically named
fields.
* src/lisp.h (ALIGNOF_EMACS_INT): Define to the natural
alignment of EMACS_INT.
(IDEAL_GCALIGNMENT): New macro.
(USE_LSB_TAG): Disable if no alignment specifiers are available,
WIDE_EMACS_INT is undefined, and the natural alignment of
EMACS_INT falls short of LSB tagging's requirements.
(gflags): Rename illogically named fields and don't define them
as bitfields, which runs afoul of certain compiler issues.
(will_dump_p, will_bootstrap_p, will_dump_with_pdumper_p)
(dumped_with_pdumper_p): Adjust accordingly.
* src/pdumper.c (VM_SUPPORTED): Define to 0 when !USE_LSB_TAG.
It is better to read dump files into the heap by hand than to be
supplied with an address that is not representable.
(_dump_object_start_pseudovector): Rename to
dump_object_start_pseudovector, to avoid encroaching on reserved
names.
(START_DUMP_PVEC): Adjust correspondingly.
(dump_mmap_contiguous_vm): Preserve errno around failure
cleanup.
(dump_bitset_bit_set_p): Work around certain compiler issues.
(pdumper_load) [!USE_LSB_TAG]: Reject dump file allocations
that are not representable as Lisp_Objects.
Tested on i386-unknown-solaris2.10, sparc-sun-solaris2.10.
1. Prefer "native-compiled" to "native compiled".
The adjective "native-compiled" with the hyphen is generally more
consistent with the typical pattern in English, especially when the
compound modifies a noun (e.g., "native-compiled code").
2. Prefer "natively compiled" to "natively-compiled".
The adverb "natively" modifies "compiled", and it is standard not
to hyphenate an adverb + adjective combination when the adverb ends
in -ly (e.g., "code that is natively compiled").
For example, note that we say "high-speed internet" but "highly
performant code".
* Makefile.in (dest):
* configure.ac (HAVE_NATIVE_COMP):
* doc/emacs/building.texi (Lisp Libraries):
* doc/lispref/compile.texi (Native Compilation)
(Native-Compilation Functions, Native-Compilation Variables):
* doc/lispref/functions.texi (What Is a Function, Declare Form):
* doc/lispref/loading.texi (How Programs Do Loading, Library Search):
* etc/NEWS:
* etc/NEWS.28:
* etc/NEWS.29:
* etc/NEWS.30:
* lisp/emacs-lisp/comp-common.el (native-comp-never-optimize-functions)
(comp-function-type-spec):
* lisp/emacs-lisp/comp-cstr.el:
* lisp/subr.el (locate-eln-file):
* src/comp.c (SETJMP_NAME, syms_of_comp):
* src/data.c (Fsubrp, Fnative_comp_function_p, Fsubr_native_lambda_list):
* src/lread.c (Fload):
* src/pdumper.c (dump_do_dump_relocation):
* test/src/comp-tests.el (lambda-return2): Avoid grammatically incorrect
variations on "natively compiled" and "native-compiled". (Bug#56727)
* configure.ac (BOBJECTLIST_OWNERSHIP_IS_TEMPLATE_PARAMETER):
Define if BObjectList ownership over its contents is specified
as a template parameter.
* src/haiku_support.cc (class EmacsFontSelectionDialog)
[BOBJECTLIST_OWNERSHIP_IS_TEMPLATE_PARAMETER]: Adjust
accordingly.
* autogen.sh: Avoid bashism.
* configure.ac (AC_PROG_AWK): Use.
* src/Makefile.in (AWK): Set.
(dmpstruct.h): Use "$(AWK)", not "awk".
* src/dired.c (DT_UNKNOWN, DT_DIR, DT_LNK): Define all three constants
or none of them.
With the removal of unexec and purespace, the definitions in these files
are no longer used. Remove them.
* src/firstfile.c:
* src/lastfile.c: Delete unused files.
* configure.ac (PRE_ALLOC_OBJ, POST_ALLOC_OBJ, FIRSTFILE_OBJ):
Remove variables and dependent code.
* msdos/autogen/Makefile.in:
* msdos/sed1v2.inp:
* src/Makefile.in: Don't use above deleted variables.
* src/deps.mk: Remove lastfile.c dependencies.
Recent Gnulib should work around the Android NDK 16
MB_CUR_MAX bug, so Emacs no longer needs to worry about it.
* configure.ac (gl_STDLIB_H):
Remove, to stop overriding Gnulib.
* configure.ac (__ctype_get_mb_cur_max)
(emacs_cv_broken_mb_cur_max, REPLACEMENT_MB_CUR_MAX):
* src/conf_post.h (MB_CUR_MAX):
Remove, as Gnulib does this now.
This check was added to 'malloc_initialize_hook' in order to "insulate
Emacs better from configuration screwups" (commit b4788b9394). With
unexec gone, we no longer use 'malloc_set_state', and thus don't need
this check.
Note that this patch removes the last uses of the deprecated glibc
functions 'malloc_set_state' and 'malloc_get_state' from our code.
* src/alloc.c (malloc_initialize_hook) [DOUG_LEA_MALLOC]:
Remove check for working 'malloc_set_state'.
(alloc_unexec_pre) [DOUG_LEA_MALLOC]: Delete unused function.
(alloc_unexec_post) [DOUG_LEA_MALLOC]: Delete function.
(malloc_state_ptr) [DOUG_LEA_MALLOC]: Delete variable.
* configure.ac (emacs_cv_var_doug_lea_malloc): Don't check for
malloc_set_state and malloc_get_state.
This adds support for color fonts.
* configure.ac: Add src/w32drite to W32_OBJ.
* src/w32dwrite.c: New file.
(w32-initialize-direct-write): New function, initialize the
DirectWrite library if it is available, and required global
variables.
(w32_use_direct_write): New function, check if DirectWrite
is available and activated by the user.
(w32_dwrite_encode_char): New function, replacement for HarfBuzz's
'encode_char'.
(w32_dwrite_text_extents): New function, replacement for w32font
text_extents.
(w32_dwrite_draw): New function, replacement for w32font draw.
(w32_dwrite_free_cached_face): New function, used in the font
deletion process to also delete DirectWrite data.
(verify_hr): New function, verify COM method results.
(release_com): New function, release a COM object.
(w32-dwrite-available): New function, returns true if DirectWrite
is available.
(w32-dwrite-reinit): New function, reinitialize DirectWrite,
optionally setting some rendering parameters.
* src/w32font.c (w32font_text_extents): If DirectWrite is enabled,
call 'w32_dwrite_text_extents'.
(w32font_draw): If DirectWrite is enabled, call 'w32_dwrite_draw'.
* src/w32uniscribe.c: (w32hb_encode_char): If DirectWrite is enabled,
call 'w32_dwrite_encode_char'.
(syms_of_w32uniscribe_for_pdumper): Initialize DirectWrite.
(uniscribe_close): Free DirectWrite data for the font.
Bug#73730
Before this fix, it would fail to build with gcc-14 with the error:
conftest.c: In function 'main':
conftest.c:265:11: error: implicit declaration of function 'ioctl'
[-Wimplicit-function-declaration]
265 | int foo = ioctl (0, FIONREAD, &foo);
| ^~~~~
Solaris documents ioctl() as being defined in <unistd.h>.
* configure.ac: Fix FIONREAD check with gcc-14 on Solaris.
Ref:
https://lists.gnu.org/r/emacs-devel/2024-10/msg00195.html
Copyright-paperwork-exempt: yes