From 0db6a0ce9f944eb5d7024aa01ca73c04986e564f Mon Sep 17 00:00:00 2001 From: jmcmullan Date: Sat, 27 Oct 2012 18:44:23 +0000 Subject: [PATCH] arosc.library: Use __inline__ instead of inline (needed for '-ansi' compilation) Signed-off-by: Jason S. McMullan git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@45955 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- compiler/clib/include/_strings.h | 10 +++++----- compiler/clib/include/aros/types/wchar_t.h | 6 +++++- compiler/clib/include/stdlib.h | 8 ++++---- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/compiler/clib/include/_strings.h b/compiler/clib/include/_strings.h index 0aeef700b6..9843ef8589 100644 --- a/compiler/clib/include/_strings.h +++ b/compiler/clib/include/_strings.h @@ -32,27 +32,27 @@ char *strchr (const char * s, int c); char *strrchr (const char * s, int c); /* Deprecated, removed in POSIX.1-2008 */ -static inline int bcmp(const void * s1, const void * s2, size_t n) +static __inline__ int bcmp(const void * s1, const void * s2, size_t n) { return memcmp(s1, s2, n); } -static inline void bcopy(const void * src, void * dest, size_t n) +static __inline__ void bcopy(const void * src, void * dest, size_t n) { memmove(dest, src, n); } -static inline void bzero(void * dest, size_t n) +static __inline__ void bzero(void * dest, size_t n) { memset(dest, 0, n); } -static inline char *index(const char * s, int c) +static __inline__ char *index(const char * s, int c) { return strchr(s, c); } -static inline char *rindex(const char * s, int c) +static __inline__ char *rindex(const char * s, int c) { return strrchr(s, c); } diff --git a/compiler/clib/include/aros/types/wchar_t.h b/compiler/clib/include/aros/types/wchar_t.h index 38f8a84faf..b4fa9c2f87 100644 --- a/compiler/clib/include/aros/types/wchar_t.h +++ b/compiler/clib/include/aros/types/wchar_t.h @@ -8,7 +8,11 @@ #ifndef __cplusplus -typedef char wchar_t; +#ifdef __WCHAR_TYPE__ +typedef __WCHAR_TYPE__ wchar_t; +#else +typedef short wchar_t; +#endif #endif diff --git a/compiler/clib/include/stdlib.h b/compiler/clib/include/stdlib.h index 98b37eaaf6..74e567eb76 100644 --- a/compiler/clib/include/stdlib.h +++ b/compiler/clib/include/stdlib.h @@ -138,7 +138,7 @@ int on_exit(void (*func)(int, void *), void *); #if !defined(_STDC_NOINLINE_MBTOWC) -static inline +static __inline__ int mbtowc(wchar_t * restrict pwc, const char * restrict s, size_t n) { if (s == NULL) @@ -163,7 +163,7 @@ int mbtowc(wchar_t * restrict pwc, const char * restrict s, size_t n) #if !defined(_STDC_NOINLINE_WCTOMB) -static inline +static __inline__ int wctomb(char *s, wchar_t wchar) { if (s == NULL) @@ -184,7 +184,7 @@ int wctomb(char *s, wchar_t wchar) #if !defined(_STDC_NOINLINE_MBSTOWCS) -static inline +static __inline__ size_t mbstowcs(wchar_t * restrict pwcs, const char * restrict s, size_t n) { size_t l; @@ -205,7 +205,7 @@ size_t mbstowcs(wchar_t * restrict pwcs, const char * restrict s, size_t n) #if !defined(_STDC_NOINLINE_WCSTOMBS) -static inline +static __inline__ size_t wcstombs(char * restrict s, const wchar_t * restrict pwcs, size_t n) { size_t l; -- 2.11.4.GIT