changeset 8948:a162347a0232

Update after allocsa -> malloca renaming.
author Bruno Haible <bruno@clisp.org>
date Sat, 09 Jun 2007 11:11:14 +0000
parents fffd4f371557
children e9aa39473d0f
files lib/c-strcasestr.c lib/c-strstr.c lib/canonicalize-lgpl.c lib/clean-temp.c lib/csharpcomp.c lib/csharpexec.c lib/javacomp.c lib/javaexec.c lib/mbscasestr.c lib/mbsstr.c lib/relocwrapper.c lib/setenv.c lib/strcasestr.c lib/striconveha.c modules/c-strcasestr modules/c-strstr modules/canonicalize-lgpl modules/clean-temp modules/csharpcomp modules/csharpexec modules/javacomp modules/javaexec modules/mbscasestr modules/mbsstr modules/relocatable-prog-wrapper modules/setenv modules/strcasestr modules/striconveha
diffstat 28 files changed, 125 insertions(+), 125 deletions(-) [+]
line wrap: on
line diff
--- a/lib/c-strcasestr.c
+++ b/lib/c-strcasestr.c
@@ -1,5 +1,5 @@
 /* c-strcasestr.c -- case insensitive substring search in C locale
-   Copyright (C) 2005-2006 Free Software Foundation, Inc.
+   Copyright (C) 2005-2007 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2005.
 
    This program is free software; you can redistribute it and/or modify
@@ -25,7 +25,7 @@
 #include <stddef.h>
 #include <string.h>
 
-#include "allocsa.h"
+#include "malloca.h"
 #include "c-ctype.h"
 
 /* Knuth-Morris-Pratt algorithm.
@@ -38,7 +38,7 @@
   size_t m = strlen (needle);
 
   /* Allocate the table.  */
-  size_t *table = (size_t *) allocsa (m * sizeof (size_t));
+  size_t *table = (size_t *) malloca (m * sizeof (size_t));
   if (table == NULL)
     return false;
   /* Fill the table.
@@ -113,7 +113,7 @@
 	}
   }
 
-  freesa (table);
+  freea (table);
   return true;
 }
 
--- a/lib/c-strstr.c
+++ b/lib/c-strstr.c
@@ -25,7 +25,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "allocsa.h"
+#include "malloca.h"
 
 /* Knuth-Morris-Pratt algorithm.
    See http://en.wikipedia.org/wiki/Knuth-Morris-Pratt_algorithm
@@ -37,7 +37,7 @@
   size_t m = strlen (needle);
 
   /* Allocate the table.  */
-  size_t *table = (size_t *) allocsa (m * sizeof (size_t));
+  size_t *table = (size_t *) malloca (m * sizeof (size_t));
   if (table == NULL)
     return false;
   /* Fill the table.
@@ -111,7 +111,7 @@
 	}
   }
 
-  freesa (table);
+  freea (table);
   return true;
 }
 
--- a/lib/canonicalize-lgpl.c
+++ b/lib/canonicalize-lgpl.c
@@ -1,5 +1,5 @@
 /* Return the canonical absolute name of a given file.
-   Copyright (C) 1996-2003, 2005-2006 Free Software Foundation, Inc.
+   Copyright (C) 1996-2003, 2005-2007 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    This program is free software; you can redistribute it and/or modify
@@ -66,7 +66,7 @@
 # define __canonicalize_file_name canonicalize_file_name
 # define __realpath rpl_realpath
 # include "pathmax.h"
-# include "allocsa.h"
+# include "malloca.h"
 # if HAVE_GETCWD
 #  ifdef VMS
     /* We want the directory in Unix syntax, not in VMS syntax.  */
@@ -244,7 +244,7 @@
 		  goto error;
 		}
 
