Subject: bug#75293: [PATCH] Remove workaround for AIX 3.2 crashes

From: Stefan Kangas <[email-masked]>
Date: Thu, 2 Jan 2025 12:04:42 -0600

Severity: wishlist

Please see the attached patch for the proposed change and rationale.
From e27a33ae5f56f366e62135574f2454ecafb68a92 Mon Sep 17 00:00:00 2001
From: Stefan Kangas <[email-masked]>
Date: Sun, 22 Dec 2024 21:52:18 +0100
Subject: [PATCH] Remove workaround for AIX 3.2 crashes

Emacs does not support AIX 3.2 since 2008.

This workaround for AIX 3.2.3 and 3.2.4 (released in 1992) was added in
1999, and was only active with '#ifdef AIX3_2'.  In 2008, this condition
was changed to '#ifdef AIX', when support for these ancient versions of
AIX was removed.  I couldn't find any justification for why this was
kept (rather than removed) in the commit message or in the mailing list
archives.

Given that users of versions of AIX 4.0 (released in 1995) or later did
not have this workaround for a decade (1999-2008), I think it's safe to
assume that it's dead wood that is not needed now either.  Note that
this will also avoid incorrectly overriding the LANG variable on that
system.

* src/emacs.c [AIX] (main): Remove workaround for AIX 3.2.
---
 src/emacs.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/src/emacs.c b/src/emacs.c
index c1e0c9f3a57..054db5899c0 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -2184,14 +2184,6 @@ android_emacs_init (int argc, char **argv, char *dump_file)
   init_ntproc (will_dump_p ()); /* must precede init_editfns.  */
 #endif
 
-  /* AIX crashes are reported in system versions 3.2.3 and 3.2.4
-     if this is not done.  Do it after set_global_environment so that we
-     don't pollute Vglobal_environment.  */
-  /* Setting LANG here will defeat the startup locale processing...  */
-#ifdef AIX
-  xputenv ("LANG=C");
-#endif
-
   /* Init buffer storage and default directory of main buffer.  */
   init_buffer ();
 
-- 
2.47.1