This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: fastjar -C fix again
- From: Anthony Green <green at cygnus dot com>
- To: gcc-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org
- Date: Sun, 24 Feb 2002 11:59:22 -0800 (PST)
- Subject: Patch: fastjar -C fix again
- Reply-to: green at cygnus dot com
I'm committing this patch to fastjar. I had submitted a similar patch
yesterday - but this has Per's suggested implementation. jar -C is
completely broken without it.
2002-02-23 Anthony Green <green@redhat.com>
* jartool.c (main): Fix handling of -C.
Index: jartool.c
===================================================================
RCS file: /cvs/gcc/gcc/fastjar/jartool.c,v
retrieving revision 1.12
diff -c -r1.12 jartool.c
*** jartool.c 2002/01/31 00:52:16 1.12
--- jartool.c 2002/02/24 19:53:37
***************
*** 303,310 ****
#define OPT_HELP LONG_OPT (0)
! /* This holds all options except `-C', which is handled specially. */
! #define OPTION_STRING "-ctxuvVf:m:0ME@"
static const struct option options[] =
{
--- 303,310 ----
#define OPT_HELP LONG_OPT (0)
! /* This holds all options. */
! #define OPTION_STRING "-ctxuvVf:m:C:0ME@"
static const struct option options[] =
{
***************
*** 348,356 ****
while ((opt = getopt_long (argc, argv, OPTION_STRING,
options, NULL)) != -1) {
switch(opt){
case 1:
! /* File name or unparsed option, due to RETURN_IN_ORDER. In
! particular `-C' is handled here and not elsewhere. */
new_argv[new_argc++] = optarg;
break;
case 'c':
--- 348,358 ----
while ((opt = getopt_long (argc, argv, OPTION_STRING,
options, NULL)) != -1) {
switch(opt){
+ case 'C':
+ new_argv[new_argc++] = (char *) "-C";
+ /* ... fall through ... */
case 1:
! /* File name or unparsed option, due to RETURN_IN_ORDER. */
new_argv[new_argc++] = optarg;
break;
case 'c':