+2005-01-20 Nick Clifton <nickc@redhat.com>
+
+ * as.c (std_longopts): Add an entry for "--a" in order to prevent
+ getopt_long_only() from considering -a as an abbreviation for
+ --alternate.
+ (parse_args): Fix the parsing of -a=<file>.
+
2005-01-20 Alan Modra <amodra@bigpond.net.au>
PR gas/684
the end of the preceeding line so that it is simpler to
selectively add and remove lines from this list. */
{"alternate", no_argument, NULL, OPTION_ALTERNATE}
+ /* The entry for "a" is here to prevent getopt_long_only() from
+ considering that -a is an abbreviation for --alternate. This is
+ necessary because -a=<FILE> is a valid switch but getopt would
+ normally reject it since --alternate does not take an argument. */
+ ,{"a", optional_argument, NULL, 'a'}
,{"defsym", required_argument, NULL, OPTION_DEFSYM}
,{"dump-config", no_argument, NULL, OPTION_DUMPCONFIG}
,{"emulation", required_argument, NULL, OPTION_EMULATION}
case 'a':
if (optarg)
{
+ if (optarg != old_argv[optind] && optarg[-1] == '=')
+ --optarg;
+
if (md_parse_option (optc, optarg) != 0)
break;