aboutsummaryrefslogtreecommitdiff
path: root/include/filenames.h
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@adacore.com>2011-07-01 17:51:05 +0000
committerJoel Brobecker <brobecke@gcc.gnu.org>2011-07-01 17:51:05 +0000
commit985b34c77a44612cecf8c8a73bfa8224699b9855 (patch)
tree2101553adc801554eb75138475f104cfda9d278b /include/filenames.h
parentcb0ad104286a76447490333ce7f94a2f557a5914 (diff)
downloadgcc-985b34c77a44612cecf8c8a73bfa8224699b9855.zip
gcc-985b34c77a44612cecf8c8a73bfa8224699b9855.tar.gz
gcc-985b34c77a44612cecf8c8a73bfa8224699b9855.tar.bz2
Darwin has case-insensitive filesystems
HFS+, the FS on Darwin, is case insensitive. So this patch adjusts filename_cmp.c to ignore the casing when comparing filenames on Darwin. include/ChangeLog: * filenames.h (HAVE_CASE_INSENSITIVE_FILE_SYSTEM): Define on Darwin, as well as on the systems that use a DOS-like filesystem. libiberty/ChangeLog: * filename_cmp.c (filename_cmp, filename_ncmp): Add handling of HAVE_CASE_INSENSITIVE_FILE_SYSTEM. From-SVN: r175762
Diffstat (limited to 'include/filenames.h')
-rw-r--r--include/filenames.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/filenames.h b/include/filenames.h
index d4955df..75ec330 100644
--- a/include/filenames.h
+++ b/include/filenames.h
@@ -34,10 +34,18 @@ extern "C" {
# ifndef HAVE_DOS_BASED_FILE_SYSTEM
# define HAVE_DOS_BASED_FILE_SYSTEM 1
# endif
+# ifndef HAVE_CASE_INSENSITIVE_FILE_SYSTEM
+# define HAVE_CASE_INSENSITIVE_FILE_SYSTEM 1
+# endif
# define HAS_DRIVE_SPEC(f) HAS_DOS_DRIVE_SPEC (f)
# define IS_DIR_SEPARATOR(c) IS_DOS_DIR_SEPARATOR (c)
# define IS_ABSOLUTE_PATH(f) IS_DOS_ABSOLUTE_PATH (f)
#else /* not DOSish */
+# if defined(__APPLE__)
+# ifndef HAVE_CASE_INSENSITIVE_FILE_SYSTEM
+# define HAVE_CASE_INSENSITIVE_FILE_SYSTEM 1
+# endif
+# endif /* __APPLE__ */
# define HAS_DRIVE_SPEC(f) (0)
# define IS_DIR_SEPARATOR(c) IS_UNIX_DIR_SEPARATOR (c)
# define IS_ABSOLUTE_PATH(f) IS_UNIX_ABSOLUTE_PATH (f)