summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcagney <cagney@138bc75d-0d04-0410-961f-82ee72b054a4>2001-08-10 23:45:11 +0000
committercagney <cagney@138bc75d-0d04-0410-961f-82ee72b054a4>2001-08-10 23:45:11 +0000
commit2bce2a69652f7711e0ba2f508be20d5138a76ec2 (patch)
treef087d043cd094d8bc386c9f73b83dc0e9e9eb2ad
parentf1fd52792672b3c4e8be5e7745ac2137052aef12 (diff)
downloadgcc-2bce2a69652f7711e0ba2f508be20d5138a76ec2.tar.gz
(lbasename): Change function declaration to return a const char pointer.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44782 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--include/ChangeLog5
-rw-r--r--include/libiberty.h2
-rw-r--r--libiberty/ChangeLog5
-rw-r--r--libiberty/lbasename.c6
4 files changed, 14 insertions, 4 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index 9f34dcd13cd..f0d141e8ba8 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,8 @@
+2001-06-13 Andrew Cagney <ac131313@redhat.com>
+
+ * libiberty.h (lbasename): Change function declaration to return a
+ const char pointer.
+
2001-08-02 Mark Kettenis <kettenis@gnu.org>
* xregex.h (_REGEX_RE_COMP): Define.
diff --git a/include/libiberty.h b/include/libiberty.h
index effe5f628cc..8d46e375e3a 100644
--- a/include/libiberty.h
+++ b/include/libiberty.h
@@ -83,7 +83,7 @@ extern char *basename ();
/* A well-defined basename () that is always compiled in. */
-extern char *lbasename PARAMS ((const char *));
+extern const char *lbasename PARAMS ((const char *));
/* Concatenate an arbitrary number of strings, up to (char *) NULL.
Allocates memory using xmalloc. */
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 5a9f0d27690..c80b809e3d3 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,8 @@
+2001-06-13 Andrew Cagney <ac131313@redhat.com>
+
+ * lbasename.c (lbasename): Change function definition to return a
+ const char pointer.
+
2001-08-07 Jason Merrill <jason_merrill@redhat.com>
* cp-demangle.c (demangle_special_name): "GR" -> "reference temporary
diff --git a/libiberty/lbasename.c b/libiberty/lbasename.c
index 7f870497c4f..b37316259d2 100644
--- a/libiberty/lbasename.c
+++ b/libiberty/lbasename.c
@@ -23,7 +23,7 @@ NAME
lbasename -- return pointer to last component of a pathname
SYNOPSIS
- char *lbasename (const char *name)
+ const char *lbasename (const char *name)
DESCRIPTION
Given a pointer to a string containing a typical pathname
@@ -69,7 +69,7 @@ DESCRIPTION
# endif
#endif
-char *
+const char *
lbasename (name)
const char *name;
{
@@ -85,5 +85,5 @@ lbasename (name)
if (IS_DIR_SEPARATOR (*name))
base = name + 1;
- return (char *) base;
+ return base;
}