ctype.h: shut up new gcc warning

Newer versions of gcc apparently considers it a warning offence if a
function with "extern inline" includes a "static inline" function,
even with "always_inline" attribute.  Thus, use __must_inline and
change __must_inline to be extern inline (it shouldn't matter since it
is always inlined...)

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
diff --git a/usr/include/ctype.h b/usr/include/ctype.h
index b205489..dfe1c46 100644
--- a/usr/include/ctype.h
+++ b/usr/include/ctype.h
@@ -8,6 +8,7 @@
 #define _CTYPE_H
 
 #include <klibc/extern.h>
+#include <klibc/compiler.h>
 
 /*
  * This relies on the following definitions:
@@ -46,69 +47,69 @@
 
 extern const unsigned char __ctypes[];
 
-static inline int __ctype_isalnum(int __c)
+__must_inline int __ctype_isalnum(int __c)
 {
 	return __ctypes[__c + 1] &
 	    (__ctype_upper | __ctype_lower | __ctype_digit);
 }
 
-static inline int __ctype_isalpha(int __c)
+__must_inline int __ctype_isalpha(int __c)
 {
 	return __ctypes[__c + 1] & (__ctype_upper | __ctype_lower);
 }
 
-static inline int __ctype_isascii(int __c)
+__must_inline int __ctype_isascii(int __c)
 {
 	return !(__c & ~0x7f);
 }
 
-static inline int __ctype_isblank(int __c)
+__must_inline int __ctype_isblank(int __c)
 {
 	return (__c == '\t') || (__c == ' ');
 }
 
-static inline int __ctype_iscntrl(int __c)
+__must_inline int __ctype_iscntrl(int __c)
 {
 	return __ctypes[__c + 1] & __ctype_cntrl;
 }
 
-static inline int __ctype_isdigit(int __c)
+__must_inline int __ctype_isdigit(int __c)
 {
 	return ((unsigned)__c - '0') <= 9;
 }
 
-static inline int __ctype_isgraph(int __c)
+__must_inline int __ctype_isgraph(int __c)
 {
 	return __ctypes[__c + 1] &
 	    (__ctype_upper | __ctype_lower | __ctype_digit | __ctype_punct);
 }
 
-static inline int __ctype_islower(int __c)
+__must_inline int __ctype_islower(int __c)
 {
 	return __ctypes[__c + 1] & __ctype_lower;
 }
 
-static inline int __ctype_isprint(int __c)
+__must_inline int __ctype_isprint(int __c)
 {
 	return __ctypes[__c + 1] & __ctype_print;
 }
 
-static inline int __ctype_ispunct(int __c)
+__must_inline int __ctype_ispunct(int __c)
 {
 	return __ctypes[__c + 1] & __ctype_punct;
 }
 
-static inline int __ctype_isspace(int __c)
+__must_inline int __ctype_isspace(int __c)
 {
 	return __ctypes[__c + 1] & __ctype_space;
 }
 
-static inline int __ctype_isupper(int __c)
+__must_inline int __ctype_isupper(int __c)
 {
 	return __ctypes[__c + 1] & __ctype_upper;
 }
 
-static inline int __ctype_isxdigit(int __c)
+__must_inline int __ctype_isxdigit(int __c)
 {
 	return __ctypes[__c + 1] & __ctype_xdigit;
 }
@@ -117,12 +118,12 @@
 #define _toupper(__c) ((__c) & ~32)
 #define _tolower(__c) ((__c) | 32)
 
-static inline int __ctype_toupper(int __c)
+__must_inline int __ctype_toupper(int __c)
 {
 	return __ctype_islower(__c) ? _toupper(__c) : __c;
 }
 
-static inline int __ctype_tolower(int __c)
+__must_inline int __ctype_tolower(int __c)
 {
 	return __ctype_isupper(__c) ? _tolower(__c) : __c;
 }
@@ -139,18 +140,18 @@
 #endif
 
 __CTYPEFUNC(isalnum)
-    __CTYPEFUNC(isalpha)
-    __CTYPEFUNC(isascii)
-    __CTYPEFUNC(isblank)
-    __CTYPEFUNC(iscntrl)
-    __CTYPEFUNC(isdigit)
-    __CTYPEFUNC(isgraph)
-    __CTYPEFUNC(islower)
-    __CTYPEFUNC(isprint)
-    __CTYPEFUNC(ispunct)
-    __CTYPEFUNC(isspace)
-    __CTYPEFUNC(isupper)
-    __CTYPEFUNC(isxdigit)
-    __CTYPEFUNC(toupper)
-    __CTYPEFUNC(tolower)
+__CTYPEFUNC(isalpha)
+__CTYPEFUNC(isascii)
+__CTYPEFUNC(isblank)
+__CTYPEFUNC(iscntrl)
+__CTYPEFUNC(isdigit)
+__CTYPEFUNC(isgraph)
+__CTYPEFUNC(islower)
+__CTYPEFUNC(isprint)
+__CTYPEFUNC(ispunct)
+__CTYPEFUNC(isspace)
+__CTYPEFUNC(isupper)
+__CTYPEFUNC(isxdigit)
+__CTYPEFUNC(toupper)
+__CTYPEFUNC(tolower)
 #endif				/* _CTYPE_H */
diff --git a/usr/include/klibc/compiler.h b/usr/include/klibc/compiler.h
index aba9a75..816a4ee 100644
--- a/usr/include/klibc/compiler.h
+++ b/usr/include/klibc/compiler.h
@@ -21,9 +21,10 @@
 #endif
 
 /* How to declare a function that *must* be inlined */
+/* Use "extern inline" even in the gcc3+ case to avoid warnings in ctype.h */
 #ifdef __GNUC__
 # if __GNUC__ >= 3
-#  define __must_inline static __inline__ __attribute__((always_inline))
+#  define __must_inline extern __inline__ __attribute__((always_inline))
 # else
 #  define __must_inline extern __inline__
 # endif