Commit 82e9f5e9 by Richard Stallman

(dwarfout_init): Report failure of getpwd.

From-SVN: r4930
parent 42cd476b
......@@ -5383,9 +5383,15 @@ dwarfout_init (asm_out_file, main_input_filename)
ASM_OUTPUT_PUSH_SECTION (asm_out_file, SFNAMES_SECTION);
ASM_OUTPUT_LABEL (asm_out_file, SFNAMES_BEGIN_LABEL);
{
register char *pwd = getpwd ();
register unsigned len = strlen (pwd);
register char *dirname = (char *) xmalloc (len + 2);
register char *pwd;
register unsigned len;
register char *dirname;
pwd = getpwd ();
if (!pwd)
pfatal_with_name ("getpwd");
len = strlen (pwd);
dirname = (char *) xmalloc (len + 2);
strcpy (dirname, pwd);
strcpy (dirname + len, "/");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment