aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/jcf.h
diff options
context:
space:
mode:
authorAndrew Haley <aph@gcc.gnu.org>2003-04-10 18:24:42 +0000
committerAndrew Haley <aph@gcc.gnu.org>2003-04-10 18:24:42 +0000
commit72f339d27372d36d1fcf7056db88fc10d824adb6 (patch)
tree98f513bd1a000a4d78b65f788485eb0f3dd32eeb /gcc/java/jcf.h
parent1839841c90469b92929b3ce58fa74a8fd05039fc (diff)
downloadgcc-72f339d27372d36d1fcf7056db88fc10d824adb6.zip
gcc-72f339d27372d36d1fcf7056db88fc10d824adb6.tar.gz
gcc-72f339d27372d36d1fcf7056db88fc10d824adb6.tar.bz2
[multiple changes]
2003-03-16 Mohan Embar <gnustuff@thisiscool.com> * 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 <aph@redhat.com> * 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
Diffstat (limited to 'gcc/java/jcf.h')
-rw-r--r--gcc/java/jcf.h18
1 files changed, 18 insertions, 0 deletions
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));