arosc.library: Use __inline__ instead of inline (needed for '-ansi' compilation)
[AROS.git] / compiler / clib / include / _strings.h
blob9843ef8589032aebea2ba479334cdfe7d2703db7
1 #ifndef __STRINGS_H_
2 #define __STRINGS_H_
4 /*
5 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc: POSIX.1-2008 header file <strings.h>, with some extesions
9 File is named _strings.h and included from strings.h.
10 This allows string.h to include _strings.h without generating
11 conflict with catcomp generated strings.h file.
13 #include <aros/system.h>
15 #include <aros/types/size_t.h>
17 __BEGIN_DECLS
19 /* NOTIMPL int ffs(int); */
20 int strcasecmp(const char *, const char *);
21 /* NOTIMPL int strcasecmp_l(const char *, const char *, locale_t); */
22 int strncasecmp(const char *, const char *, size_t);
23 /* NOTIMPL int strncasecmp_l(const char *, const char *, size_t, locale_t); */
25 /* Some name space polution to implement legacy functions as
26 inline functions
28 void *memmove (void * dest, const void * src, size_t n);
29 int memcmp (const void * s1, const void * s2, size_t n);
30 void *memset (void * dest, int c, size_t n);
31 char *strchr (const char * s, int c);
32 char *strrchr (const char * s, int c);
34 /* Deprecated, removed in POSIX.1-2008 */
35 static __inline__ int bcmp(const void * s1, const void * s2, size_t n)
37 return memcmp(s1, s2, n);
40 static __inline__ void bcopy(const void * src, void * dest, size_t n)
42 memmove(dest, src, n);
45 static __inline__ void bzero(void * dest, size_t n)
47 memset(dest, 0, n);
50 static __inline__ char *index(const char * s, int c)
52 return strchr(s, c);
55 static __inline__ char *rindex(const char * s, int c)
57 return strrchr(s, c);
60 /* BSD */
61 char *strcasestr(const char * str, const char * search);
63 /* Extension */
64 #define stricmp strcasecmp
65 #define strnicmp strncasecmp
67 __END_DECLS
69 #endif /* __STRINGS_H_ */