-	      buf = allocsa (path_max);
+	      buf = malloca (path_max);
 	      if (!buf)
 		{
 		  errno = ENOMEM;
@@ -255,7 +255,7 @@
 	      if (n < 0)
 		{
 		  int saved_errno = errno;
-		  freesa (buf);
+		  freea (buf);
 		  errno = saved_errno;
 		  goto error;
 		}
@@ -263,10 +263,10 @@
 
 	      if (!extra_buf)
 		{
-		  extra_buf = allocsa (path_max);
+		  extra_buf = malloca (path_max);
 		  if (!extra_buf)
 		    {
-		      freesa (buf);
+		      freea (buf);
 		      errno = ENOMEM;
 		      goto error;
 		    }
@@ -275,7 +275,7 @@
 	      len = strlen (end);
 	      if ((long int) (n + len) >= path_max)
 		{
-		  freesa (buf);
+		  freea (buf);
 		  __set_errno (ENAMETOOLONG);
 		  goto error;
 		}
@@ -299,7 +299,7 @@
   *dest = '\0';
 
   if (extra_buf)
-    freesa (extra_buf);
+    freea (extra_buf);
 
   return resolved ? memcpy (resolved, rpath, dest - rpath + 1) : rpath;
 
@@ -307,7 +307,7 @@
   {
     int saved_errno = errno;
     if (extra_buf)
-      freesa (extra_buf);
+      freea (extra_buf);
     if (resolved)
       strcpy (resolved, rpath);
     else
--- a/lib/clean-temp.c
+++ b/lib/clean-temp.c
@@ -40,7 +40,7 @@
 #include "pathmax.h"
 #include "tmpdir.h"
 #include "xalloc.h"
-#include "xallocsa.h"
+#include "xmalloca.h"
 #include "gl_linkedhash_list.h"
 #include "gettext.h"
 #if GNULIB_FWRITEERROR
@@ -327,7 +327,7 @@
 					false);
 
   /* Create the temporary directory.  */
-  xtemplate = (char *) xallocsa (PATH_MAX);
+  xtemplate = (char *) xmalloca (PATH_MAX);
   if (path_search (xtemplate, PATH_MAX, parentdir, prefix, parentdir == NULL))
     {
       error (0, errno,
@@ -354,11 +354,11 @@
      block because then the cleanup handler would not remove the directory
      if xstrdup fails.  */
   tmpdir->dirname = xstrdup (tmpdirname);
-  freesa (xtemplate);
+  freea (xtemplate);
   return (struct temp_dir *) tmpdir;
 
  quit:
-  freesa (xtemplate);
+  freea (xtemplate);
   return NULL;
 }
 
@@ -665,14 +665,14 @@
   if (supports_delete_on_close ())
     {
       size_t mode_len = strlen (mode);
-      char *augmented_mode = (char *) xallocsa (mode_len + 2);
+      char *augmented_mode = (char *) xmalloca (mode_len + 2);
       memcpy (augmented_mode, mode, mode_len);
       memcpy (augmented_mode + mode_len, "D", 2);
 
       fp = fopen (file_name, augmented_mode);
       saved_errno = errno;
 
-      freesa (augmented_mode);
+      freea (augmented_mode);
     }
   else
 #endif
--- a/lib/csharpcomp.c
+++ b/lib/csharpcomp.c
@@ -1,5 +1,5 @@
 /* Compile a C# program.
-   Copyright (C) 2003-2006 Free Software Foundation, Inc.
+   Copyright (C) 2003-2007 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2003.
 
    This program is free software; you can redistribute it and/or modify
@@ -33,7 +33,7 @@
 #include "getline.h"
 #include "sh-quote.h"
 #include "safe-read.h"
-#include "xallocsa.h"
+#include "xmalloca.h"
 #include "error.h"
 #include "gettext.h"
 
@@ -102,7 +102,7 @@
 	1 + (output_is_library ? 1 : 0) + 2 + 2 * libdirs_count
 	+ 2 * libraries_count + (optimize ? 1 : 0) + (debug ? 1 : 0)
 	+ sources_count;
-      argv = (char **) xallocsa ((argc + 1) * sizeof (char *));
+      argv = (char **) xmalloca ((argc + 1) * sizeof (char *));
 
       argp = argv;
       *argp++ = "cscc";
@@ -131,7 +131,7 @@
 	      && memcmp (source_file + strlen (source_file) - 10, ".resources",
 			 10) == 0)
 	    {
-	      char *option = (char *) xallocsa (12 + strlen (source_file) + 1);
+	      char *option = (char *) xmalloca (12 + strlen (source_file) + 1);
 
 	      memcpy (option, "-fresources=", 12);
 	      strcpy (option + 12, source_file);
@@ -157,8 +157,8 @@
 
       for (i = 0; i < sources_count; i++)
 	if (argv[argc - sources_count + i] != sources[i])
-	  freesa (argv[argc - sources_count + i]);
-      freesa (argv);
+	  freea (argv[argc - sources_count + i]);
+      freea (argv);
 
       return (exitstatus != 0);
     }
@@ -214,28 +214,28 @@
       argc =
 	1 + (output_is_library ? 1 : 0) + 1 + libdirs_count + libraries_count
 	+ (debug ? 1 : 0) + sources_count;
-      argv = (char **) xallocsa ((argc + 1) * sizeof (char *));
+      argv = (char **) xmalloca ((argc + 1) * sizeof (char *));
 
       argp = argv;
       *argp++ = "mcs";
       if (output_is_library)
 	*argp++ = "-target:library";
       {
-	char *option = (char *) xallocsa (5 + strlen (output_file) + 1);
+	char *option = (char *) xmalloca (5 + strlen (output_file) + 1);
 	memcpy (option, "-out:", 5);
 	strcpy (option + 5, output_file);
 	*argp++ = option;
       }
       for (i = 0; i < libdirs_count; i++)
 	{
-	  char *option = (char *) xallocsa (5 + strlen (libdirs[i]) + 1);
+	  char *option = (char *) xmalloca (5 + strlen (libdirs[i]) + 1);
 	  memcpy (option, "-lib:", 5);
 	  strcpy (option + 5, libdirs[i]);
 	  *argp++ = option;
 	}
       for (i = 0; i < libraries_count; i++)
 	{
-	  char *option = (char *) xallocsa (11 + strlen (libraries[i]) + 4 + 1);
+	  char *option = (char *) xmalloca (11 + strlen (libraries[i]) + 4 + 1);
 	  memcpy (option, "-reference:", 11);
 	  memcpy (option + 11, libraries[i], strlen (libraries[i]));
 	  strcpy (option + 11 + strlen (libraries[i]), ".dll");
@@ -250,7 +250,7 @@
 	      && memcmp (source_file + strlen (source_file) - 10, ".resources",
 			 10) == 0)
 	    {
-	      char *option = (char *) xallocsa (10 + strlen (source_file) + 1);
+	      char *option = (char *) xmalloca (10 + strlen (source_file) + 1);
 
 	      memcpy (option, "-resource:", 10);
 	      strcpy (option + 10, source_file);
@@ -308,11 +308,11 @@
 	   i < 1 + (output_is_library ? 1 : 0)
 	       + 1 + libdirs_count + libraries_count;
 	   i++)
-	freesa (argv[i]);
+	freea (argv[i]);
       for (i = 0; i < sources_count; i++)
 	if (argv[argc - sources_count + i] != sources[i])
-	  freesa (argv[argc - sources_count + i]);
-      freesa (argv);
+	  freea (argv[argc - sources_count + i]);
+      freea (argv);
 
       return (exitstatus != 0);
     }
@@ -396,28 +396,28 @@
       argc =
 	1 + 1 + 1 + libdirs_count + libraries_count
 	+ (optimize ? 1 : 0) + (debug ? 1 : 0) + sources_count;
-      argv = (char **) xallocsa ((argc + 1) * sizeof (char *));
+      argv = (char **) xmalloca ((argc + 1) * sizeof (char *));
 
       argp = argv;
       *argp++ = "csc";
       *argp++ =
 	(char *) (output_is_library ? "-target:library" : "-target:exe");
       {
-	char *option = (char *) xallocsa (5 + strlen (output_file) + 1);
+	char *option = (char *) xmalloca (5 + strlen (output_file) + 1);
 	memcpy (option, "-out:", 5);
 	strcpy (option + 5, output_file);
 	*argp++ = option;
       }
       for (i = 0; i < libdirs_count; i++)
 	{
-	  char *option = (char *) xallocsa (5 + strlen (libdirs[i]) + 1);
+	  char *option = (char *) xmalloca (5 + strlen (libdirs[i]) + 1);
 	  memcpy (option, "-lib:", 5);
 	  strcpy (option + 5, libdirs[i]);
 	  *argp++ = option;
 	}
       for (i = 0; i < libraries_count; i++)
 	{
-	  char *option = (char *) xallocsa (11 + strlen (libraries[i]) + 4 + 1);
+	  char *option = (char *) xmalloca (11 + strlen (libraries[i]) + 4 + 1);
 	  memcpy (option, "-reference:", 11);
 	  memcpy (option + 11, libraries[i], strlen (libraries[i]));
 	  strcpy (option + 11 + strlen (libraries[i]), ".dll");
@@ -434,7 +434,7 @@
 	      && memcmp (source_file + strlen (source_file) - 10, ".resources",
 			 10) == 0)
 	    {
-	      char *option = (char *) xallocsa (10 + strlen (source_file) + 1);
+	      char *option = (char *) xmalloca (10 + strlen (source_file) + 1);
 
 	      memcpy (option, "-resource:", 10);
 	      strcpy (option + 10, source_file);
@@ -459,11 +459,11 @@
 			    true, true);
 
       for (i = 2; i < 3 + libdirs_count + libraries_count; i++)
-	freesa (argv[i]);
+	freea (argv[i]);
       for (i = 0; i < sources_count; i++)
 	if (argv[argc - sources_count + i] != sources[i])
-	  freesa (argv[argc - sources_count + i]);
-      freesa (argv);
+	  freea (argv[argc - sources_count + i]);
+      freea (argv);
 
       return (exitstatus != 0);
     }
--- a/lib/csharpexec.c
+++ b/lib/csharpexec.c
@@ -1,5 +1,5 @@
 /* Execute a C# program.
-   Copyright (C) 2003-2006 Free Software Foundation, Inc.
+   Copyright (C) 2003-2007 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2003.
 
    This program is free software; you can redistribute it and/or modify
@@ -27,7 +27,7 @@
 
 #include "execute.h"
 #include "sh-quote.h"
-#include "xallocsa.h"
+#include "xmalloca.h"
 #include "error.h"
 #include "gettext.h"
 
@@ -124,7 +124,7 @@
       bool err;
 
       argc = 1 + 2 * libdirs_count + 1 + nargs;
-      argv = (char **) xallocsa ((argc + 1) * sizeof (char *));
+      argv = (char **) xmalloca ((argc + 1) * sizeof (char *));
 
       argp = argv;
       *argp++ = "ilrun";
@@ -150,7 +150,7 @@
 
       err = executer ("ilrun", "ilrun", argv, private_data);
 
-      freesa (argv);
+      freea (argv);
 
       return err;
     }
@@ -188,7 +188,7 @@
   if (mono_present)
     {
       char *old_monopath;
-      char **argv = (char **) xallocsa ((2 + nargs + 1) * sizeof (char *));
+      char **argv = (char **) xmalloca ((2 + nargs + 1) * sizeof (char *));
       unsigned int i;
       bool err;
 
@@ -212,7 +212,7 @@
       /* Reset MONO_PATH.  */
       reset_monopath (old_monopath);
 
-      freesa (argv);
+      freea (argv);
 
       return err;
     }
@@ -249,7 +249,7 @@
   if (clix_present)
     {
       char *old_clixpath;
-      char **argv = (char **) xallocsa ((2 + nargs + 1) * sizeof (char *));
+      char **argv = (char **) xmalloca ((2 + nargs + 1) * sizeof (char *));
       unsigned int i;
       bool err;
 
@@ -273,7 +273,7 @@
       /* Reset clix' PATH variable.  */
       reset_clixpath (old_clixpath);
 
-      freesa (argv);
+      freea (argv);
 
       return err;
     }
--- a/lib/javacomp.c
+++ b/lib/javacomp.c
@@ -41,7 +41,7 @@
 #include "binary-io.h"
 #include "safe-read.h"
 #include "xalloc.h"
-#include "xallocsa.h"
+#include "xmalloca.h"
 #include "getline.h"
 #include "filename.h"
 #include "fwriteerror.h"
@@ -230,7 +230,7 @@
     command_length += 1 + shell_quote_length (java_sources[i]);
   command_length += 1;
 
-  command = (char *) xallocsa (command_length);
+  command = (char *) xmalloca (command_length);
   p = command;
   /* Don't shell_quote $JAVAC, because it may consist of a command
      and options.  */
@@ -273,7 +273,7 @@
 			null_stderr, true, true);
   err = (exitstatus != 0);
 
-  freesa (command);
+  freea (command);
 
   return err;
 }
