diff options
| author | bonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-02-14 08:52:24 +0000 |
|---|---|---|
| committer | bonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-02-14 08:52:24 +0000 |
| commit | bb30d1f4b425d77cdca39914443b3de84ed22f00 (patch) | |
| tree | 051695b6217a00738df88eb4f5452b7d4833bd75 /libcpp/internal.h | |
| parent | b3e5216b04faa3147644b55dfc9268d801dc9906 (diff) | |
| download | ppe42-gcc-bb30d1f4b425d77cdca39914443b3de84ed22f00.tar.gz ppe42-gcc-bb30d1f4b425d77cdca39914443b3de84ed22f00.zip | |
include:
2005-02-08 Paolo Bonzini <bonzini@gnu.org>
PR bootstrap/19818
* ansidecl.h (PARAMS): Guard from redefinition.
libcpp:
2005-02-08 Paolo Bonzini <bonzini@gnu.org>
PR bootstrap/19818
* configure.ac: Check for declaration of basename and getopt.
* config.in: Regenerate.
* configure: Regenerate.
* internal.h (ustrcspn): New.
* macro.c (create_iso_definition): Fix allocation of memory.
(padding_token): Add cast to remove const-ness.
* pch.c (cpp_read_state): Use ustrcspn.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95003 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp/internal.h')
| -rw-r--r-- | libcpp/internal.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libcpp/internal.h b/libcpp/internal.h index 9f39b21ec8e..74ae6c63d33 100644 --- a/libcpp/internal.h +++ b/libcpp/internal.h @@ -585,6 +585,9 @@ static inline unsigned char *uxstrdup (const unsigned char *); static inline 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. */ +static inline int ustrcspn (const unsigned char *, const char *); + static inline int ustrcmp (const unsigned char *s1, const unsigned char *s2) { @@ -597,6 +600,12 @@ ustrncmp (const unsigned char *s1, const unsigned char *s2, size_t n) return strncmp ((const char *)s1, (const char *)s2, n); } +static inline int +ustrcspn (const unsigned char *s1, const char *s2) +{ + return strcspn ((const char *)s1, s2); +} + static inline size_t ustrlen (const unsigned char *s1) { |

