aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/jcf.h
diff options
context:
space:
mode:
authorRanjit Mathew <rmathew@hotmail.com>2003-03-07 04:40:08 +0000
committerTom Tromey <tromey@gcc.gnu.org>2003-03-07 04:40:08 +0000
commit530d4230db67ec12f6825c3e30105fee999822f4 (patch)
tree08478985eb6146a4ea94fb9410e98fb662f725af /gcc/java/jcf.h
parent203b3521b5ce07b383f0107e2f1fb79da0a2f98c (diff)
downloadgcc-530d4230db67ec12f6825c3e30105fee999822f4.zip
gcc-530d4230db67ec12f6825c3e30105fee999822f4.tar.gz
gcc-530d4230db67ec12f6825c3e30105fee999822f4.tar.bz2
jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to compare file name components depending on the...
2003-03-05 Ranjit Mathew <rmathew@hotmail.com> * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to compare file name components depending on the case-sensitivity or otherwise of the host file system. * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of "strcmp" to compare file name components. Use IS_DIR_SEPARATOR instead of comparing directly against DIR_SEPARATOR. (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of comparing directly against DIR_SEPARATOR. From-SVN: r63927
Diffstat (limited to 'gcc/java/jcf.h')
-rw-r--r--gcc/java/jcf.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/java/jcf.h b/gcc/java/jcf.h
index c8e6aa7..9680974 100644
--- a/gcc/java/jcf.h
+++ b/gcc/java/jcf.h
@@ -54,6 +54,15 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#define JCF_USE_SCANDIR 0
#endif
+/* On case-insensitive file systems, file name components must be
+ compared using "strcasecmp", if available, instead of "strcmp".
+ Assumes "config.h" has already been included. */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM) && defined (HAVE_STRCASECMP)
+#define COMPARE_FILENAMES(X, Y) strcasecmp ((X), (Y))
+#else
+#define COMPARE_FILENAMES(X, Y) strcmp ((X), (Y))
+#endif
+
struct JCF;
typedef int (*jcf_filbuf_t) PARAMS ((struct JCF*, int needed));