@@ -303,7 +303,7 @@
     2 + (no_assert_option ? 1 : 0) + (fsource_option ? 1 : 0)
     + (ftarget_option ? 1 : 0) + (optimize ? 1 : 0) + (debug ? 1 : 0)
     + (directory != NULL ? 2 : 0) + java_sources_count;
-  argv = (char **) xallocsa ((argc + 1) * sizeof (char *));
+  argv = (char **) xmalloca ((argc + 1) * sizeof (char *));
 
   argp = argv;
   *argp++ = "gcj";
@@ -312,7 +312,7 @@
     *argp++ = "-fno-assert";
   if (fsource_option)
     {
-      fsource_arg = (char *) xallocsa (9 + strlen (source_version) + 1);
+      fsource_arg = (char *) xmalloca (9 + strlen (source_version) + 1);
       memcpy (fsource_arg, "-fsource=", 9);
       strcpy (fsource_arg + 9, source_version);
       *argp++ = fsource_arg;
@@ -321,7 +321,7 @@
     fsource_arg = NULL;
   if (ftarget_option)
     {
-      ftarget_arg = (char *) xallocsa (9 + strlen (target_version) + 1);
+      ftarget_arg = (char *) xmalloca (9 + strlen (target_version) + 1);
       memcpy (ftarget_arg, "-ftarget=", 9);
       strcpy (ftarget_arg + 9, target_version);
       *argp++ = ftarget_arg;
@@ -356,10 +356,10 @@
   err = (exitstatus != 0);
 
   if (ftarget_arg != NULL)
-    freesa (ftarget_arg);
+    freea (ftarget_arg);
   if (fsource_arg != NULL)
-    freesa (fsource_arg);
-  freesa (argv);
+    freea (fsource_arg);
+  freea (argv);
 
   return err;
 }
@@ -385,7 +385,7 @@
   argc =
     1 + (source_option ? 2 : 0) + (target_option ? 2 : 0) + (optimize ? 1 : 0)
     + (debug ? 1 : 0) + (directory != NULL ? 2 : 0) + java_sources_count;
-  argv = (char **) xallocsa ((argc + 1) * sizeof (char *));
+  argv = (char **) xmalloca ((argc + 1) * sizeof (char *));
 
   argp = argv;
   *argp++ = "javac";
@@ -426,7 +426,7 @@
 			null_stderr, true, true);
   err = (exitstatus != 0);
 
