Commit | Line | Data |
---|---|---|
ab38a727 | 1 | /* Handle different target file systems for GDB, the GNU Debugger. |
42a4f53d | 2 | Copyright (C) 2010-2019 Free Software Foundation, Inc. |
ab38a727 PA |
3 | |
4 | This file is part of GDB. | |
5 | ||
6 | This program is free software; you can redistribute it and/or modify | |
7 | it under the terms of the GNU General Public License as published by | |
8 | the Free Software Foundation; either version 3 of the License, or | |
9 | (at your option) any later version. | |
10 | ||
11 | This program is distributed in the hope that it will be useful, | |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | GNU General Public License for more details. | |
15 | ||
16 | You should have received a copy of the GNU General Public License | |
17 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ | |
18 | ||
19 | #ifndef FILESYSTEM_H | |
20 | #define FILESYSTEM_H | |
21 | ||
22 | extern const char file_system_kind_auto[]; | |
23 | extern const char file_system_kind_unix[]; | |
24 | extern const char file_system_kind_dos_based[]; | |
25 | ||
26 | extern const char *target_file_system_kind; | |
27 | ||
28 | /* Same as IS_DIR_SEPARATOR but with file system kind KIND's | |
29 | semantics, instead of host semantics. */ | |
30 | ||
31 | #define IS_TARGET_DIR_SEPARATOR(kind, c) \ | |
32 | (((kind) == file_system_kind_dos_based) ? IS_DOS_DIR_SEPARATOR (c) \ | |
33 | : IS_UNIX_DIR_SEPARATOR (c)) | |
34 | ||
35 | /* Same as IS_ABSOLUTE_PATH but with file system kind KIND's | |
36 | semantics, instead of host semantics. */ | |
37 | ||
38 | #define IS_TARGET_ABSOLUTE_PATH(kind, p) \ | |
39 | (((kind) == file_system_kind_dos_based) ? IS_DOS_ABSOLUTE_PATH (p) \ | |
40 | : IS_UNIX_ABSOLUTE_PATH (p)) | |
41 | ||
42 | /* Same as HAS_DRIVE_SPEC but with file system kind KIND's semantics, | |
43 | instead of host semantics. */ | |
44 | ||
45 | #define HAS_TARGET_DRIVE_SPEC(kind, p) \ | |
46 | (((kind) == file_system_kind_dos_based) ? HAS_DOS_DRIVE_SPEC (p) \ | |
47 | : 0) | |
48 | ||
49 | /* Same as lbasename, but with file system kind KIND's semantics, | |
50 | instead of host semantics. */ | |
51 | extern const char *target_lbasename (const char *kind, const char *name); | |
52 | ||
53 | /* The effective setting of "set target-file-system-kind", with "auto" | |
54 | resolved to the real kind. That is, you never see "auto" as a | |
55 | result from this function. */ | |
56 | extern const char *effective_target_file_system_kind (void); | |
57 | ||
58 | #endif |