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