-  freesa (argv);
+  freea (argv);
 
   return err;
 }
@@ -450,7 +450,7 @@
   argc =
     1 + (optimize ? 1 : 0) + (debug ? 1 : 0) + (directory != NULL ? 2 : 0)
     + java_sources_count;
-  argv = (char **) xallocsa ((argc + 1) * sizeof (char *));
+  argv = (char **) xmalloca ((argc + 1) * sizeof (char *));
 
   argp = argv;
   *argp++ = "jikes";
@@ -481,7 +481,7 @@
 			null_stderr, true, true);
   err = (exitstatus != 0);
 
-  freesa (argv);
+  freea (argv);
 
   return err;
 }
@@ -566,7 +566,7 @@
 
       /* Setup the command "$JAVAC --version".  */
       command_length = strlen (javac) + 1 + 9 + 1;
-      command = (char *) xallocsa (command_length);
+      command = (char *) xmalloca (command_length);
       p = command;
       /* Don't shell_quote $JAVAC, because it may consist of a command
 	 and options.  */
@@ -612,7 +612,7 @@
 	envjavac_gcj = false;
 
      failed:
-      freesa (command);
+      freea (command);
 
       envjavac_tested = true;
     }
@@ -647,7 +647,7 @@
 
       /* Setup the command "$JAVAC --version".  */
       command_length = strlen (javac) + 1 + 9 + 1;
