| OLD | NEW |
| 1 /* Macros for taking apart, interpreting and processing file names. | 1 /* Macros for taking apart, interpreting and processing file names. |
| 2 | 2 |
| 3 These are here because some non-Posix (a.k.a. DOSish) systems have | 3 These are here because some non-Posix (a.k.a. DOSish) systems have |
| 4 drive letter brain-damage at the beginning of an absolute file name, | 4 drive letter brain-damage at the beginning of an absolute file name, |
| 5 use forward- and back-slash in path names interchangeably, and | 5 use forward- and back-slash in path names interchangeably, and |
| 6 some of them have case-insensitive file names. | 6 some of them have case-insensitive file names. |
| 7 | 7 |
| 8 Copyright 2000, 2001, 2007, 2010 Free Software Foundation, Inc. | 8 Copyright 2000, 2001, 2007, 2010 Free Software Foundation, Inc. |
| 9 | 9 |
| 10 This file is part of BFD, the Binary File Descriptor library. | 10 This file is part of BFD, the Binary File Descriptor library. |
| 11 | 11 |
| 12 This program is free software; you can redistribute it and/or modify | 12 This program is free software; you can redistribute it and/or modify |
| 13 it under the terms of the GNU General Public License as published by | 13 it under the terms of the GNU General Public License as published by |
| 14 the Free Software Foundation; either version 2 of the License, or | 14 the Free Software Foundation; either version 2 of the License, or |
| 15 (at your option) any later version. | 15 (at your option) any later version. |
| 16 | 16 |
| 17 This program is distributed in the hope that it will be useful, | 17 This program is distributed in the hope that it will be useful, |
| 18 but WITHOUT ANY WARRANTY; without even the implied warranty of | 18 but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 20 GNU General Public License for more details. | 20 GNU General Public License for more details. |
| 21 | 21 |
| 22 You should have received a copy of the GNU General Public License | 22 You should have received a copy of the GNU General Public License |
| 23 along with this program; if not, write to the Free Software | 23 along with this program; if not, write to the Free Software |
| 24 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/ | 24 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/ |
| 25 | 25 |
| 26 #ifndef FILENAMES_H | 26 #ifndef FILENAMES_H |
| 27 #define FILENAMES_H | 27 #define FILENAMES_H |
| 28 | 28 |
| 29 #include "hashtab.h" /* for hashval_t */ |
| 30 |
| 29 #ifdef __cplusplus | 31 #ifdef __cplusplus |
| 30 extern "C" { | 32 extern "C" { |
| 31 #endif | 33 #endif |
| 32 | 34 |
| 33 #if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__) || defined (__CYGW
IN__) | 35 #if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__) || defined (__CYGW
IN__) |
| 34 # ifndef HAVE_DOS_BASED_FILE_SYSTEM | 36 # ifndef HAVE_DOS_BASED_FILE_SYSTEM |
| 35 # define HAVE_DOS_BASED_FILE_SYSTEM 1 | 37 # define HAVE_DOS_BASED_FILE_SYSTEM 1 |
| 36 # endif | 38 # endif |
| 37 # ifndef HAVE_CASE_INSENSITIVE_FILE_SYSTEM | 39 # ifndef HAVE_CASE_INSENSITIVE_FILE_SYSTEM |
| 38 # define HAVE_CASE_INSENSITIVE_FILE_SYSTEM 1 | 40 # define HAVE_CASE_INSENSITIVE_FILE_SYSTEM 1 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 #define IS_ABSOLUTE_PATH_1(dos_based, f) \ | 79 #define IS_ABSOLUTE_PATH_1(dos_based, f) \ |
| 78 (IS_DIR_SEPARATOR_1 (dos_based, (f)[0]) \ | 80 (IS_DIR_SEPARATOR_1 (dos_based, (f)[0]) \ |
| 79 || HAS_DRIVE_SPEC_1 (dos_based, f)) | 81 || HAS_DRIVE_SPEC_1 (dos_based, f)) |
| 80 | 82 |
| 81 extern int filename_cmp (const char *s1, const char *s2); | 83 extern int filename_cmp (const char *s1, const char *s2); |
| 82 #define FILENAME_CMP(s1, s2) filename_cmp(s1, s2) | 84 #define FILENAME_CMP(s1, s2) filename_cmp(s1, s2) |
| 83 | 85 |
| 84 extern int filename_ncmp (const char *s1, const char *s2, | 86 extern int filename_ncmp (const char *s1, const char *s2, |
| 85 size_t n); | 87 size_t n); |
| 86 | 88 |
| 89 extern hashval_t filename_hash (const void *s); |
| 90 |
| 91 extern int filename_eq (const void *s1, const void *s2); |
| 92 |
| 87 #ifdef __cplusplus | 93 #ifdef __cplusplus |
| 88 } | 94 } |
| 89 #endif | 95 #endif |
| 90 | 96 |
| 91 #endif /* FILENAMES_H */ | 97 #endif /* FILENAMES_H */ |
| OLD | NEW |