$OpenBSD: patch-gcc_gcc_c,v 1.1.1.1 2007/03/17 22:35:25 espie Exp $
--- gcc/gcc.c.orig	Tue Mar  6 16:50:28 2007
+++ gcc/gcc.c	Mon Mar 12 14:55:44 2007
@@ -1322,7 +1322,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;
@@ -1660,7 +1660,7 @@ init_gcc_specs (struct obstack *obstack,
 		"%{shared:", shared_name, "}"
 #endif
 #endif
-		"}}", NULL);
+		"}}", (void *)0);
 
   obstack_grow (obstack, buf, strlen (buf));
   free (buf);
@@ -1858,7 +1858,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
@@ -2428,12 +2428,12 @@ for_each_path (const struct path_prefix 
   just_multi_suffix = just_machine_suffix;
   if (do_multi && multilib_dir && strcmp (multilib_dir, ".") != 0)
     {
-      multi_dir = concat (multilib_dir, dir_separator_str, NULL);
-      multi_suffix = concat (multi_suffix, multi_dir, NULL);
-      just_multi_suffix = concat (just_multi_suffix, multi_dir, NULL);
+      multi_dir = concat (multilib_dir, dir_separator_str, (void *)0);
+      multi_suffix = concat (multi_suffix, multi_dir, (void *)0);
+      just_multi_suffix = concat (just_multi_suffix, multi_dir, (void *)0);
     }
   if (do_multi && multilib_os_dir && strcmp (multilib_os_dir, ".") != 0)
-    multi_os_dir = concat (multilib_os_dir, dir_separator_str, NULL);
+    multi_os_dir = concat (multilib_os_dir, dir_separator_str, (void *)0);
 
   while (1)
     {
@@ -2780,8 +2780,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.  */
@@ -3367,7 +3367,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);
@@ -3394,7 +3394,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
     {
@@ -3402,7 +3402,7 @@ process_command (int argc, const char **
 	 GCC_EXEC_PREFIX is typically a directory name with a trailing
 	 / (which is ignored by make_relative_prefix), so append a
 	 program name.  */
-      char *tmp_prefix = concat (gcc_exec_prefix, "gcc", NULL);
+      char *tmp_prefix = concat (gcc_exec_prefix, "gcc", (void *)0);
       gcc_libexec_prefix = make_relative_prefix (tmp_prefix,
 						 standard_exec_prefix,
 						 standard_libexec_prefix);
@@ -3457,7 +3457,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;
@@ -3491,7 +3491,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;
@@ -3524,7 +3524,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;
@@ -3992,20 +3992,20 @@ warranty; not even for MERCHANTABILITY o
 
   gcc_assert (!IS_ABSOLUTE_PATH (tooldir_base_prefix));
   tooldir_prefix = concat (tooldir_base_prefix, spec_machine,
-			   dir_separator_str, NULL);
+			   dir_separator_str, (void *)0);
 
   /* Look for tools relative to the location from which the driver is
      running, or, if that is not available, the configured prefix.  */
   tooldir_prefix
     = concat (gcc_exec_prefix ? gcc_exec_prefix : standard_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 (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)
@@ -4127,7 +4127,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)
 	{
@@ -4991,7 +4991,7 @@ do_spec_1 (const char *spec, int inswitc
 	      info.append = "include-fixed";
 	      if (*sysroot_hdrs_suffix_spec)
 		info.append = concat (info.append, dir_separator_str,
-				      multilib_dir, NULL);
+				      multilib_dir, (void *)0);
 	      info.append_len = strlen (info.append);
 	      for_each_path (&include_prefixes, false, info.append_len,
 			     spec_path, &info);
@@ -6196,8 +6196,8 @@ main (int argc, 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, true);
   /* Read the specs file unless it is a default one.  */
@@ -6312,7 +6312,7 @@ main (int argc, char **argv)
 		      concat (gcc_exec_prefix 
 			      ? gcc_exec_prefix : standard_exec_prefix, 
 			      machine_suffix, 
-			      standard_startfile_prefix, NULL),
+			      standard_startfile_prefix, (void *)0),
 		      NULL, PREFIX_PRIORITY_LAST, 0, 1);
 	}
 
@@ -6340,7 +6340,7 @@ main (int argc, 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.  */
@@ -7675,7 +7675,7 @@ getenv_spec_function (int argc, const ch
   if (!value)
     fatal ("environment variable \"%s\" not defined", argv[0]);
 
-  return concat (value, argv[1], NULL);
+  return concat (value, argv[1], (void *)0);
 }
 
 /* if-exists built-in spec function.
