Commit d4f2852f by Kaveh R. Ghazi Committed by Kaveh Ghazi

c-aux-info.c: NULL_PTR->NULL in calls to `concat'.

	* c-aux-info.c: NULL_PTR->NULL in calls to `concat'.

	* gcc.c: Likewise.

	* prefix.c: Likewise.

From-SVN: r41675
parent 7200764f
2001-04-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* c-aux-info.c: NULL_PTR->NULL in calls to `concat'.
* gcc.c: Likewise.
* prefix.c: Likewise.
2001-04-28 Stan Shebs <shebs@apple.com> 2001-04-28 Stan Shebs <shebs@apple.com>
* objc/objc-act.c (handle_class_ref): Rewrite to flush target * objc/objc-act.c (handle_class_ref): Rewrite to flush target
......
...@@ -92,13 +92,13 @@ affix_data_type (param) ...@@ -92,13 +92,13 @@ affix_data_type (param)
add a blank after the data-type of course. */ add a blank after the data-type of course. */
if (p == type_or_decl) if (p == type_or_decl)
return concat (data_type, " ", type_or_decl, NULL_PTR); return concat (data_type, " ", type_or_decl, NULL);
saved = *p; saved = *p;
*p = '\0'; *p = '\0';
qualifiers_then_data_type = concat (type_or_decl, data_type, NULL_PTR); qualifiers_then_data_type = concat (type_or_decl, data_type, NULL);
*p = saved; *p = saved;
return concat (qualifiers_then_data_type, " ", p, NULL_PTR); return concat (qualifiers_then_data_type, " ", p, NULL);
} }
/* Given a tree node which represents some "function type", generate the /* Given a tree node which represents some "function type", generate the
...@@ -125,13 +125,13 @@ gen_formal_list_for_type (fntype, style) ...@@ -125,13 +125,13 @@ gen_formal_list_for_type (fntype, style)
const char *this_type; const char *this_type;
if (*formal_list) if (*formal_list)
formal_list = concat (formal_list, ", ", NULL_PTR); formal_list = concat (formal_list, ", ", NULL);
this_type = gen_type ("", TREE_VALUE (formal_type), ansi); this_type = gen_type ("", TREE_VALUE (formal_type), ansi);
formal_list formal_list
= ((strlen (this_type)) = ((strlen (this_type))
? concat (formal_list, affix_data_type (this_type), NULL_PTR) ? concat (formal_list, affix_data_type (this_type), NULL)
: concat (formal_list, data_type, NULL_PTR)); : concat (formal_list, data_type, NULL));
formal_type = TREE_CHAIN (formal_type); formal_type = TREE_CHAIN (formal_type);
} }
...@@ -180,10 +180,10 @@ gen_formal_list_for_type (fntype, style) ...@@ -180,10 +180,10 @@ gen_formal_list_for_type (fntype, style)
petered out to a NULL (i.e. without being terminated by a petered out to a NULL (i.e. without being terminated by a
void_type_node) then we need to tack on an ellipsis. */ void_type_node) then we need to tack on an ellipsis. */
if (!formal_type) if (!formal_type)
formal_list = concat (formal_list, ", ...", NULL_PTR); formal_list = concat (formal_list, ", ...", NULL);
} }
return concat (" (", formal_list, ")", NULL_PTR); return concat (" (", formal_list, ")", NULL);
} }
/* For the generation of an ANSI prototype for a function definition, we have /* For the generation of an ANSI prototype for a function definition, we have
...@@ -242,23 +242,23 @@ gen_formal_list_for_func_def (fndecl, style) ...@@ -242,23 +242,23 @@ gen_formal_list_for_func_def (fndecl, style)
const char *this_formal; const char *this_formal;
if (*formal_list && ((style == ansi) || (style == k_and_r_names))) if (*formal_list && ((style == ansi) || (style == k_and_r_names)))
formal_list = concat (formal_list, ", ", NULL_PTR); formal_list = concat (formal_list, ", ", NULL);
this_formal = gen_decl (formal_decl, 0, style); this_formal = gen_decl (formal_decl, 0, style);
if (style == k_and_r_decls) if (style == k_and_r_decls)
formal_list = concat (formal_list, this_formal, "; ", NULL_PTR); formal_list = concat (formal_list, this_formal, "; ", NULL);
else else
formal_list = concat (formal_list, this_formal, NULL_PTR); formal_list = concat (formal_list, this_formal, NULL);
formal_decl = TREE_CHAIN (formal_decl); formal_decl = TREE_CHAIN (formal_decl);
} }
if (style == ansi) if (style == ansi)
{ {
if (!DECL_ARGUMENTS (fndecl)) if (!DECL_ARGUMENTS (fndecl))
formal_list = concat (formal_list, "void", NULL_PTR); formal_list = concat (formal_list, "void", NULL);
if (deserves_ellipsis (TREE_TYPE (fndecl))) if (deserves_ellipsis (TREE_TYPE (fndecl)))
formal_list = concat (formal_list, ", ...", NULL_PTR); formal_list = concat (formal_list, ", ...", NULL);
} }
if ((style == ansi) || (style == k_and_r_names)) if ((style == ansi) || (style == k_and_r_names))
formal_list = concat (" (", formal_list, ")", NULL_PTR); formal_list = concat (" (", formal_list, ")", NULL);
return formal_list; return formal_list;
} }
...@@ -320,14 +320,14 @@ gen_type (ret_val, t, style) ...@@ -320,14 +320,14 @@ gen_type (ret_val, t, style)
{ {
case POINTER_TYPE: case POINTER_TYPE:
if (TYPE_READONLY (t)) if (TYPE_READONLY (t))
ret_val = concat ("const ", ret_val, NULL_PTR); ret_val = concat ("const ", ret_val, NULL);
if (TYPE_VOLATILE (t)) if (TYPE_VOLATILE (t))
ret_val = concat ("volatile ", ret_val, NULL_PTR); ret_val = concat ("volatile ", ret_val, NULL);
ret_val = concat ("*", ret_val, NULL_PTR); ret_val = concat ("*", ret_val, NULL);
if (TREE_CODE (TREE_TYPE (t)) == ARRAY_TYPE || TREE_CODE (TREE_TYPE (t)) == FUNCTION_TYPE) if (TREE_CODE (TREE_TYPE (t)) == ARRAY_TYPE || TREE_CODE (TREE_TYPE (t)) == FUNCTION_TYPE)
ret_val = concat ("(", ret_val, ")", NULL_PTR); ret_val = concat ("(", ret_val, ")", NULL);
ret_val = gen_type (ret_val, TREE_TYPE (t), style); ret_val = gen_type (ret_val, TREE_TYPE (t), style);
...@@ -335,17 +335,17 @@ gen_type (ret_val, t, style) ...@@ -335,17 +335,17 @@ gen_type (ret_val, t, style)
case ARRAY_TYPE: case ARRAY_TYPE:
if (!COMPLETE_TYPE_P (t) || TREE_CODE (TYPE_SIZE (t)) != INTEGER_CST) if (!COMPLETE_TYPE_P (t) || TREE_CODE (TYPE_SIZE (t)) != INTEGER_CST)
ret_val = gen_type (concat (ret_val, "[]", NULL_PTR), ret_val = gen_type (concat (ret_val, "[]", NULL),
TREE_TYPE (t), style); TREE_TYPE (t), style);
else if (int_size_in_bytes (t) == 0) else if (int_size_in_bytes (t) == 0)
ret_val = gen_type (concat (ret_val, "[0]", NULL_PTR), ret_val = gen_type (concat (ret_val, "[0]", NULL),
TREE_TYPE (t), style); TREE_TYPE (t), style);
else else
{ {
int size = (int_size_in_bytes (t) / int_size_in_bytes (TREE_TYPE (t))); int size = (int_size_in_bytes (t) / int_size_in_bytes (TREE_TYPE (t)));
char buff[10]; char buff[10];
sprintf (buff, "[%d]", size); sprintf (buff, "[%d]", size);
ret_val = gen_type (concat (ret_val, buff, NULL_PTR), ret_val = gen_type (concat (ret_val, buff, NULL),
TREE_TYPE (t), style); TREE_TYPE (t), style);
} }
break; break;
...@@ -353,7 +353,7 @@ gen_type (ret_val, t, style) ...@@ -353,7 +353,7 @@ gen_type (ret_val, t, style)
case FUNCTION_TYPE: case FUNCTION_TYPE:
ret_val = gen_type (concat (ret_val, ret_val = gen_type (concat (ret_val,
gen_formal_list_for_type (t, style), gen_formal_list_for_type (t, style),
NULL_PTR), NULL),
TREE_TYPE (t), style); TREE_TYPE (t), style);
break; break;
...@@ -382,13 +382,13 @@ gen_type (ret_val, t, style) ...@@ -382,13 +382,13 @@ gen_type (ret_val, t, style)
while (chain_p) while (chain_p)
{ {
data_type = concat (data_type, gen_decl (chain_p, 0, ansi), data_type = concat (data_type, gen_decl (chain_p, 0, ansi),
NULL_PTR); NULL);
chain_p = TREE_CHAIN (chain_p); chain_p = TREE_CHAIN (chain_p);
data_type = concat (data_type, "; ", NULL_PTR); data_type = concat (data_type, "; ", NULL);
} }
data_type = concat ("{ ", data_type, "}", NULL_PTR); data_type = concat ("{ ", data_type, "}", NULL);
} }
data_type = concat ("struct ", data_type, NULL_PTR); data_type = concat ("struct ", data_type, NULL);
break; break;
case UNION_TYPE: case UNION_TYPE:
...@@ -401,13 +401,13 @@ gen_type (ret_val, t, style) ...@@ -401,13 +401,13 @@ gen_type (ret_val, t, style)
while (chain_p) while (chain_p)
{ {
data_type = concat (data_type, gen_decl (chain_p, 0, ansi), data_type = concat (data_type, gen_decl (chain_p, 0, ansi),
NULL_PTR); NULL);
chain_p = TREE_CHAIN (chain_p); chain_p = TREE_CHAIN (chain_p);
data_type = concat (data_type, "; ", NULL_PTR); data_type = concat (data_type, "; ", NULL);
} }
data_type = concat ("{ ", data_type, "}", NULL_PTR); data_type = concat ("{ ", data_type, "}", NULL);
} }
data_type = concat ("union ", data_type, NULL_PTR); data_type = concat ("union ", data_type, NULL);
break; break;
case ENUMERAL_TYPE: case ENUMERAL_TYPE:
...@@ -420,14 +420,14 @@ gen_type (ret_val, t, style) ...@@ -420,14 +420,14 @@ gen_type (ret_val, t, style)
while (chain_p) while (chain_p)
{ {
data_type = concat (data_type, data_type = concat (data_type,
IDENTIFIER_POINTER (TREE_PURPOSE (chain_p)), NULL_PTR); IDENTIFIER_POINTER (TREE_PURPOSE (chain_p)), NULL);
chain_p = TREE_CHAIN (chain_p); chain_p = TREE_CHAIN (chain_p);
if (chain_p) if (chain_p)
data_type = concat (data_type, ", ", NULL_PTR); data_type = concat (data_type, ", ", NULL);
} }
data_type = concat ("{ ", data_type, " }", NULL_PTR); data_type = concat ("{ ", data_type, " }", NULL);
} }
data_type = concat ("enum ", data_type, NULL_PTR); data_type = concat ("enum ", data_type, NULL);
break; break;
case TYPE_DECL: case TYPE_DECL:
...@@ -439,7 +439,7 @@ gen_type (ret_val, t, style) ...@@ -439,7 +439,7 @@ gen_type (ret_val, t, style)
/* Normally, `unsigned' is part of the deal. Not so if it comes /* Normally, `unsigned' is part of the deal. Not so if it comes
with a type qualifier. */ with a type qualifier. */
if (TREE_UNSIGNED (t) && TYPE_QUALS (t)) if (TREE_UNSIGNED (t) && TYPE_QUALS (t))
data_type = concat ("unsigned ", data_type, NULL_PTR); data_type = concat ("unsigned ", data_type, NULL);
break; break;
case REAL_TYPE: case REAL_TYPE:
...@@ -459,11 +459,11 @@ gen_type (ret_val, t, style) ...@@ -459,11 +459,11 @@ gen_type (ret_val, t, style)
} }
} }
if (TYPE_READONLY (t)) if (TYPE_READONLY (t))
ret_val = concat ("const ", ret_val, NULL_PTR); ret_val = concat ("const ", ret_val, NULL);
if (TYPE_VOLATILE (t)) if (TYPE_VOLATILE (t))
ret_val = concat ("volatile ", ret_val, NULL_PTR); ret_val = concat ("volatile ", ret_val, NULL);
if (TYPE_RESTRICT (t)) if (TYPE_RESTRICT (t))
ret_val = concat ("restrict ", ret_val, NULL_PTR); ret_val = concat ("restrict ", ret_val, NULL);
return ret_val; return ret_val;
} }
...@@ -505,9 +505,9 @@ gen_decl (decl, is_func_definition, style) ...@@ -505,9 +505,9 @@ gen_decl (decl, is_func_definition, style)
generate the qualifiers here. */ generate the qualifiers here. */
if (TREE_THIS_VOLATILE (decl)) if (TREE_THIS_VOLATILE (decl))
ret_val = concat ("volatile ", ret_val, NULL_PTR); ret_val = concat ("volatile ", ret_val, NULL);
if (TREE_READONLY (decl)) if (TREE_READONLY (decl))
ret_val = concat ("const ", ret_val, NULL_PTR); ret_val = concat ("const ", ret_val, NULL);
data_type = ""; data_type = "";
...@@ -526,7 +526,7 @@ gen_decl (decl, is_func_definition, style) ...@@ -526,7 +526,7 @@ gen_decl (decl, is_func_definition, style)
if (TREE_CODE (decl) == FUNCTION_DECL && is_func_definition) if (TREE_CODE (decl) == FUNCTION_DECL && is_func_definition)
{ {
ret_val = concat (ret_val, gen_formal_list_for_func_def (decl, ansi), ret_val = concat (ret_val, gen_formal_list_for_func_def (decl, ansi),
NULL_PTR); NULL);
/* Since we have already added in the formals list stuff, here we don't /* Since we have already added in the formals list stuff, here we don't
add the whole "type" of the function we are considering (which add the whole "type" of the function we are considering (which
...@@ -543,11 +543,11 @@ gen_decl (decl, is_func_definition, style) ...@@ -543,11 +543,11 @@ gen_decl (decl, is_func_definition, style)
ret_val = affix_data_type (ret_val); ret_val = affix_data_type (ret_val);
if (TREE_CODE (decl) != FUNCTION_DECL && DECL_REGISTER (decl)) if (TREE_CODE (decl) != FUNCTION_DECL && DECL_REGISTER (decl))
ret_val = concat ("register ", ret_val, NULL_PTR); ret_val = concat ("register ", ret_val, NULL);
if (TREE_PUBLIC (decl)) if (TREE_PUBLIC (decl))
ret_val = concat ("extern ", ret_val, NULL_PTR); ret_val = concat ("extern ", ret_val, NULL);
if (TREE_CODE (decl) == FUNCTION_DECL && !TREE_PUBLIC (decl)) if (TREE_CODE (decl) == FUNCTION_DECL && !TREE_PUBLIC (decl))
ret_val = concat ("static ", ret_val, NULL_PTR); ret_val = concat ("static ", ret_val, NULL);
return ret_val; return ret_val;
} }
......
...@@ -1058,7 +1058,7 @@ translate_options (argcp, argvp) ...@@ -1058,7 +1058,7 @@ translate_options (argcp, argvp)
/* Store the translation as one argv elt or as two. */ /* Store the translation as one argv elt or as two. */
if (arg != 0 && strchr (arginfo, 'j') != 0) if (arg != 0 && strchr (arginfo, 'j') != 0)
newv[newindex++] = concat (option_map[j].equivalent, arg, newv[newindex++] = concat (option_map[j].equivalent, arg,
NULL_PTR); NULL);
else if (arg != 0) else if (arg != 0)
{ {
newv[newindex++] = option_map[j].equivalent; newv[newindex++] = option_map[j].equivalent;
...@@ -1505,7 +1505,7 @@ set_spec (name, spec) ...@@ -1505,7 +1505,7 @@ set_spec (name, spec)
old_spec = *(sl->ptr_spec); old_spec = *(sl->ptr_spec);
*(sl->ptr_spec) = ((spec[0] == '+' && ISSPACE ((unsigned char)spec[1])) *(sl->ptr_spec) = ((spec[0] == '+' && ISSPACE ((unsigned char)spec[1]))
? concat (old_spec, spec + 1, NULL_PTR) ? concat (old_spec, spec + 1, NULL)
: xstrdup (spec)); : xstrdup (spec));
#ifdef DEBUG_SPECS #ifdef DEBUG_SPECS
...@@ -3030,7 +3030,7 @@ process_command (argc, argv) ...@@ -3030,7 +3030,7 @@ process_command (argc, argv)
gcc_exec_prefix = make_relative_prefix (argv[0], standard_bindir_prefix, gcc_exec_prefix = make_relative_prefix (argv[0], standard_bindir_prefix,
standard_exec_prefix); standard_exec_prefix);
if (gcc_exec_prefix) if (gcc_exec_prefix)
putenv (concat ("GCC_EXEC_PREFIX=", gcc_exec_prefix, NULL_PTR)); putenv (concat ("GCC_EXEC_PREFIX=", gcc_exec_prefix, NULL));
} }
#endif #endif
...@@ -3072,7 +3072,7 @@ process_command (argc, argv) ...@@ -3072,7 +3072,7 @@ process_command (argc, argv)
{ {
strncpy (nstore, startp, endp - startp); strncpy (nstore, startp, endp - startp);
if (endp == startp) if (endp == startp)
strcpy (nstore, concat (".", dir_separator_str, NULL_PTR)); strcpy (nstore, concat (".", dir_separator_str, NULL));
else if (!IS_DIR_SEPARATOR (endp[-1])) else if (!IS_DIR_SEPARATOR (endp[-1]))
{ {
nstore[endp - startp] = DIR_SEPARATOR; nstore[endp - startp] = DIR_SEPARATOR;
...@@ -3083,7 +3083,7 @@ process_command (argc, argv) ...@@ -3083,7 +3083,7 @@ process_command (argc, argv)
add_prefix (&exec_prefixes, nstore, 0, add_prefix (&exec_prefixes, nstore, 0,
PREFIX_PRIORITY_LAST, 0, NULL_PTR); PREFIX_PRIORITY_LAST, 0, NULL_PTR);
add_prefix (&include_prefixes, add_prefix (&include_prefixes,
concat (nstore, "include", NULL_PTR), concat (nstore, "include", NULL),
0, PREFIX_PRIORITY_LAST, 0, NULL_PTR); 0, PREFIX_PRIORITY_LAST, 0, NULL_PTR);
if (*endp == 0) if (*endp == 0)
break; break;
...@@ -3107,7 +3107,7 @@ process_command (argc, argv) ...@@ -3107,7 +3107,7 @@ process_command (argc, argv)
{ {
strncpy (nstore, startp, endp - startp); strncpy (nstore, startp, endp - startp);
if (endp == startp) if (endp == startp)
strcpy (nstore, concat (".", dir_separator_str, NULL_PTR)); strcpy (nstore, concat (".", dir_separator_str, NULL));
else if (!IS_DIR_SEPARATOR (endp[-1])) else if (!IS_DIR_SEPARATOR (endp[-1]))
{ {
nstore[endp - startp] = DIR_SEPARATOR; nstore[endp - startp] = DIR_SEPARATOR;
...@@ -3140,7 +3140,7 @@ process_command (argc, argv) ...@@ -3140,7 +3140,7 @@ process_command (argc, argv)
{ {
strncpy (nstore, startp, endp - startp); strncpy (nstore, startp, endp - startp);
if (endp == startp) if (endp == startp)
strcpy (nstore, concat (".", dir_separator_str, NULL_PTR)); strcpy (nstore, concat (".", dir_separator_str, NULL));
else if (!IS_DIR_SEPARATOR (endp[-1])) else if (!IS_DIR_SEPARATOR (endp[-1]))
{ {
nstore[endp - startp] = DIR_SEPARATOR; nstore[endp - startp] = DIR_SEPARATOR;
...@@ -3390,8 +3390,7 @@ process_command (argc, argv) ...@@ -3390,8 +3390,7 @@ process_command (argc, argv)
PREFIX_PRIORITY_B_OPT, 0, &warn_B); PREFIX_PRIORITY_B_OPT, 0, &warn_B);
add_prefix (&startfile_prefixes, value, NULL_PTR, add_prefix (&startfile_prefixes, value, NULL_PTR,
PREFIX_PRIORITY_B_OPT, 0, &warn_B); PREFIX_PRIORITY_B_OPT, 0, &warn_B);
add_prefix (&include_prefixes, concat (value, "include", add_prefix (&include_prefixes, concat (value, "include", NULL),
NULL_PTR),
NULL_PTR, NULL_PTR,
PREFIX_PRIORITY_B_OPT, 0, NULL_PTR); PREFIX_PRIORITY_B_OPT, 0, NULL_PTR);
n_switches++; n_switches++;
...@@ -3579,7 +3578,7 @@ process_command (argc, argv) ...@@ -3579,7 +3578,7 @@ process_command (argc, argv)
PREFIX_PRIORITY_LAST, 1, warn_std_ptr); PREFIX_PRIORITY_LAST, 1, warn_std_ptr);
tooldir_prefix = concat (tooldir_base_prefix, spec_machine, tooldir_prefix = concat (tooldir_base_prefix, spec_machine,
dir_separator_str, NULL_PTR); dir_separator_str, NULL);
/* If tooldir is relative, base it on exec_prefixes. A relative /* If tooldir is relative, base it on exec_prefixes. A relative
tooldir lets us move the installed tree as a unit. tooldir lets us move the installed tree as a unit.
...@@ -3594,28 +3593,28 @@ process_command (argc, argv) ...@@ -3594,28 +3593,28 @@ process_command (argc, argv)
{ {
char *gcc_exec_tooldir_prefix char *gcc_exec_tooldir_prefix
= concat (gcc_exec_prefix, spec_machine, dir_separator_str, = concat (gcc_exec_prefix, spec_machine, dir_separator_str,
spec_version, dir_separator_str, tooldir_prefix, NULL_PTR); spec_version, dir_separator_str, tooldir_prefix, NULL);
add_prefix (&exec_prefixes, add_prefix (&exec_prefixes,
concat (gcc_exec_tooldir_prefix, "bin", concat (gcc_exec_tooldir_prefix, "bin",
dir_separator_str, NULL_PTR), dir_separator_str, NULL),
NULL_PTR, PREFIX_PRIORITY_LAST, 0, NULL_PTR); NULL_PTR, PREFIX_PRIORITY_LAST, 0, NULL_PTR);
add_prefix (&startfile_prefixes, add_prefix (&startfile_prefixes,
concat (gcc_exec_tooldir_prefix, "lib", concat (gcc_exec_tooldir_prefix, "lib",
dir_separator_str, NULL_PTR), dir_separator_str, NULL),
NULL_PTR, PREFIX_PRIORITY_LAST, 0, NULL_PTR); NULL_PTR, PREFIX_PRIORITY_LAST, 0, NULL_PTR);
} }
tooldir_prefix = concat (standard_exec_prefix, spec_machine, tooldir_prefix = concat (standard_exec_prefix, spec_machine,
dir_separator_str, spec_version, dir_separator_str, spec_version,
dir_separator_str, tooldir_prefix, NULL_PTR); dir_separator_str, tooldir_prefix, NULL);
} }
add_prefix (&exec_prefixes, add_prefix (&exec_prefixes,
concat (tooldir_prefix, "bin", dir_separator_str, NULL_PTR), concat (tooldir_prefix, "bin", dir_separator_str, NULL),
"BINUTILS", PREFIX_PRIORITY_LAST, 0, NULL_PTR); "BINUTILS", PREFIX_PRIORITY_LAST, 0, NULL_PTR);
add_prefix (&startfile_prefixes, add_prefix (&startfile_prefixes,
concat (tooldir_prefix, "lib", dir_separator_str, NULL_PTR), concat (tooldir_prefix, "lib", dir_separator_str, NULL),
"BINUTILS", PREFIX_PRIORITY_LAST, 0, NULL_PTR); "BINUTILS", PREFIX_PRIORITY_LAST, 0, NULL_PTR);
/* More prefixes are enabled in main, after we read the specs file /* More prefixes are enabled in main, after we read the specs file
...@@ -3740,7 +3739,7 @@ process_command (argc, argv) ...@@ -3740,7 +3739,7 @@ process_command (argc, argv)
{ /* POSIX allows separation of -l and the lib arg; { /* POSIX allows separation of -l and the lib arg;
canonicalize by concatenating -l with its arg */ canonicalize by concatenating -l with its arg */
infiles[n_infiles].language = "*"; infiles[n_infiles].language = "*";
infiles[n_infiles++].name = concat ("-l", argv[++i], NULL_PTR); infiles[n_infiles++].name = concat ("-l", argv[++i], NULL);
} }
else if (strncmp (argv[i], "-l", 2) == 0) else if (strncmp (argv[i], "-l", 2) == 0)
{ {
...@@ -5374,11 +5373,11 @@ is_directory (path1, path2, linker) ...@@ -5374,11 +5373,11 @@ is_directory (path1, path2, linker)
if (linker if (linker
&& ((cp - path == 6 && ((cp - path == 6
&& strcmp (path, concat (dir_separator_str, "lib", && strcmp (path, concat (dir_separator_str, "lib",
dir_separator_str, ".", NULL_PTR)) == 0) dir_separator_str, ".", NULL)) == 0)
|| (cp - path == 10 || (cp - path == 10
&& strcmp (path, concat (dir_separator_str, "usr", && strcmp (path, concat (dir_separator_str, "usr",
dir_separator_str, "lib", dir_separator_str, "lib",
dir_separator_str, ".", NULL_PTR)) == 0))) dir_separator_str, ".", NULL)) == 0)))
return 0; return 0;
return (stat (path, &st) >= 0 && S_ISDIR (st.st_mode)); return (stat (path, &st) >= 0 && S_ISDIR (st.st_mode));
...@@ -5617,8 +5616,8 @@ main (argc, argv) ...@@ -5617,8 +5616,8 @@ main (argc, argv)
/* Read specs from a file if there is one. */ /* Read specs from a file if there is one. */
machine_suffix = concat (spec_machine, dir_separator_str, machine_suffix = concat (spec_machine, dir_separator_str,
spec_version, dir_separator_str, NULL_PTR); spec_version, dir_separator_str, NULL);
just_machine_suffix = concat (spec_machine, dir_separator_str, NULL_PTR); just_machine_suffix = concat (spec_machine, dir_separator_str, NULL);
specs_file = find_a_file (&startfile_prefixes, "specs", R_OK); specs_file = find_a_file (&startfile_prefixes, "specs", R_OK);
/* Read the specs file unless it is a default one. */ /* Read the specs file unless it is a default one. */
...@@ -5670,12 +5669,12 @@ main (argc, argv) ...@@ -5670,12 +5669,12 @@ main (argc, argv)
if (gcc_exec_prefix) if (gcc_exec_prefix)
add_prefix (&startfile_prefixes, add_prefix (&startfile_prefixes,
concat (gcc_exec_prefix, machine_suffix, concat (gcc_exec_prefix, machine_suffix,
standard_startfile_prefix, NULL_PTR), standard_startfile_prefix, NULL),
NULL_PTR, PREFIX_PRIORITY_LAST, 0, NULL_PTR); NULL_PTR, PREFIX_PRIORITY_LAST, 0, NULL_PTR);
add_prefix (&startfile_prefixes, add_prefix (&startfile_prefixes,
concat (standard_exec_prefix, concat (standard_exec_prefix,
machine_suffix, machine_suffix,
standard_startfile_prefix, NULL_PTR), standard_startfile_prefix, NULL),
NULL_PTR, PREFIX_PRIORITY_LAST, 0, NULL_PTR); NULL_PTR, PREFIX_PRIORITY_LAST, 0, NULL_PTR);
} }
...@@ -5694,7 +5693,7 @@ main (argc, argv) ...@@ -5694,7 +5693,7 @@ main (argc, argv)
&& gcc_exec_prefix) && gcc_exec_prefix)
add_prefix (&startfile_prefixes, add_prefix (&startfile_prefixes,
concat (gcc_exec_prefix, machine_suffix, concat (gcc_exec_prefix, machine_suffix,
standard_startfile_prefix, NULL_PTR), standard_startfile_prefix, NULL),
"BINUTILS", PREFIX_PRIORITY_LAST, 0, NULL_PTR); "BINUTILS", PREFIX_PRIORITY_LAST, 0, NULL_PTR);
} }
......
...@@ -96,7 +96,7 @@ get_key_value (key) ...@@ -96,7 +96,7 @@ get_key_value (key)
#endif #endif
if (prefix == 0) if (prefix == 0)
prefix = getenv (temp = concat (key, "_ROOT", NULL_PTR)); prefix = getenv (temp = concat (key, "_ROOT", NULL));
if (prefix == 0) if (prefix == 0)
prefix = std_prefix; prefix = std_prefix;
...@@ -273,7 +273,7 @@ translate_name (name) ...@@ -273,7 +273,7 @@ translate_name (name)
and intended by the user, causing two path components to run and intended by the user, causing two path components to run
together. */ together. */
return concat (prefix, name, NULL_PTR); return concat (prefix, name, NULL);
} }
/* Update PATH using KEY if PATH starts with PREFIX. */ /* Update PATH using KEY if PATH starts with PREFIX. */
...@@ -286,9 +286,9 @@ update_path (path, key) ...@@ -286,9 +286,9 @@ update_path (path, key)
if (! strncmp (path, std_prefix, strlen (std_prefix)) && key != 0) if (! strncmp (path, std_prefix, strlen (std_prefix)) && key != 0)
{ {
if (key[0] != '$') if (key[0] != '$')
key = concat ("@", key, NULL_PTR); key = concat ("@", key, NULL);
path = concat (key, &path[strlen (std_prefix)], NULL_PTR); path = concat (key, &path[strlen (std_prefix)], NULL);
while (path[0] == '@' || path[0] == '$') while (path[0] == '@' || path[0] == '$')
path = translate_name (path); path = translate_name (path);
......
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