-      command = (char *) xallocsa (command_length);
+      command = (char *) xmalloca (command_length);
       p = command;
       /* Don't shell_quote $JAVAC, because it may consist of a command
 	 and options.  */
@@ -696,7 +696,7 @@
 	envjavac_gcj43 = false;
 
      failed:
-      freesa (command);
+      freea (command);
 
       envjavac_tested = true;
     }
--- a/lib/javaexec.c
+++ b/lib/javaexec.c
@@ -32,7 +32,7 @@
 #include "sh-quote.h"
 #include "filename.h"
 #include "xalloc.h"
-#include "xallocsa.h"
+#include "xmalloca.h"
 #include "error.h"
 #include "gettext.h"
 
@@ -97,7 +97,7 @@
     {
       char *exe_pathname = concatenated_filename (exe_dir, class_name, EXEEXT);
       char *old_classpath;
-      char **argv = (char **) xallocsa ((1 + nargs + 1) * sizeof (char *));
+      char **argv = (char **) xmalloca ((1 + nargs + 1) * sizeof (char *));
       unsigned int i;
 
       /* Set CLASSPATH.  */
@@ -121,7 +121,7 @@
       /* Reset CLASSPATH.  */
       reset_classpath (old_classpath);
 
-      freesa (argv);
+      freea (argv);
 
       goto done1;
     }
@@ -152,7 +152,7 @@
 	  command_length += 1 + shell_quote_length (*arg);
 	command_length += 1;
 
-	command = (char *) xallocsa (command_length);
+	command = (char *) xmalloca (command_length);
 	p = command;
 	/* Don't shell_quote $JAVA, because it may consist of a command
 	   and options.  */
@@ -179,7 +179,7 @@
 	argv[3] = NULL;
 	err = executer (java, "/bin/sh", argv, private_data);
 
-	freesa (command);
+	freea (command);
 
 	/* Reset CLASSPATH.  */
 	reset_classpath (old_classpath);
