diff options
author | Daniel Stenberg <daniel@haxx.se> | 2002-06-15 15:49:32 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2002-06-15 15:49:32 +0000 |
commit | 7da93d58fdc73c40a721f9f1c7d7a42609e10a53 (patch) | |
tree | e16719bcc03f98a1ed0c211a8d381d029bbfc515 /firmware/include/string.h | |
parent | 4f58f6197d8aba3ddbb6976521ea9f814ae1738d (diff) |
This is my initial attempt to get rid of the newlib headers requirement,
for gcc built without newlib.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1017 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/include/string.h')
-rw-r--r-- | firmware/include/string.h | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/firmware/include/string.h b/firmware/include/string.h new file mode 100644 index 0000000000..e85dac33ea --- /dev/null +++ b/firmware/include/string.h @@ -0,0 +1,94 @@ +/* + * string.h + * + * Definitions for memory and string functions. + */ + +#ifndef _STRING_H_ +#define _STRING_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "_ansi.h" +#include <sys/reent.h> + +#define __need_size_t +#include <stddef.h> + +#ifndef NULL +#define NULL 0 +#endif + +_PTR _EXFUN(memchr,(const _PTR, int, size_t)); +int _EXFUN(memcmp,(const _PTR, const _PTR, size_t)); +_PTR _EXFUN(memcpy,(_PTR, const _PTR, size_t)); +_PTR _EXFUN(memmove,(_PTR, const _PTR, size_t)); +_PTR _EXFUN(memset,(_PTR, int, size_t)); +char *_EXFUN(strcat,(char *, const char *)); +char *_EXFUN(strchr,(const char *, int)); +int _EXFUN(strcmp,(const char *, const char *)); +int _EXFUN(strcoll,(const char *, const char *)); +char *_EXFUN(strcpy,(char *, const char *)); +size_t _EXFUN(strcspn,(const char *, const char *)); +char *_EXFUN(strerror,(int)); +size_t _EXFUN(strlen,(const char *)); +char *_EXFUN(strncat,(char *, const char *, size_t)); +int _EXFUN(strncmp,(const char *, const char *, size_t)); +char *_EXFUN(strncpy,(char *, const char *, size_t)); +char *_EXFUN(strpbrk,(const char *, const char *)); +char *_EXFUN(strrchr,(const char *, int)); +size_t _EXFUN(strspn,(const char *, const char *)); +char *_EXFUN(strstr,(const char *, const char *)); + +#ifndef _REENT_ONLY +char *_EXFUN(strtok,(char *, const char *)); +#endif + +size_t _EXFUN(strxfrm,(char *, const char *, size_t)); + +#ifndef __STRICT_ANSI__ +char *_EXFUN(strtok_r,(char *, const char *, char **)); + +int _EXFUN(bcmp,(const char *, const char *, size_t)); +void _EXFUN(bcopy,(const char *, char *, size_t)); +void _EXFUN(bzero,(char *, size_t)); +int _EXFUN(ffs,(int)); +char *_EXFUN(index,(const char *, int)); +_PTR _EXFUN(memccpy,(_PTR, const _PTR, int, size_t)); +char *_EXFUN(rindex,(const char *, int)); +int _EXFUN(strcasecmp,(const char *, const char *)); +char *_EXFUN(strdup,(const char *)); +char *_EXFUN(_strdup_r,(struct _reent *, const char *)); +int _EXFUN(strncasecmp,(const char *, const char *, size_t)); +char *_EXFUN(strsep,(char **, const char *)); +char *_EXFUN(strlwr,(char *)); +char *_EXFUN(strupr,(char *)); +#ifdef __CYGWIN__ +#ifndef DEFS_H /* Kludge to work around problem compiling in gdb */ +const char *_EXFUN(strsignal, (int __signo)); +#endif +int _EXFUN(strtosigno, (const char *__name)); +#endif + +/* These function names are used on Windows and perhaps other systems. */ +#ifndef strcmpi +#define strcmpi strcasecmp +#endif +#ifndef stricmp +#define stricmp strcasecmp +#endif +#ifndef strncmpi +#define strncmpi strncasecmp +#endif +#ifndef strnicmp +#define strnicmp strncasecmp +#endif + +#endif /* ! __STRICT_ANSI__ */ + +#ifdef __cplusplus +} +#endif +#endif /* _STRING_H_ */ |