From ed4734405dfbe26d3da7cedc4e4cd599618bf6ee Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 6 Dec 2022 17:15:35 +0200 Subject: [PATCH] Avoid crashes in a build --without-modules * src/lread.c (syms_of_lread): Move the definitions of 'dynamic-library-suffixes' outside of the HAVE_MODULES conditional. (Bug#59832) --- src/lread.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/lread.c b/src/lread.c index 68bc1431765..51ea3e5b929 100644 --- a/src/lread.c +++ b/src/lread.c @@ -5468,6 +5468,14 @@ to the specified file name if a suffix is allowed or required. */); Vload_suffixes = Fcons (build_pure_c_string (MODULES_SECONDARY_SUFFIX), Vload_suffixes); #endif +#endif + DEFVAR_LISP ("module-file-suffix", Vmodule_file_suffix, + doc: /* Suffix of loadable module file, or nil if modules are not supported. */); +#ifdef HAVE_MODULES + Vmodule_file_suffix = build_pure_c_string (MODULES_SUFFIX); +#else + Vmodule_file_suffix = Qnil; +#endif DEFVAR_LISP ("dynamic-library-suffixes", Vdynamic_library_suffixes, doc: /* A list of suffixes for loadable dynamic libraries. */); @@ -5477,14 +5485,6 @@ to the specified file name if a suffix is allowed or required. */); Fcons (build_pure_c_string (DYNAMIC_LIB_SUFFIX), Vdynamic_library_suffixes); -#endif - DEFVAR_LISP ("module-file-suffix", Vmodule_file_suffix, - doc: /* Suffix of loadable module file, or nil if modules are not supported. */); -#ifdef HAVE_MODULES - Vmodule_file_suffix = build_pure_c_string (MODULES_SUFFIX); -#else - Vmodule_file_suffix = Qnil; -#endif DEFVAR_LISP ("load-file-rep-suffixes", Vload_file_rep_suffixes, doc: /* List of suffixes that indicate representations of \ the same file. -- 2.39.2