openbsd-ports/lang/gcc/4.0/patches/patch-gcc_gcc_c
espie 889110dd72 update to more recent snapshot.
(synch patches using update-patches, no functional changes)
2005-01-03 16:23:48 +00:00

202 lines
7.9 KiB
Plaintext

$OpenBSD: patch-gcc_gcc_c,v 1.3 2005/01/03 16:23:48 espie Exp $
--- gcc/gcc.c.orig Thu Dec 16 00:50:26 2004
+++ gcc/gcc.c Mon Jan 3 15:47:20 2005
@@ -1299,7 +1299,7 @@ translate_options (int *argcp, const cha
/* Store the translation as one argv elt or as two. */
if (arg != 0 && strchr (arginfo, 'j') != 0)
newv[newindex++] = concat (option_map[j].equivalent, arg,
- NULL);
+ (void *)0);
else if (arg != 0)
{
newv[newindex++] = option_map[j].equivalent;
@@ -1615,7 +1615,7 @@ init_gcc_specs (struct obstack *obstack,
shared_name,
#endif
#endif
- "}}}", NULL);
+ "}}}", (void *)0);
obstack_grow (obstack, buf, strlen (buf));
free (buf);
@@ -1822,7 +1822,7 @@ set_spec (const char *name, const char *
old_spec = *(sl->ptr_spec);
*(sl->ptr_spec) = ((spec[0] == '+' && ISSPACE ((unsigned char)spec[1]))
- ? concat (old_spec, spec + 1, NULL)
+ ? concat (old_spec, spec + 1, (void *)0)
: xstrdup (spec));
#ifdef DEBUG_SPECS
@@ -2480,10 +2480,10 @@ find_a_file (struct path_prefix *pprefix
len += len1 > len2 ? len1 : len2;
if (multilib_dir)
multilib_name = ACONCAT ((multilib_dir, dir_separator_str, name,
- NULL));
+ (void *)0));
if (strcmp (multilib_os_dir, ".") != 0)
multilib_os_name = ACONCAT ((multilib_os_dir, dir_separator_str, name,
- NULL));
+ (void *)0));
}
temp = xmalloc (len);
@@ -2642,8 +2642,8 @@ add_sysrooted_prefix (struct path_prefix
if (target_system_root)
{
if (target_sysroot_suffix)
- prefix = concat (target_sysroot_suffix, prefix, NULL);
- prefix = concat (target_system_root, prefix, NULL);
+ prefix = concat (target_sysroot_suffix, prefix, (void *)0);
+ prefix = concat (target_system_root, prefix, (void *)0);
/* We have to override this because GCC's notion of sysroot
moves along with GCC. */
@@ -3215,7 +3215,7 @@ process_command (int argc, const char **
break;
new_argv0 = xmemdup (progname, baselen,
baselen + concat_length (new_version, new_machine,
- "-gcc-", NULL) + 1);
+ "-gcc-", (void *)0) + 1);
strcpy (new_argv0 + baselen, new_machine);
strcat (new_argv0, "-gcc-");
strcat (new_argv0, new_version);
@@ -3242,7 +3242,7 @@ process_command (int argc, const char **
standard_bindir_prefix,
standard_libexec_prefix);
if (gcc_exec_prefix)
- putenv (concat ("GCC_EXEC_PREFIX=", gcc_exec_prefix, NULL));
+ putenv (concat ("GCC_EXEC_PREFIX=", gcc_exec_prefix, (void *)0));
}
else
gcc_libexec_prefix = make_relative_prefix (gcc_exec_prefix,
@@ -3289,7 +3289,7 @@ process_command (int argc, const char **
{
strncpy (nstore, startp, endp - startp);
if (endp == startp)
- strcpy (nstore, concat (".", dir_separator_str, NULL));
+ strcpy (nstore, concat (".", dir_separator_str, (void *)0));
else if (!IS_DIR_SEPARATOR (endp[-1]))
{
nstore[endp - startp] = DIR_SEPARATOR;
@@ -3323,7 +3323,7 @@ process_command (int argc, const char **
{
strncpy (nstore, startp, endp - startp);
if (endp == startp)
- strcpy (nstore, concat (".", dir_separator_str, NULL));
+ strcpy (nstore, concat (".", dir_separator_str, (void *)0));
else if (!IS_DIR_SEPARATOR (endp[-1]))
{
nstore[endp - startp] = DIR_SEPARATOR;
@@ -3356,7 +3356,7 @@ process_command (int argc, const char **
{
strncpy (nstore, startp, endp - startp);
if (endp == startp)
- strcpy (nstore, concat (".", dir_separator_str, NULL));
+ strcpy (nstore, concat (".", dir_separator_str, (void *)0));
else if (!IS_DIR_SEPARATOR (endp[-1]))
{
nstore[endp - startp] = DIR_SEPARATOR;
@@ -3824,7 +3824,7 @@ warranty; not even for MERCHANTABILITY o
PREFIX_PRIORITY_LAST, 1, 0);
tooldir_prefix = concat (tooldir_base_prefix, spec_machine,
- dir_separator_str, NULL);
+ dir_separator_str, (void *)0);
/* If tooldir is relative, base it on exec_prefixes. A relative
tooldir lets us move the installed tree as a unit.
@@ -3839,28 +3839,28 @@ warranty; not even for MERCHANTABILITY o
{
char *gcc_exec_tooldir_prefix
= concat (gcc_exec_prefix, spec_machine, dir_separator_str,
- spec_version, dir_separator_str, tooldir_prefix, NULL);
+ spec_version, dir_separator_str, tooldir_prefix, (void *)0);
add_prefix (&exec_prefixes,
concat (gcc_exec_tooldir_prefix, "bin",
- dir_separator_str, NULL),
+ dir_separator_str, (void *)0),
NULL, PREFIX_PRIORITY_LAST, 0, 0);
add_prefix (&startfile_prefixes,
concat (gcc_exec_tooldir_prefix, "lib",
- dir_separator_str, NULL),
+ dir_separator_str, (void *)0),
NULL, PREFIX_PRIORITY_LAST, 0, 1);
}
tooldir_prefix = concat (standard_exec_prefix, spec_machine,
dir_separator_str, spec_version,
- dir_separator_str, tooldir_prefix, NULL);
+ dir_separator_str, tooldir_prefix, (void *)0);
}
add_prefix (&exec_prefixes,
- concat (tooldir_prefix, "bin", dir_separator_str, NULL),
+ concat (tooldir_prefix, "bin", dir_separator_str, (void *)0),
"BINUTILS", PREFIX_PRIORITY_LAST, 0, 0);
add_prefix (&startfile_prefixes,
- concat (tooldir_prefix, "lib", dir_separator_str, NULL),
+ concat (tooldir_prefix, "lib", dir_separator_str, (void *)0),
"BINUTILS", PREFIX_PRIORITY_LAST, 0, 1);
#if defined(TARGET_SYSTEM_ROOT_RELOCATABLE) && !defined(VMS)
@@ -3983,7 +3983,7 @@ warranty; not even for MERCHANTABILITY o
{ /* POSIX allows separation of -l and the lib arg;
canonicalize by concatenating -l with its arg */
infiles[n_infiles].language = "*";
- infiles[n_infiles++].name = concat ("-l", argv[++i], NULL);
+ infiles[n_infiles++].name = concat ("-l", argv[++i], (void *)0);
}
else if (strncmp (argv[i], "-l", 2) == 0)
{
@@ -5936,11 +5936,11 @@ is_directory (const char *path1, const c
if (linker
&& ((cp - path == 6
&& strcmp (path, concat (dir_separator_str, "lib",
- dir_separator_str, ".", NULL)) == 0)
+ dir_separator_str, ".", (void *)0)) == 0)
|| (cp - path == 10
&& strcmp (path, concat (dir_separator_str, "usr",
dir_separator_str, "lib",
- dir_separator_str, ".", NULL)) == 0)))
+ dir_separator_str, ".", (void *)0)) == 0)))
return 0;
return (stat (path, &st) >= 0 && S_ISDIR (st.st_mode));
@@ -6124,8 +6124,8 @@ main (int argc, const char **argv)
/* Read specs from a file if there is one. */
machine_suffix = concat (spec_machine, dir_separator_str,
- spec_version, dir_separator_str, NULL);
- just_machine_suffix = concat (spec_machine, dir_separator_str, NULL);
+ spec_version, dir_separator_str, (void *)0);
+ just_machine_suffix = concat (spec_machine, dir_separator_str, (void *)0);
specs_file = find_a_file (&startfile_prefixes, "specs", R_OK, 0);
/* Read the specs file unless it is a default one. */
@@ -6230,12 +6230,12 @@ main (int argc, const char **argv)
if (gcc_exec_prefix)
add_prefix (&startfile_prefixes,
concat (gcc_exec_prefix, machine_suffix,
- standard_startfile_prefix, NULL),
+ standard_startfile_prefix, (void *)0),
NULL, PREFIX_PRIORITY_LAST, 0, 1);
add_prefix (&startfile_prefixes,
concat (standard_exec_prefix,
machine_suffix,
- standard_startfile_prefix, NULL),
+ standard_startfile_prefix, (void *)0),
NULL, PREFIX_PRIORITY_LAST, 0, 1);
}
@@ -6261,7 +6261,7 @@ main (int argc, const char **argv)
/* If we have a GCC_EXEC_PREFIX envvar, modify it for cpp's sake. */
if (gcc_exec_prefix)
gcc_exec_prefix = concat (gcc_exec_prefix, spec_machine, dir_separator_str,
- spec_version, dir_separator_str, NULL);
+ spec_version, dir_separator_str, (void *)0);
/* Now we have the specs.
Set the `valid' bits for switches that match anything in any spec. */