summaryrefslogtreecommitdiff
path: root/app-editors/xemacs/files
diff options
context:
space:
mode:
Diffstat (limited to 'app-editors/xemacs/files')
-rw-r--r--app-editors/xemacs/files/xemacs-21.5.35-misalignment.patch67
-rw-r--r--app-editors/xemacs/files/xemacs-21.5.35-va_args.patch179
-rw-r--r--app-editors/xemacs/files/xemacs-21.5.35-which.patch17
3 files changed, 260 insertions, 3 deletions
diff --git a/app-editors/xemacs/files/xemacs-21.5.35-misalignment.patch b/app-editors/xemacs/files/xemacs-21.5.35-misalignment.patch
new file mode 100644
index 000000000000..deb3ef36664a
--- /dev/null
+++ b/app-editors/xemacs/files/xemacs-21.5.35-misalignment.patch
@@ -0,0 +1,67 @@
+# HG changeset patch
+# User Aidan Kehoe <kehoea@parhasard.net>
+# Date 1727073391 -3600
+# Mon Sep 23 07:36:31 2024 +0100
+# Node ID 00eb7276ebb1a22e20e6f6b9b5247b196b44f3f1
+# Parent d40990b854cf32198aea31eae0d60ce91ce0f4f7
+Avoid misaligned coding systems objects in the dump file,
+
+src/ChangeLog addition:
+
+2024-09-22 Aidan Kehoe <kehoea@parhasard.net>
+
+ * file-coding.c:
+ * file-coding.c (aligned_sizeof_coding_system): New.
+ * file-coding.c (allocate_coding_system): Use it.
+ Avoid misaligned coding systems objects in the dump file,
+ previously addressed for lstreams, specifiers, opaque data in
+ Martin Buchholz's change of 2001-01-24. Approach taken the same as
+ that for specifiers.
+ * file-coding.c (struct convert_eol_coding_system):
+ Remove a dummy integer no longer needed.
+
+[Changelog patch removed]
+
+diff -r d40990b854cf -r 00eb7276ebb1 src/file-coding.c
+--- a/src/file-coding.c Mon Sep 23 08:03:15 2024 +0100
++++ b/src/file-coding.c Mon Sep 23 07:36:31 2024 +0100
+@@ -312,11 +312,18 @@
+ MAYBE_XCODESYSMETH (obj, finalize, (obj));
+ }
+
++inline static Bytecount
++aligned_sizeof_coding_system (Bytecount type_specific_size)
++{
++ return MAX_ALIGN_SIZE (offsetof (Lisp_Coding_System, data)
++ + type_specific_size);
++}
++
+ static Bytecount
+ sizeof_coding_system (Lisp_Object obj)
+ {
+ const Lisp_Coding_System *p = XCODING_SYSTEM (obj);
+- return offsetof (Lisp_Coding_System, data) + p->methods->extra_data_size;
++ return aligned_sizeof_coding_system (p->methods->extra_data_size);
+ }
+
+ static const struct memory_description coding_system_methods_description_1[]
+@@ -835,7 +842,7 @@
+ Bytecount data_size,
+ Lisp_Object name)
+ {
+- Bytecount total_size = offsetof (Lisp_Coding_System, data) + data_size;
++ Bytecount total_size = aligned_sizeof_coding_system (data_size);
+ Lisp_Object obj = ALLOC_SIZED_LISP_OBJECT (total_size, coding_system);
+ Lisp_Coding_System *codesys = XCODING_SYSTEM (obj);
+
+@@ -3951,10 +3958,6 @@
+ struct convert_eol_coding_system
+ {
+ enum eol_type subtype;
+- int dummy; /* On some architectures (eg ia64) the portable dumper can
+- produce unaligned access errors without this field. Probably
+- because the combined structure of this structure and
+- Lisp_Coding_System is not properly aligned. */
+ };
+
+ #define CODING_SYSTEM_CONVERT_EOL_SUBTYPE(codesys) \
diff --git a/app-editors/xemacs/files/xemacs-21.5.35-va_args.patch b/app-editors/xemacs/files/xemacs-21.5.35-va_args.patch
new file mode 100644
index 000000000000..a3d5f14b728a
--- /dev/null
+++ b/app-editors/xemacs/files/xemacs-21.5.35-va_args.patch
@@ -0,0 +1,179 @@
+# HG changeset patch
+# User Aidan Kehoe <kehoea@parhasard.net>
+# Date 1727074995 -3600
+# Mon Sep 23 08:03:15 2024 +0100
+# Node ID d40990b854cf32198aea31eae0d60ce91ce0f4f7
+# Parent d3dfe7ea1c31cc619bf8416e04c5466927d9c6f5
+Avoid passing an int among Lisp_Object va_args, specifier instantiate methods.
+
+src/ChangeLog addition:
+
+2024-09-08 Aidan Kehoe <kehoea@parhasard.net>
+
+ * fontcolor.c (color_instantiate):
+ * fontcolor.c (font_instantiate):
+ * fontcolor.c (face_boolean_instantiate):
+ * fontcolor.c (face_background_placement_instantiate):
+ * glyphs.c (image_instantiate):
+ * specifier.c (specifier_instance_from_inst_list):
+ * specifier.h (struct specifier_methods):
+ Avoid passing an int among the Lisp_Object va_args of the
+ specifier instantiate methods, this is not portable behaviour,
+ thank you clang and -fsanitize=undefined.
+
+[Changelog patch removed]
+
+diff -r d3dfe7ea1c31 -r d40990b854cf src/fontcolor.c
+--- a/src/fontcolor.c Mon Sep 23 08:01:37 2024 +0100
++++ b/src/fontcolor.c Mon Sep 23 08:03:15 2024 +0100
+@@ -1380,7 +1380,7 @@
+ static Lisp_Object
+ color_instantiate (Lisp_Object specifier, Lisp_Object UNUSED (matchspec),
+ Lisp_Object domain, Lisp_Object instantiator,
+- Lisp_Object depth, int no_fallback)
++ Lisp_Object depth, Lisp_Object no_fallback)
+ {
+ /* When called, we're inside of call_with_suspended_errors(),
+ so we can freely error. */
+@@ -1436,7 +1436,7 @@
+ (Fget_face (XVECTOR_DATA (instantiator)[0]),
+ COLOR_SPECIFIER_FACE_PROPERTY
+ (XCOLOR_SPECIFIER (specifier)),
+- domain, ERROR_ME, no_fallback, depth));
++ domain, ERROR_ME, !NILP (no_fallback), depth));
+
+ case 2:
+ return (FACE_PROPERTY_INSTANCE_1
+@@ -1653,7 +1653,7 @@
+ font_instantiate (Lisp_Object UNUSED (specifier),
+ Lisp_Object USED_IF_MULE (matchspec),
+ Lisp_Object domain, Lisp_Object instantiator,
+- Lisp_Object depth, int no_fallback)
++ Lisp_Object depth, Lisp_Object no_fallback)
+ {
+ /* When called, we're inside of call_with_suspended_errors(),
+ so we can freely error. */
+@@ -1766,13 +1766,15 @@
+
+ match_inst = face_property_matching_instance
+ (Fget_face (XVECTOR_DATA (instantiator)[0]), Qfont,
+- charset, domain, ERROR_ME, no_fallback, depth, STAGE_INITIAL);
++ charset, domain, ERROR_ME, !NILP (no_fallback),
++ depth, STAGE_INITIAL);
+
+ if (UNBOUNDP(match_inst))
+ {
+ match_inst = face_property_matching_instance
+ (Fget_face (XVECTOR_DATA (instantiator)[0]), Qfont,
+- charset, domain, ERROR_ME, no_fallback, depth, STAGE_FINAL);
++ charset, domain, ERROR_ME, !NILP (no_fallback), depth,
++ STAGE_FINAL);
+ }
+
+ return match_inst;
+@@ -1868,7 +1870,7 @@
+ face_boolean_instantiate (Lisp_Object specifier,
+ Lisp_Object UNUSED (matchspec),
+ Lisp_Object domain, Lisp_Object instantiator,
+- Lisp_Object depth, int no_fallback)
++ Lisp_Object depth, Lisp_Object no_fallback)
+ {
+ /* When called, we're inside of call_with_suspended_errors(),
+ so we can freely error. */
+@@ -1895,7 +1897,7 @@
+
+ retval = (FACE_PROPERTY_INSTANCE_1
+ (Fget_face (XVECTOR_DATA (instantiator)[0]),
+- prop, domain, ERROR_ME, no_fallback, depth));
++ prop, domain, ERROR_ME, !NILP (no_fallback), depth));
+
+ if (instantiator_len == 3 && !NILP (XVECTOR_DATA (instantiator)[2]))
+ retval = NILP (retval) ? Qt : Qnil;
+@@ -2015,7 +2017,7 @@
+ Lisp_Object domain,
+ Lisp_Object instantiator,
+ Lisp_Object depth,
+- int no_fallback)
++ Lisp_Object no_fallback)
+ {
+ /* When called, we're inside of call_with_suspended_errors(),
+ so we can freely error. */
+@@ -2027,7 +2029,7 @@
+
+ return FACE_PROPERTY_INSTANCE_1
+ (Fget_face (XVECTOR_DATA (instantiator)[0]),
+- Qbackground_placement, domain, ERROR_ME, no_fallback, depth);
++ Qbackground_placement, domain, ERROR_ME, !NILP (no_fallback), depth);
+ }
+ else
+ ABORT (); /* Eh? */
+diff -r d3dfe7ea1c31 -r d40990b854cf src/glyphs.c
+--- a/src/glyphs.c Mon Sep 23 08:01:37 2024 +0100
++++ b/src/glyphs.c Mon Sep 23 08:03:15 2024 +0100
+@@ -3179,7 +3179,7 @@
+ static Lisp_Object
+ image_instantiate (Lisp_Object specifier, Lisp_Object UNUSED (matchspec),
+ Lisp_Object domain, Lisp_Object instantiator,
+- Lisp_Object depth, int no_fallback)
++ Lisp_Object depth, Lisp_Object no_fallback)
+ {
+ Lisp_Object glyph = IMAGE_SPECIFIER_ATTACHEE (XIMAGE_SPECIFIER (specifier));
+ int dest_mask = XIMAGE_SPECIFIER_ALLOWED (specifier);
+@@ -3218,7 +3218,7 @@
+ assert (XVECTOR_LENGTH (instantiator) == 3);
+ return (FACE_PROPERTY_INSTANCE
+ (Fget_face (XVECTOR_DATA (instantiator)[2]),
+- Qbackground_pixmap, domain, no_fallback, depth));
++ Qbackground_pixmap, domain, !NILP (no_fallback), depth));
+ }
+ else
+ {
+diff -r d3dfe7ea1c31 -r d40990b854cf src/specifier.c
+--- a/src/specifier.c Mon Sep 23 08:01:37 2024 +0100
++++ b/src/specifier.c Mon Sep 23 08:03:15 2024 +0100
+@@ -2862,8 +2862,8 @@
+ if (HAS_SPECMETH_P (sp, instantiate))
+ val = call_with_suspended_errors
+ ((lisp_fn_t) RAW_SPECMETH (sp, instantiate),
+- Qunbound, Qspecifier, ERROR_ME_WARN, 5, specifier,
+- matchspec, domain, val, depth, no_fallback);
++ Qunbound, Qspecifier, ERROR_ME_WARN, 6, specifier,
++ matchspec, domain, val, depth, no_fallback ? Qt : Qnil);
+
+ if (!UNBOUNDP (val))
+ {
+@@ -2911,8 +2911,8 @@
+ if (HAS_SPECMETH_P (sp, instantiate))
+ val = call_with_suspended_errors
+ ((lisp_fn_t) RAW_SPECMETH (sp, instantiate),
+- Qunbound, Qspecifier, errb, 5, specifier,
+- matchspec, domain, val, depth, no_fallback);
++ Qunbound, Qspecifier, errb, 6, specifier,
++ matchspec, domain, val, depth, no_fallback ? Qt : Qnil);
+
+ if (!UNBOUNDP (val))
+ {
+diff -r d3dfe7ea1c31 -r d40990b854cf src/specifier.h
+--- a/src/specifier.h Mon Sep 23 08:01:37 2024 +0100
++++ b/src/specifier.h Mon Sep 23 08:03:15 2024 +0100
+@@ -147,8 +147,9 @@
+ name specifier_instance) to avoid creating "external"
+ specification loops.
+
+- NO_FALLBACK indicates that the method should not try the fallbacks
+- (and thus simply return Qunbound) in case of a failure to instantiate.
++ NO_FALLBACK non-nil indicates that the method should not try the
++ fallbacks (and thus simply return Qunbound) in case of a failure to
++ instantiate.
+
+ This method must presume that both INSTANTIATOR and MATCHSPEC are
+ already validated by the corresponding validate_* methods, and
+@@ -165,7 +166,7 @@
+ Lisp_Object domain,
+ Lisp_Object instantiator,
+ Lisp_Object depth,
+- int no_fallback);
++ Lisp_Object no_fallback);
+
+ /* Going-to-add method: Called when an instantiator is about
+ to be added to a specifier. This function can specify
diff --git a/app-editors/xemacs/files/xemacs-21.5.35-which.patch b/app-editors/xemacs/files/xemacs-21.5.35-which.patch
index cf8b554490fc..1c93aa0e19d7 100644
--- a/app-editors/xemacs/files/xemacs-21.5.35-which.patch
+++ b/app-editors/xemacs/files/xemacs-21.5.35-which.patch
@@ -1,12 +1,23 @@
diff -r 22f2684b1b82 configure.ac
--- a/configure.ac Mon Sep 23 16:24:03 2024 +0100
-+++ b/configure.ac Thu Sep 26 07:57:11 2024 +0200
-@@ -2518,7 +2518,7 @@
++++ b/configure.ac Sat Sep 28 14:09:56 2024 +0200
+@@ -2518,16 +2518,16 @@
dnl We need a recent version of makeinfo
AC_MSG_CHECKING([for makeinfo >= 4.12])
MAKEINFO=
-for prog in `which -a makeinfo`; do
-+for prog in `type -P makeinfo`; do
++if prog=`command -v makeinfo`
++then
mi_verstr=[`$prog --version | sed -n '1s/^.* \([0-9][0-9.]*\)$/\1/p'`]
mi_major=`echo $mi_verstr | cut -d. -f1`
mi_minor=`echo $mi_verstr | cut -d. -f2`
+ if test "$mi_major" -gt 4 || ( test "$mi_major" -eq 4 && test "$mi_minor" -gt 11 );
+ then
+ MAKEINFO=$prog
+- break
+ fi
+-done
++fi
+ if test -z $MAKEINFO; then
+ AC_MSG_RESULT([no])
+ AC_MSG_WARN([Found Makeinfo $mi_verstr. 4.12 or later required.])