Jon Ringle
2009-Jul-16 22:38 UTC
[klibc] [PATCH 1/2] Fix must_inline macro in klibc/compiler.h for gcc-4.3
See http://gcc.gnu.org/gcc-4.3/porting_to.html for details. Signed-off-by: Jon Ringle <jon at ringle.org> --- usr/include/klibc/compiler.h | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/usr/include/klibc/compiler.h b/usr/include/klibc/compiler.h index 816a4ee..e0da37e 100644 --- a/usr/include/klibc/compiler.h +++ b/usr/include/klibc/compiler.h @@ -24,7 +24,11 @@ /* Use "extern inline" even in the gcc3+ case to avoid warnings in ctype.h */ #ifdef __GNUC__ # if __GNUC__ >= 3 -# define __must_inline extern __inline__ __attribute__((always_inline)) +# ifdef __GNUC_STDC_INLINE__ +# define __must_inline extern __inline__ __attribute__((__gnu_inline__)) +# else +# define __must_inline extern __inline__ __attribute__((__always_inline__)) +# endif # else # define __must_inline extern __inline__ # endif
Jon Ringle
2009-Jul-16 22:38 UTC
[klibc] [PATCH 2/2] Fix no previous prototype __ctype_* warnings
<...>/usr/lib/klibc/include/ctype.h:63: warning: no previous prototype for '__ctype_isascii' <...>/usr/lib/klibc/include/ctype.h:68: warning: no previous prototype for '__ctype_isblank' <...>/usr/lib/klibc/include/ctype.h:73: warning: no previous prototype for '__ctype_iscntrl' <...>/usr/lib/klibc/include/ctype.h:78: warning: no previous prototype for '__ctype_isdigit' <...>/usr/lib/klibc/include/ctype.h:83: warning: no previous prototype for '__ctype_isgraph' <...>/usr/lib/klibc/include/ctype.h:89: warning: no previous prototype for '__ctype_islower' <...>/usr/lib/klibc/include/ctype.h:94: warning: no previous prototype for '__ctype_isprint' <...>/usr/lib/klibc/include/ctype.h:99: warning: no previous prototype for '__ctype_ispunct' <...>/usr/lib/klibc/include/ctype.h:104: warning: no previous prototype for '__ctype_isspace' <...>/usr/lib/klibc/include/ctype.h:109: warning: no previous prototype for '__ctype_isupper' <...>/usr/lib/klibc/include/ctype.h:114: warning: no previous prototype for '__ctype_isxdigit' <...>/usr/lib/klibc/include/ctype.h:123: warning: no previous prototype for '__ctype_toupper' <...>/usr/lib/klibc/include/ctype.h:128: warning: no previous prototype for '__ctype_tolower' Signed-off-by: Jon Ringle <jon at ringle.org> --- usr/include/ctype.h | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/usr/include/ctype.h b/usr/include/ctype.h index dfe1c46..ef7cac4 100644 --- a/usr/include/ctype.h +++ b/usr/include/ctype.h @@ -45,6 +45,22 @@ __extern int isxdigit(int); __extern int toupper(int); __extern int tolower(int); +__must_inline int __ctype_isalnum(int); +__must_inline int __ctype_isalpha(int); +__must_inline int __ctype_isascii(int); +__must_inline int __ctype_isblank(int); +__must_inline int __ctype_iscntrl(int); +__must_inline int __ctype_isdigit(int); +__must_inline int __ctype_isgraph(int); +__must_inline int __ctype_islower(int); +__must_inline int __ctype_isprint(int); +__must_inline int __ctype_ispunct(int); +__must_inline int __ctype_isspace(int); +__must_inline int __ctype_isupper(int); +__must_inline int __ctype_isxdigit(int); +__must_inline int __ctype_toupper(int); +__must_inline int __ctype_tolower(int); + extern const unsigned char __ctypes[]; __must_inline int __ctype_isalnum(int __c)
H. Peter Anvin
2009-Jul-20 05:02 UTC
[klibc] [PATCH 1/2] Fix must_inline macro in klibc/compiler.h for gcc-4.3
Jon Ringle wrote:> See http://gcc.gnu.org/gcc-4.3/porting_to.html for details. > # if __GNUC__ >= 3 > -# define __must_inline extern __inline__ __attribute__((always_inline)) > +# ifdef __GNUC_STDC_INLINE__ > +# define __must_inline extern __inline__ __attribute__((__gnu_inline__)) > +# else > +# define __must_inline extern __inline__ __attribute__((__always_inline__)) > +# endif > # elseAre you sure we don't need both gnu_inline and always_inline here? -hpa -- H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf.
Seemingly Similar Threads
- [PATCH 0/5] resubmitting pending patches
- [PATCH 2/3] fix missing prototypes for ctype inline functions
- [PATCH 1/2] Fix assert when NDEBUG defined
- [PATCH] add linux' arch/$ARCH/include to search path From: Marc Kleine-Budde <mkl@pengutronix.de> Date: Mon, 5 Jan 2009 17:46:47 +0100
- multiple definition of `_start' when using -ld with klcc