(lbasename): Change function declaration to return a const char pointer.
authorAndrew Cagney <cagney@redhat.com>
Fri, 10 Aug 2001 23:46:17 +0000 (23:46 +0000)
committerAndrew Cagney <cagney@redhat.com>
Fri, 10 Aug 2001 23:46:17 +0000 (23:46 +0000)
include/ChangeLog
include/libiberty.h
libiberty/ChangeLog
libiberty/lbasename.c

index 8b89d97beb00ec258cb30d885656dc976f27c8b3..305754fec075ea480107c0f04caebdf46c58600e 100644 (file)
@@ -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-10  Richard Sandiford  <rsandifo@redhat.com>
 
        * opcode/mips.h (INSN_GP32): Remove.
index effe5f628cc2c919ff971a8412383748e8f28125..8d46e375e3a8ab6414a39ac8d4ce6398590c248c 100644 (file)
@@ -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.  */
index c3fdb22c1512e5c90f99309a552a980afde425bb..5c70d68ad3d25d940b2e1b381f95401de69878a9 100644 (file)
@@ -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
index 7f870497c4fbe76e6644f0675dec0b5052763612..b37316259d2c539601ba85bc50b6c1c1dce6b3e7 100644 (file)
@@ -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;
 }
This page took 0.035039 seconds and 4 git commands to generate.