X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Ffilenames.h;h=1ed441221ac2122c2735ece829a63fdab5523e68;hb=f4ec508eaed65ad7555858498c1cbbf420bce90a;hp=ca23d3253142436585bfb1c0c3d9793287fb0c61;hpb=9757332fd2256ecc8b023181fcd0807e2a159ad6;p=deliverable%2Fbinutils-gdb.git diff --git a/include/filenames.h b/include/filenames.h index ca23d32531..1ed441221a 100644 --- a/include/filenames.h +++ b/include/filenames.h @@ -5,7 +5,7 @@ use forward- and back-slash in path names interchangeably, and some of them have case-insensitive file names. - Copyright 2000, 2001, 2007, 2010 Free Software Foundation, Inc. + Copyright (C) 2000-2020 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -26,6 +26,8 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. #ifndef FILENAMES_H #define FILENAMES_H +#include "hashtab.h" /* for hashval_t */ + #ifdef __cplusplus extern "C" { #endif @@ -34,10 +36,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) @@ -73,6 +83,15 @@ extern "C" { extern int filename_cmp (const char *s1, const char *s2); #define FILENAME_CMP(s1, s2) filename_cmp(s1, s2) +extern int filename_ncmp (const char *s1, const char *s2, + size_t n); + +extern hashval_t filename_hash (const void *s); + +extern int filename_eq (const void *s1, const void *s2); + +extern int canonical_filename_eq (const char *a, const char *b); + #ifdef __cplusplus } #endif