Cygwin patches for gcj

Billinghurst, David (CRTS) David.Billinghurst@riotinto.com
Sun Apr 22 00:05:00 GMT 2001


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


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /