[PATCH] add directive to enter/leave alternate macro mode
Nick Clifton
nickc@redhat.com
Tue Aug 3 12:38:00 GMT 2004
Hi Jan,
> This doesn't seem to work for me. Since getopt_long_only accepts option
> abbreviations as well as long options with only a single dash, -al gets
> treated as -alternate now, breaking previous behavior.
Ah - good point. This version of the patch should cope with that however...
Cheers
Nick
------------------------------------------------------------------
Index: gas/as.c
===================================================================
RCS file: /cvs/src/src/gas/as.c,v
retrieving revision 1.51
diff -c -3 -p -r1.51 as.c
*** gas/as.c 27 Oct 2003 12:45:17 -0000 1.51
--- gas/as.c 3 Aug 2004 12:37:12 -0000
*************** parse_args (int * pargc, char *** pargv)
*** 414,419 ****
--- 414,420 ----
OPTION_TARGET_HELP,
OPTION_EXECSTACK,
OPTION_NOEXECSTACK,
+ OPTION_ALTERNATE,
OPTION_WARN_FATAL
};
*************** parse_args (int * pargc, char *** pargv)
*** 457,462 ****
--- 458,464 ----
{"execstack", no_argument, NULL, OPTION_EXECSTACK},
{"noexecstack", no_argument, NULL, OPTION_NOEXECSTACK},
#endif
+ {"alternate", no_argument, NULL, OPTION_ALTERNATE},
{"fatal-warnings", no_argument, NULL, OPTION_WARN_FATAL}
/* When you add options here, check that they do not collide with
OPTION_MD_BASE. See as.h. */
*************** the GNU General Public License. This pr
*** 731,736 ****
--- 733,751 ----
flag_always_generate_output = 1;
break;
+ case OPTION_ALTERNATE:
+ optarg = old_argv [optind - 1];
+ while (* optarg == '-')
+ optarg ++;
+
+ if (strcmp (optarg, "alternate") == 0)
+ {
+ printf ("--Alternate\n");
+ break;
+ }
+ optarg ++;
+ /* Fall through. */
+
case 'a':
if (optarg)
{
More information about the Binutils
mailing list