@@ -218,7 +218,7 @@
     if (gij_present)
       {
 	char *old_classpath;
-	char **argv = (char **) xallocsa ((2 + nargs + 1) * sizeof (char *));
+	char **argv = (char **) xmalloca ((2 + nargs + 1) * sizeof (char *));
 	unsigned int i;
 
 	/* Set CLASSPATH.  */
@@ -243,7 +243,7 @@
 	/* Reset CLASSPATH.  */
 	reset_classpath (old_classpath);
 
-	freesa (argv);
+	freea (argv);
 
 	goto done2;
       }
@@ -271,7 +271,7 @@
     if (java_present)
       {
 	char *old_classpath;
-	char **argv = (char **) xallocsa ((2 + nargs + 1) * sizeof (char *));
+	char **argv = (char **) xmalloca ((2 + nargs + 1) * sizeof (char *));
 	unsigned int i;
 
 	/* Set CLASSPATH.  We don't use the "-classpath ..." option because
@@ -298,7 +298,7 @@
 	/* Reset CLASSPATH.  */
 	reset_classpath (old_classpath);
 
-	freesa (argv);
+	freea (argv);
 
 	goto done2;
       }
@@ -325,7 +325,7 @@
     if (jre_present)
       {
 	char *old_classpath;
-	char **argv = (char **) xallocsa ((2 + nargs + 1) * sizeof (char *));
+	char **argv = (char **) xmalloca ((2 + nargs + 1) * sizeof (char *));
 	unsigned int i;
 
 	/* Set CLASSPATH.  We don't use the "-classpath ..." option because
@@ -352,7 +352,7 @@
 	/* Reset CLASSPATH.  */
 	reset_classpath (old_classpath);
 
-	freesa (argv);
+	freea (argv);
 
 	goto done2;
       }
@@ -382,7 +382,7 @@
     if (jview_present)
       {
 	char *old_classpath;
-	char **argv = (char **) xallocsa ((2 + nargs + 1) * sizeof (char *));
+	char **argv = (char **) xmalloca ((2 + nargs + 1) * sizeof (char *));
 	unsigned int i;
 
 	/* Set CLASSPATH.  */
@@ -407,7 +407,7 @@
 	/* Reset CLASSPATH.  */
 	reset_classpath (old_classpath);
 
-	freesa (argv);
+	freea (argv);
 
 	goto done2;
       }
--- a/lib/mbscasestr.c
+++ b/lib/mbscasestr.c
@@ -25,7 +25,7 @@
 #include <stdbool.h>
 #include <stddef.h>  /* for NULL, in case a nonstandard string.h lacks it */
 
-#include "allocsa.h"
+#include "malloca.h"
 #if HAVE_MBRTOWC
 # include "mbuiter.h"
 #endif
@@ -43,7 +43,7 @@
   size_t m = strlen (needle);
 
   /* Allocate the table.  */
-  size_t *table = (size_t *) allocsa (m * sizeof (size_t));
+  size_t *table = (size_t *) malloca (m * sizeof (size_t));
   if (table == NULL)
     return false;
   /* Fill the table.
@@ -118,7 +118,7 @@
 	}
   }
 
-  freesa (table);
+  freea (table);
   return true;
 }
 
@@ -132,7 +132,7 @@
   size_t *table;
 
   /* Allocate room for needle_mbchars and the table.  */
-  char *memory = (char *) allocsa (m * (sizeof (mbchar_t) + sizeof (size_t)));
+  char *memory = (char *) malloca (m * (sizeof (mbchar_t) + sizeof (size_t)));
   if (memory == NULL)
     return false;
   needle_mbchars = (mbchar_t *) memory;
@@ -238,7 +238,7 @@
       }
   }
 
-  freesa (memory);
+  freea (memory);
   return true;
 }
 #endif
--- a/lib/mbsstr.c
+++ b/lib/mbsstr.c
@@ -24,7 +24,7 @@
 #include <stdbool.h>
 #include <stddef.h>  /* for NULL, in case a nonstandard string.h lacks it */
 
-#include "allocsa.h"
+#include "malloca.h"
 #if HAVE_MBRTOWC
 # include "mbuiter.h"
 #endif
@@ -40,7 +40,7 @@
   size_t m = strlen (needle);
 
   /* Allocate the table.  */
-  size_t *table = (size_t *) allocsa (m * sizeof (size_t));
+  size_t *table = (size_t *) malloca (m * sizeof (size_t));
   if (table == NULL)
     return false;
   /* Fill the table.
@@ -114,7 +114,7 @@
 	}
   }
 
-  freesa (table);
+  freea (table);
   return true;
 }
 
@@ -128,7 +128,7 @@
   size_t *table;
 
   /* Allocate room for needle_mbchars and the table.  */
