]> Savannah Git Hosting - gnulib.git/commitdiff
alloca: Remove old code for Emacs, unused since 2009.
authorBruno Haible <bruno@clisp.org>
Wed, 11 May 2022 11:00:53 +0000 (13:00 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 11 May 2022 11:05:33 +0000 (13:05 +0200)
Reported by Reuben Thomas <rrt@sc3d.org> in
<https://lists.gnu.org/archive/html/bug-gnulib/2022-05/msg00032.html>.

* lib/alloca.c: Remove Emacs specific code.

ChangeLog
lib/alloca.c

index ea2c24dee1b47c0e5dd55cccfa1106a7b195d031..f4e24d4157da496762d537aa5376bf65fdc76d55 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2022-05-11  Bruno Haible  <bruno@clisp.org>
+
+       alloca: Remove old code for Emacs, unused since 2009.
+       Reported by Reuben Thomas <rrt@sc3d.org> in
+       <https://lists.gnu.org/archive/html/bug-gnulib/2022-05/msg00032.html>.
+       * lib/alloca.c: Remove Emacs specific code.
+
 2022-05-05  Paul Eggert  <eggert@cs.ucla.edu>
 
        libc-config: update to match cdefs
index 48802832a85e36b3a0022c238b4cd6deeb0a2e1e..5eb16a9ff5c77909268afc7eb74ed2fe3d6dd80e 100644 (file)
 #include <string.h>
 #include <stdlib.h>
 
-#ifdef emacs
-# include "lisp.h"
-# include "blockinput.h"
-# ifdef EMACS_FREE
-#  undef free
-#  define free EMACS_FREE
-# endif
-#else
-# define memory_full() abort ()
-#endif
-
 /* If compiling with GCC or clang, this file is not needed.  */
 #if !(defined __GNUC__ || defined __clang__)
 
    there must be some other way alloca is supposed to work.  */
 # ifndef alloca
 
-#  ifdef emacs
-#   ifdef static
-/* actually, only want this if static is defined as ""
-   -- this is for usg, in which emacs must undefine static
-   in order to make unexec workable
-   */
-#    ifndef STACK_DIRECTION
-you
-lose
--- must know STACK_DIRECTION at compile-time
-/* Using #error here is not wise since this file should work for
-   old and obscure compilers.  */
-#    endif /* STACK_DIRECTION undefined */
-#   endif /* static */
-#  endif /* emacs */
-
 /* Define STACK_DIRECTION if you know the direction of stack
    growth for your system; otherwise it will be automatically
    deduced at run-time.
@@ -145,10 +118,6 @@ alloca (size_t size)
   {
     register header *hp;        /* Traverses linked list.  */
 
-#  ifdef emacs
-    BLOCK_INPUT;
-#  endif
-
     for (hp = last_alloca_header; hp != NULL;)
       if ((STACK_DIR > 0 && hp->h.deep > depth)
           || (STACK_DIR < 0 && hp->h.deep < depth))
@@ -163,10 +132,6 @@ alloca (size_t size)
         break;                  /* Rest are not deeper.  */
 
     last_alloca_header = hp;    /* -> last valid storage.  */
-
-#  ifdef emacs
-    UNBLOCK_INPUT;
-#  endif
   }
 
   if (size == 0)