This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[PATCH] PR 9677 gcc-3.4.1-20040715-crazypaths.patch
- From: Andrew Haley <aph at redhat dot com>
- To: Elliot Lee <sopwith at redhat dot com>, gcc-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org
- Date: Mon, 16 Aug 2004 12:48:15 +0100
- Subject: [PATCH] PR 9677 gcc-3.4.1-20040715-crazypaths.patch
- References: <Pine.LNX.4.58.0408121140490.19397@devserv.devel.redhat.com><16667.37652.479737.13345@cuddles.cambridge.redhat.com>
Committed, with minor layout changes.
Andrew.
2004-08-16 Elliot Lee <sopwith@redhat.com>
PR java/9677
* jcf-parse.c (java_parse_file): Handle filenames with embedded
spaces, and quoted filelists.
Index: jcf-parse.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/jcf-parse.c,v
retrieving revision 1.167
diff -p -2 -c -r1.167 jcf-parse.c
*** jcf-parse.c 15 Aug 2004 15:45:30 -0000 1.167
--- jcf-parse.c 16 Aug 2004 11:46:18 -0000
*************** java_parse_file (int set_yydebug ATTRIBU
*** 898,902 ****
tree node;
FILE *finput = NULL;
!
if (flag_filelist_file)
{
--- 898,903 ----
tree node;
FILE *finput = NULL;
! int in_quotes = 0;
!
if (flag_filelist_file)
{
*************** java_parse_file (int set_yydebug ATTRIBU
*** 941,946 ****
{
char ch = *next;
! if (ch == '\n' || ch == '\r' || ch == '\t' || ch == ' '
! || ch == '&' /* FIXME */)
{
if (next == list)
--- 942,948 ----
{
char ch = *next;
! if (flag_filelist_file && ! in_quotes
! && (ch == '\n' || ch == '\r' || ch == '\t' || ch == ' '
! || ch == '&') /* FIXME */)
{
if (next == list)
*************** java_parse_file (int set_yydebug ATTRIBU
*** 956,959 ****
--- 958,970 ----
}
}
+ if (flag_filelist_file && ch == '"')
+ {
+ in_quotes = ! in_quotes;
+ *next++ = '\0';
+ if (in_quotes)
+ list = next;
+ else
+ break;
+ }
if (ch == '\0')
{