From 72f339d27372d36d1fcf7056db88fc10d824adb6 Mon Sep 17 00:00:00 2001 From: Andrew Haley Date: Thu, 10 Apr 2003 18:24:42 +0000 Subject: [multiple changes] 2003-03-16 Mohan Embar * Make-lang.in: added win32-host.c * jcf.h: defined macro JCF_OPEN_EXACT_CASE which resolves to open() on non-Win32 platforms and Win32-specific jcf_open_exact_case() on Win32 * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE when trying .java and .class files * win32-host.c: added to repository. Defines Win32-specific jcf_open_exact_case() 2003-04-10 Andrew Haley * jcf-write.c (struct jcf_partial): num_jsrs: new field. (maybe_free_localvar): Renamed from localvar_free. Add new arg, really. (generate_bytecode_insns): Set new variable, jsrs. Only free local vars if no jsr insns have been emittted. Call maybe_free_localvar, not localvar_free. From-SVN: r65430 --- gcc/java/jcf.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'gcc/java/jcf.h') diff --git a/gcc/java/jcf.h b/gcc/java/jcf.h index 9680974..5a28735 100644 --- a/gcc/java/jcf.h +++ b/gcc/java/jcf.h @@ -63,6 +63,24 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */ #define COMPARE_FILENAMES(X, Y) strcmp ((X), (Y)) #endif +/* On case-insensitive file systems, we need to ensure that a request + to open a .java or .class file is honored only if the file to be + opened is of the exact case we are asking for. In other words, we + want to override the inherent case insensitivity of the underlying + file system. On other platforms, this macro becomes the vanilla + open() call. + + If you want to add another host, add your define to the list below + (i.e. defined(WIN32) || defined(YOUR_HOST)) and add an host-specific + .c file to Make-lang.in similar to win32-host.c */ +#if defined(WIN32) +extern int +jcf_open_exact_case (const char* filename, int oflag); +#define JCF_OPEN_EXACT_CASE(X, Y) jcf_open_exact_case (X, Y) +#else +#define JCF_OPEN_EXACT_CASE open +#endif /* WIN32 */ + struct JCF; typedef int (*jcf_filbuf_t) PARAMS ((struct JCF*, int needed)); -- cgit v1.1