This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] PR 9677 gcc-3.4.1-20040715-crazypaths.patch
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')
{