#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"
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. */
null_stderr, true, true);
err = (exitstatus != 0);
- freesa (command);
+ freea (command);
return err;
}
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";
*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;
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;
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;
}
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";
null_stderr, true, true);
err = (exitstatus != 0);
- freesa (argv);
+ freea (argv);
return err;
}
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";
null_stderr, true, true);
err = (exitstatus != 0);
- freesa (argv);
+ freea (argv);
return err;
}
/* 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. */
envjavac_gcj = false;
failed:
- freesa (command);
+ freea (command);
envjavac_tested = true;
}
/* 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. */
envjavac_gcj43 = false;
failed:
- freesa (command);
+ freea (command);
envjavac_tested = true;
}