summaryrefslogtreecommitdiff
path: root/include/libiberty.h
diff options
context:
space:
mode:
authordj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-24 00:55:41 +0000
committerdj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-24 00:55:41 +0000
commit2d7565f9963d3851dcc0b5f066c621ae4c6c5838 (patch)
tree69200e3764b98a3e99f34a5565afb55749e7ce70 /include/libiberty.h
parent1b2e4bd62e07eb48b195b08cc27b7bb3f07e7ab1 (diff)
downloadgcc-2d7565f9963d3851dcc0b5f066c621ae4c6c5838.tar.gz
2010-04-23 Pedro Alves <pedro@codesourcery.com>
include/ * filenames.h (IS_DIR_SEPARATOR_1): Rename from IS_DIR_SEPARATOR, always define it independently of host, add `dos_based' parameter, and handle it. (HAS_DRIVE_SPEC_1): Rename from HAS_DRIVE_SPEC, always define it independently of host, add `dos_based' parameter, and handle it. (IS_ABSOLUTE_PATH_1): Rename from IS_ABSOLUTE_PATH, always define it independently of host, add `dos_based' parameter, and handle it. (IS_DOS_DIR_SEPARATOR, IS_DOS_ABSOLUTE_PATH) (IS_UNIX_DIR_SEPARATOR, IS_UNIX_ABSOLUTE_PATH) (HAS_DOS_DRIVE_SPEC): New. (HAS_DRIVE_SPEC): Reimplement on top of HAS_DRIVE_SPEC_1. (IS_DIR_SEPARATOR): Reimplement on top of IS_DIR_SEPARATOR_1. (IS_ABSOLUTE_PATH): Reimplement on top of IS_ABSOLUTE_PATH_1. * libiberty.h (dos_lbasename, unix_lbasename): Declare. libiberty/ * lbasename.c (lbasename): Split into ... (unix_lbasename, dos_basename): ... these. (lbasename): ... and reimplement on top of them. * Makefile.in (lbasename.o): Add dependency on $(INCDIR)/filenames.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158681 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'include/libiberty.h')
-rw-r--r--include/libiberty.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/libiberty.h b/include/libiberty.h
index a7716e4a414..b320b18e98b 100644
--- a/include/libiberty.h
+++ b/include/libiberty.h
@@ -116,6 +116,17 @@ extern char *basename (const char *);
extern const char *lbasename (const char *);
+/* Same, but assumes DOS semantics (drive name, backslash is also a
+ dir separator) regardless of host. */
+
+extern const char *dos_lbasename (const char *);
+
+/* Same, but assumes Unix semantics (absolute paths always start with
+ a slash, only forward slash is accepted as dir separator)
+ regardless of host. */
+
+extern const char *unix_lbasename (const char *);
+
/* A well-defined realpath () that is always compiled in. */
extern char *lrealpath (const char *);