aboutsummaryrefslogtreecommitdiff
path: root/gcc/protoize.c
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-03-23 07:17:43 +0000
committerRichard Stallman <rms@gnu.org>1992-03-23 07:17:43 +0000
commita609bfc673c8f2a3970ee0a5ab6c9cd325bf3895 (patch)
treeadae993f008509a9946edb4e8a6d081f7619d0b6 /gcc/protoize.c
parent55142f01b22fb057cbc9f6794c18b7ed2d6f0e52 (diff)
downloadgcc-a609bfc673c8f2a3970ee0a5ab6c9cd325bf3895.zip
gcc-a609bfc673c8f2a3970ee0a5ab6c9cd325bf3895.tar.gz
gcc-a609bfc673c8f2a3970ee0a5ab6c9cd325bf3895.tar.bz2
*** empty log message ***
From-SVN: r576
Diffstat (limited to 'gcc/protoize.c')
-rw-r--r--gcc/protoize.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/gcc/protoize.c b/gcc/protoize.c
index 87fa171..29d947b 100644
--- a/gcc/protoize.c
+++ b/gcc/protoize.c
@@ -66,6 +66,11 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#endif
#include <setjmp.h>
#include "gvarargs.h"
+
+/* Include getopt.h for the sake of getopt_long.
+ We don't need the declaration of getopt, and it could conflict
+ with something from a system header file, so effectively nullify that. */
+#define getopt getopt_loser
#include "getopt.h"
extern int errno;
@@ -2516,7 +2521,11 @@ find_extern_def (head, user)
strcpy (needed, user->ansi_decl);
p = (NONCONST char *) substr (needed, user->hash_entry->symbol)
+ strlen (user->hash_entry->symbol) + 2;
- strcpy (p, "??\?);");
+ /* Avoid having ??? in the string. */
+ *p++ = '?';
+ *p++ = '?';
+ *p++ = '?';
+ strcpy (p, ");");
fprintf (stderr, "%s: %d: `%s' used but missing from SYSCALLS\n",
shortpath (NULL, file), user->line,
@@ -4387,6 +4396,7 @@ main (argc, argv)
{
int longind;
int c;
+ char *params = "";
pname = strrchr (argv[0], '/');
pname = pname ? pname+1 : argv[0];
@@ -4447,7 +4457,7 @@ main (argc, argv)
keep_flag = 1;
break;
case 'c':
- munge_compile_params (optarg);
+ params = optarg;
break;
#ifdef UNPROTOIZE
case 'i':
@@ -4472,6 +4482,9 @@ main (argc, argv)
}
}
+ /* Set up compile_params based on -p and -c options. */
+ munge_compile_params (params);
+
n_base_source_files = argc - optind;
/* Now actually make a list of the base source filenames. */