This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PATCH: correct handling of `.zip' files


On Nov 15, 1998, Tom Tromey <tromey@cygnus.com> wrote:

Alexandre> How about handling .jar files too?

>>> It's on my (or "a") to-do list, but it isn't near the top.

Alexandre> I had thought it would be just a matter of adding a `||
Alexandre> !strcmp (filename + len - 4, ".jar")' to that patch.  Isn't
Alexandre> this enough?

> Updating lang-specs.h would also be good.  I agree it is a trivial
> change, but I'm still not going to do it yet.

How about the attached patch?  Ok to install?

-- 
Alexandre Oliva  http://www.dcc.unicamp.br/~oliva  aoliva@{acm.org}
oliva@{dcc.unicamp.br,gnu.org,egcs.cygnus.com,samba.org}
Universidade Estadual de Campinas, SP, Brasil
Index: gcc/java/ChangeLog
from  Alexandre Oliva  <oliva@dcc.unicamp.br>
	
	* jcf-path.c (add_entry): recognize ".jar" too
	* lang-specs.h: ditto
	
Index: gcc/java/jcf-path.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/java/jcf-path.c,v
retrieving revision 1.3
diff -u -r1.3 jcf-path.c
--- gcc/java/jcf-path.c	1998/11/12 11:43:19	1.3
+++ gcc/java/jcf-path.c	1998/11/26 01:48:30
@@ -141,7 +141,8 @@
   n->next = NULL;
 
   len = strlen (filename);
-  if (len > 4 && ! strcmp (filename + len - 4, ".zip"))
+  if (len > 4 && (! strcmp (filename + len - 4, ".zip") ||
+		  ! strcmp (filename + len - 4, ".jar")))
     {
       n->flags |= FLAG_ZIP;
       /* If the user uses -classpath then he'll have to include
Index: gcc/java/lang-specs.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/java/lang-specs.h,v
retrieving revision 1.5
diff -u -r1.5 lang-specs.h
--- gcc/java/lang-specs.h	1998/10/23 08:54:10	1.5
+++ gcc/java/lang-specs.h	1998/11/26 01:48:30
@@ -27,6 +27,7 @@
   {".java",   {"@java"} },
   {".class",  {"@java"} },
   {".zip",    {"@java"} },
+  {".jar",    {"@java"} },
   {"@java",
    {"%{!E:jc1 %i %1 %{!Q:-quiet} %{d*} %{m*} %{a}\
 		    %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi}\

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]