-  char *memory = (char *) allocsa (m * (sizeof (mbchar_t) + sizeof (size_t)));
+  char *memory = (char *) malloca (m * (sizeof (mbchar_t) + sizeof (size_t)));
   if (memory == NULL)
     return false;
   needle_mbchars = (mbchar_t *) memory;
@@ -223,7 +223,7 @@
 	}
   }
 
-  freesa (memory);
+  freea (memory);
   return true;
 }
 #endif
--- a/lib/relocwrapper.c
+++ b/lib/relocwrapper.c
@@ -23,10 +23,10 @@
         -> xreadlink
            -> readlink
         -> canonicalize-lgpl
-           -> allocsa
+           -> malloca
     -> relocatable
     -> setenv
-       -> allocsa
+       -> malloca
     -> strerror
     -> c-ctype
 
--- a/lib/setenv.c
+++ b/lib/setenv.c
@@ -34,7 +34,7 @@
 #if _LIBC || !HAVE_SETENV
 
 #if !_LIBC
-# include "allocsa.h"
+# include "malloca.h"
 #endif
 
 #if !_LIBC
@@ -162,7 +162,7 @@
 	  __mempcpy (__mempcpy (__mempcpy (new_value, name, namelen), "=", 1),
 		     value, vallen);
 # else
-	  new_value = (char *) allocsa (namelen + 1 + vallen);
+	  new_value = (char *) malloca (namelen + 1 + vallen);
 	  if (new_value == NULL)
 	    {
 	      __set_errno (ENOMEM);
@@ -182,7 +182,7 @@
 	      if (new_environ[size] == NULL)
 		{
 #if defined USE_TSEARCH && !defined _LIBC
-		  freesa (new_value);
+		  freea (new_value);
 #endif
 		  __set_errno (ENOMEM);
 		  UNLOCK;
@@ -202,7 +202,7 @@
 	      STORE_VALUE (new_environ[size]);
 	    }
 #if defined USE_TSEARCH && !defined _LIBC
-	  freesa (new_value);
+	  freea (new_value);
 #endif
 	}
 
@@ -230,7 +230,7 @@
 	  __mempcpy (__mempcpy (__mempcpy (new_value, name, namelen), "=", 1),
 		     value, vallen);
 # else
-	  new_value = allocsa (namelen + 1 + vallen);
+	  new_value = malloca (namelen + 1 + vallen);
 	  if (new_value == NULL)
 	    {
 	      __set_errno (ENOMEM);
@@ -250,7 +250,7 @@
 	      if (np == NULL)
 		{
 #if defined USE_TSEARCH && !defined _LIBC
-		  freesa (new_value);
+		  freea (new_value);
 #endif
 		  __set_errno (ENOMEM);
 		  UNLOCK;
@@ -268,7 +268,7 @@
 	      STORE_VALUE (np);
 	    }
 #if defined USE_TSEARCH && !defined _LIBC
-	  freesa (new_value);
+	  freea (new_value);
 #endif
 	}
 
--- a/lib/strcasestr.c
+++ b/lib/strcasestr.c
@@ -25,7 +25,7 @@
 #include <stdbool.h>
 #include <stddef.h>  /* for NULL, in case a nonstandard string.h lacks it */
 
-#include "allocsa.h"
+#include "malloca.h"
 
 #define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch))
 
@@ -39,7 +39,7 @@
   size_t m = strlen (needle);
 
   /* Allocate the table.  */
