This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Cygwin patches for gcj
- To: "'gcc-patches at gcc dot gnu dot org'" <gcc-patches at gcc dot gnu dot org>
- Subject: Cygwin patches for gcj
- From: "Billinghurst, David (CRTS)" <David dot Billinghurst at riotinto dot com>
- Date: Sun, 22 Apr 2001 07:01:07 -0000
- Cc: "'java at gcc dot gnu dot org'" <java at gcc dot gnu dot org>, "'robert dot collins at itdomain dot com dot au'" <robert dot collins at itdomain dot com dot au>
These patches are required to get java working on trunk under cygwin. They
should be save for other platforms as they are guarded by
HAVE_DOS_BASED_FILESYSTEM.
2001-04-22 Robert Collins <robert.collins@itdomain.com.au>
David Billinghurst <David.Billinghurst@riotinto.com>
* parse.y (check_class_interface_creation):
Case insensitive compare for DOS filesystems
* jcf-parse.c (jcf_parse_source): Transform DOS filenames
to lower case.
--- jcf-parse.c.orig Sun Apr 1 08:52:57 2001
+++ jcf-parse.c Sun Apr 22 15:21:32 2001
@@ -642,6 +642,17 @@
java_parser_context_save_global ();
java_push_parser_context ();
+#ifdef HAVE_DOS_BASED_FILESYSTEM
+ /* FIXME: Transform filename to a canonical (lower case) form.
+ At present it does not consider
+ - cygwin vs windows paths
+ - '/' vs '\' path seperators
+ - and so on */
+ {
+ char *t=current_jcf->filename;
+ while (*t) { *t=tolower(*t); t++;}
+ }
+#endif
BUILD_FILENAME_IDENTIFIER_NODE (file, current_jcf->filename);
if (wfl_operator == NULL_TREE)
wfl_operator = build_expr_wfl (NULL_TREE, NULL, 0, 0);
--- parse.y.orig Mon Apr 9 17:37:21 2001
+++ parse.y Sun Apr 22 15:01:38 2001
@@ -3392,7 +3392,13 @@
;
if (f[0] == '/' || f[0] == DIR_SEPARATOR)
f++;
- if (strncmp (IDENTIFIER_POINTER (raw_name),
+ if (
+#ifdef HAVE_DOS_BASED_FILE_SYSTEM
+ strncasecmp
+#else
+ strncmp
+#endif
+ (IDENTIFIER_POINTER (raw_name),
f , IDENTIFIER_LENGTH (raw_name)) ||
f [IDENTIFIER_LENGTH (raw_name)] != '.')
parse_error_context