aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2011-11-02 20:22:53 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2011-11-02 20:22:53 +0000
commit0c1dace38259c2e15699458410e0bee28f62c0cc (patch)
tree2315dba799b75e82626b3d6a56395a4b471a4368 /libcpp
parent8fbf5688fb7314c59ccd2774fd16f8d91ef56dd4 (diff)
downloadgcc-0c1dace38259c2e15699458410e0bee28f62c0cc.zip
gcc-0c1dace38259c2e15699458410e0bee28f62c0cc.tar.gz
gcc-0c1dace38259c2e15699458410e0bee28f62c0cc.tar.bz2
internal.h (uxstrdup, ustrchr): Return const unsigned char *.
2011-11-02 Paolo Carlini <paolo.carlini@oracle.com> * internal.h (uxstrdup, ustrchr): Return const unsigned char *. From-SVN: r180796
Diffstat (limited to 'libcpp')
-rw-r--r--libcpp/ChangeLog4
-rw-r--r--libcpp/internal.h12
2 files changed, 10 insertions, 6 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog
index 3fecead..c19f21b 100644
--- a/libcpp/ChangeLog
+++ b/libcpp/ChangeLog
@@ -1,3 +1,7 @@
+2011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * internal.h (uxstrdup, ustrchr): Return const unsigned char *.
+
2011-11-02 Jason Merrill <jason@redhat.com>
PR c++/50810
diff --git a/libcpp/internal.h b/libcpp/internal.h
index e60330df..b3dc2df 100644
--- a/libcpp/internal.h
+++ b/libcpp/internal.h
@@ -739,8 +739,8 @@ static inline int ustrcmp (const unsigned char *, const unsigned char *);
static inline int ustrncmp (const unsigned char *, const unsigned char *,
size_t);
static inline size_t ustrlen (const unsigned char *);
-static inline unsigned char *uxstrdup (const unsigned char *);
-static inline unsigned char *ustrchr (const unsigned char *, int);
+static inline const unsigned char *uxstrdup (const unsigned char *);
+static inline const unsigned char *ustrchr (const unsigned char *, int);
static inline int ufputs (const unsigned char *, FILE *);
/* Use a const char for the second parameter since it is usually a literal. */
@@ -770,16 +770,16 @@ ustrlen (const unsigned char *s1)
return strlen ((const char *)s1);
}
-static inline unsigned char *
+static inline const unsigned char *
uxstrdup (const unsigned char *s1)
{
- return (unsigned char *) xstrdup ((const char *)s1);
+ return (const unsigned char *) xstrdup ((const char *)s1);
}
-static inline unsigned char *
+static inline const unsigned char *
ustrchr (const unsigned char *s1, int c)
{
- return (unsigned char *) strchr ((const char *)s1, c);
+ return (const unsigned char *) strchr ((const char *)s1, c);
}
static inline int