-  size_t *table = (size_t *) allocsa (m * sizeof (size_t));
+  size_t *table = (size_t *) malloca (m * sizeof (size_t));
   if (table == NULL)
     return false;
   /* Fill the table.
@@ -114,7 +114,7 @@
 	}
   }
 
-  freesa (table);
+  freea (table);
   return true;
 }
 
--- a/lib/striconveha.c
+++ b/lib/striconveha.c
@@ -25,7 +25,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "allocsa.h"
+#include "malloca.h"
 #include "c-strcase.h"
 
 #define SIZEOF(a) (sizeof(a)/sizeof(a[0]))
@@ -231,7 +231,7 @@
     {
       int retval;
       size_t len = strlen (to_codeset);
-      char *to_codeset_suffixed = (char *) allocsa (len + 10 + 1);
+      char *to_codeset_suffixed = (char *) malloca (len + 10 + 1);
       memcpy (to_codeset_suffixed, to_codeset, len);
       memcpy (to_codeset_suffixed + len, "//TRANSLIT", 10 + 1);
 
@@ -239,7 +239,7 @@
 					from_codeset, to_codeset_suffixed,
 					handler, offsets, resultp, lengthp);
 
-      freesa (to_codeset_suffixed);
+      freea (to_codeset_suffixed);
 
       return retval;
     }
@@ -331,14 +331,14 @@
     {
       char *result;
       size_t len = strlen (to_codeset);
-      char *to_codeset_suffixed = (char *) allocsa (len + 10 + 1);
+      char *to_codeset_suffixed = (char *) malloca (len + 10 + 1);
       memcpy (to_codeset_suffixed, to_codeset, len);
       memcpy (to_codeset_suffixed + len, "//TRANSLIT", 10 + 1);
 
       result = str_iconveha_notranslit (src, from_codeset, to_codeset_suffixed,
 					handler);
 
-      freesa (to_codeset_suffixed);
+      freea (to_codeset_suffixed);
 
       return result;
     }
--- a/modules/c-strcasestr
+++ b/modules/c-strcasestr
@@ -8,7 +8,7 @@
 Depends-on:
 c-ctype
 stdbool
-allocsa
+malloca
 strnlen
 
 configure.ac:
--- a/modules/c-strstr
+++ b/modules/c-strstr
@@ -7,7 +7,7 @@
 
 Depends-on:
 stdbool
-allocsa
+malloca
 strnlen
 
 configure.ac:
--- a/modules/canonicalize-lgpl
+++ b/modules/canonicalize-lgpl
@@ -8,7 +8,7 @@
 
 Depends-on:
 alloca-opt
-allocsa
+malloca
 pathmax
 readlink
 
--- a/modules/clean-temp
+++ b/modules/clean-temp
@@ -14,7 +14,7 @@
 tmpdir
 mkdtemp
 xalloc
-xallocsa
+xmalloca
 linkedhash-list
 gettext-h
 
--- a/modules/csharpcomp
+++ b/modules/csharpcomp
@@ -7,7 +7,7 @@
 
 Depends-on:
 stdbool
-xallocsa
+xmalloca
 execute
 pipe
 wait-process
--- a/modules/csharpexec
+++ b/modules/csharpexec
@@ -13,7 +13,7 @@
 xsetenv
 sh-quote
 xalloc
-xallocsa
+xmalloca
 error
 gettext-h
 csharpexec-script
--- a/modules/javacomp
+++ b/modules/javacomp
@@ -18,7 +18,7 @@
 binary-io
 safe-read
 xalloc
-xallocsa
+xmalloca
 getline
 filename
 fwriteerror
--- a/modules/javaexec
+++ b/modules/javaexec
@@ -13,7 +13,7 @@
 sh-quote
 filename
 xalloc
-xallocsa
+xmalloca
 error
 gettext-h
 javaexec-script
--- a/modules/mbscasestr
+++ b/modules/mbscasestr
@@ -11,7 +11,7 @@
 stdbool
 string
 mbslen
-allocsa
+malloca
 strnlen
 
 configure.ac:
--- a/modules/mbsstr
+++ b/modules/mbsstr
@@ -11,7 +11,7 @@
 stdbool
 string
 mbslen
-allocsa
+malloca
 strnlen
 
 configure.ac:
--- a/modules/relocatable-prog-wrapper
+++ b/modules/relocatable-prog-wrapper
@@ -13,8 +13,8 @@
 lib/readlink.c
 lib/canonicalize.h
 lib/canonicalize-lgpl.c
-lib/allocsa.h
-lib/allocsa.c
+lib/malloca.h
+lib/malloca.c
 lib/relocatable.h
 lib/relocatable.c
 lib/setenv.h
@@ -22,7 +22,7 @@
 lib/strerror.c
 lib/c-ctype.h
 lib/c-ctype.c
-m4/allocsa.m4
+m4/malloca.m4
 m4/canonicalize-lgpl.m4
 m4/eealloc.m4
 m4/longlong.m4
--- a/modules/setenv
+++ b/modules/setenv
@@ -9,7 +9,7 @@
 m4/setenv.m4
 
 Depends-on:
-allocsa
+malloca
 alloca-opt
 unistd
 
--- a/modules/strcasestr
+++ b/modules/strcasestr
@@ -8,7 +8,7 @@
 Depends-on:
 string
 stdbool
-allocsa
+malloca
 strnlen
 
 configure.ac:
--- a/modules/striconveha
+++ b/modules/striconveha
@@ -9,7 +9,7 @@
 Depends-on:
 stdbool
 striconveh
-allocsa
+malloca
 strdup
 c-strcase