glibc: replace extern __inline with __extern_inline.
* this helps to comply with C99. As a reminder, some of these headers are also used by x86_gcc2 src/libs/stdc++.
This commit is contained in:
parent
189156a069
commit
2a868d7645
@ -164,13 +164,13 @@ __exctype (_tolower);
|
||||
# endif
|
||||
|
||||
# ifdef __USE_EXTERN_INLINES
|
||||
extern __inline int
|
||||
__extern_inline int
|
||||
tolower (int __c) __THROW
|
||||
{
|
||||
return __c >= -128 && __c < 256 ? __ctype_tolower[__c] : __c;
|
||||
}
|
||||
|
||||
extern __inline int
|
||||
__extern_inline int
|
||||
toupper (int __c) __THROW
|
||||
{
|
||||
return __c >= -128 && __c < 256 ? __ctype_toupper[__c] : __c;
|
||||
|
@ -1,5 +1,5 @@
|
||||
#ifndef _EXTERN_INLINE
|
||||
#define _EXTERN_INLINE extern inline
|
||||
#define _EXTERN_INLINE __extern_inline
|
||||
#endif
|
||||
_EXTERN_INLINE int __libc_use_alloca (size_t size)
|
||||
{
|
||||
|
@ -22,10 +22,10 @@
|
||||
|
||||
#define __NTH(fct) __attribute__ ((__nothrow__)) fct
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifndef __extern_always_inline
|
||||
# define __MATH_INLINE __inline
|
||||
#else
|
||||
# define __MATH_INLINE extern __inline
|
||||
# define __MATH_INLINE __extern_always_inline
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
#ifdef __cplusplus
|
||||
# define __STDIO_INLINE inline
|
||||
#else
|
||||
# define __STDIO_INLINE extern __inline
|
||||
# define __STDIO_INLINE __extern_inline
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -226,6 +226,38 @@
|
||||
# define __attribute_format_strfmon__(a,b) /* Ignore */
|
||||
#endif
|
||||
|
||||
|
||||
/* Forces a function to be always inlined. */
|
||||
#if __GNUC_PREREQ (3,2)
|
||||
# define __always_inline __inline __attribute__ ((__always_inline__))
|
||||
#else
|
||||
# define __always_inline __inline
|
||||
#endif
|
||||
|
||||
/* Associate error messages with the source location of the call site rather
|
||||
than with the source location inside the function. */
|
||||
#if __GNUC_PREREQ (4,3)
|
||||
# define __attribute_artificial__ __attribute__ ((__artificial__))
|
||||
#else
|
||||
# define __attribute_artificial__ /* Ignore */
|
||||
#endif
|
||||
|
||||
/* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
|
||||
inline semantics, unless -fgnu89-inline is used. */
|
||||
#if !defined __cplusplus || __GNUC_PREREQ (4,3)
|
||||
# if defined __GNUC_STDC_INLINE__ || defined __cplusplus
|
||||
# define __extern_inline extern __inline __attribute__ ((__gnu_inline__))
|
||||
# define __extern_always_inline \
|
||||
extern __always_inline __attribute__ ((__gnu_inline__))
|
||||
# else
|
||||
# define __extern_inline extern __inline
|
||||
# define __extern_always_inline extern __always_inline
|
||||
# endif
|
||||
#else
|
||||
# define __extern_inline extern __inline
|
||||
#endif
|
||||
|
||||
|
||||
/* It is possible to compile containing GCC extensions even if GCC is
|
||||
run in pedantic mode if the uses are carefully marked using the
|
||||
`__extension__' keyword. But this is not generally available before
|
||||
|
@ -21,6 +21,8 @@ MA 02111-1307, USA. */
|
||||
|
||||
#ifndef __GMP_H__
|
||||
|
||||
#include <features.h>
|
||||
|
||||
#ifndef __GNU_MP__
|
||||
#define __GNU_MP__ 2
|
||||
#define __need_size_t
|
||||
@ -41,7 +43,7 @@ MA 02111-1307, USA. */
|
||||
|
||||
#ifndef _EXTERN_INLINE
|
||||
#ifdef __GNUC__
|
||||
#define _EXTERN_INLINE extern __inline__
|
||||
#define _EXTERN_INLINE __extern_inline
|
||||
#else
|
||||
#define _EXTERN_INLINE static
|
||||
#endif
|
||||
|
@ -306,18 +306,18 @@ extern unsigned long long int __strtoull_internal (__const char *
|
||||
/* Define inline functions which call the internal entry points. */
|
||||
|
||||
__BEGIN_NAMESPACE_STD
|
||||
extern __inline double
|
||||
__extern_inline double
|
||||
strtod (__const char *__restrict __nptr, char **__restrict __endptr) __THROW
|
||||
{
|
||||
return __strtod_internal (__nptr, __endptr, 0);
|
||||
}
|
||||
extern __inline long int
|
||||
__extern_inline long int
|
||||
strtol (__const char *__restrict __nptr, char **__restrict __endptr,
|
||||
int __base) __THROW
|
||||
{
|
||||
return __strtol_internal (__nptr, __endptr, __base, 0);
|
||||
}
|
||||
extern __inline unsigned long int
|
||||
__extern_inline unsigned long int
|
||||
strtoul (__const char *__restrict __nptr, char **__restrict __endptr,
|
||||
int __base) __THROW
|
||||
{
|
||||
@ -327,12 +327,12 @@ __END_NAMESPACE_STD
|
||||
|
||||
# ifdef __USE_ISOC99
|
||||
__BEGIN_NAMESPACE_C99
|
||||
extern __inline float
|
||||
__extern_inline float
|
||||
strtof (__const char *__restrict __nptr, char **__restrict __endptr) __THROW
|
||||
{
|
||||
return __strtof_internal (__nptr, __endptr, 0);
|
||||
}
|
||||
extern __inline long double
|
||||
__extern_inline long double
|
||||
strtold (__const char *__restrict __nptr, char **__restrict __endptr) __THROW
|
||||
{
|
||||
return __strtold_internal (__nptr, __endptr, 0);
|
||||
@ -341,13 +341,13 @@ __END_NAMESPACE_C99
|
||||
# endif
|
||||
|
||||
# ifdef __USE_BSD
|
||||
__extension__ extern __inline long long int
|
||||
__extension__ __extern_inline long long int
|
||||
strtoq (__const char *__restrict __nptr, char **__restrict __endptr,
|
||||
int __base) __THROW
|
||||
{
|
||||
return __strtoll_internal (__nptr, __endptr, __base, 0);
|
||||
}
|
||||
__extension__ extern __inline unsigned long long int
|
||||
__extension__ __extern_inline unsigned long long int
|
||||
strtouq (__const char *__restrict __nptr, char **__restrict __endptr,
|
||||
int __base) __THROW
|
||||
{
|
||||
@ -357,13 +357,13 @@ strtouq (__const char *__restrict __nptr, char **__restrict __endptr,
|
||||
|
||||
# if defined __USE_MISC || defined __USE_ISOC99
|
||||
__BEGIN_NAMESPACE_C99
|
||||
__extension__ extern __inline long long int
|
||||
__extension__ __extern_inline long long int
|
||||
strtoll (__const char *__restrict __nptr, char **__restrict __endptr,
|
||||
int __base) __THROW
|
||||
{
|
||||
return __strtoll_internal (__nptr, __endptr, __base, 0);
|
||||
}
|
||||
__extension__ extern __inline unsigned long long int
|
||||
__extension__ __extern_inline unsigned long long int
|
||||
strtoull (__const char * __restrict __nptr, char **__restrict __endptr,
|
||||
int __base) __THROW
|
||||
{
|
||||
@ -373,17 +373,17 @@ __END_NAMESPACE_C99
|
||||
# endif
|
||||
|
||||
__BEGIN_NAMESPACE_STD
|
||||
extern __inline double
|
||||
__extern_inline double
|
||||
atof (__const char *__nptr) __THROW
|
||||
{
|
||||
return strtod (__nptr, (char **) NULL);
|
||||
}
|
||||
extern __inline int
|
||||
__extern_inline int
|
||||
atoi (__const char *__nptr) __THROW
|
||||
{
|
||||
return (int) strtol (__nptr, (char **) NULL, 10);
|
||||
}
|
||||
extern __inline long int
|
||||
__extern_inline long int
|
||||
atol (__const char *__nptr) __THROW
|
||||
{
|
||||
return strtol (__nptr, (char **) NULL, 10);
|
||||
@ -392,7 +392,7 @@ __END_NAMESPACE_STD
|
||||
|
||||
# if defined __USE_MISC || defined __USE_ISOC99
|
||||
__BEGIN_NAMESPACE_C99
|
||||
__extension__ extern __inline long long int
|
||||
__extension__ __extern_inline long long int
|
||||
atoll (__const char *__nptr) __THROW
|
||||
{
|
||||
return strtoll (__nptr, (char **) NULL, 10);
|
||||
|
@ -43,7 +43,7 @@
|
||||
# ifdef __cplusplus
|
||||
# define __STRING_INLINE inline
|
||||
# else
|
||||
# define __STRING_INLINE extern __inline
|
||||
# define __STRING_INLINE __extern_inline
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
@ -218,34 +218,34 @@ extern unsigned long long int __wcstoull_internal (__const wchar_t *
|
||||
#if defined __OPTIMIZE__ && __GNUC__ >= 2
|
||||
/* Define inline functions which call the internal entry points. */
|
||||
|
||||
extern __inline double wcstod (__const wchar_t *__restrict __nptr,
|
||||
__extern_inline double wcstod (__const wchar_t *__restrict __nptr,
|
||||
wchar_t **__restrict __endptr) __THROW
|
||||
{ return __wcstod_internal (__nptr, __endptr, 0); }
|
||||
extern __inline long int wcstol (__const wchar_t *__restrict __nptr,
|
||||
__extern_inline long int wcstol (__const wchar_t *__restrict __nptr,
|
||||
wchar_t **__restrict __endptr,
|
||||
int __base) __THROW
|
||||
{ return __wcstol_internal (__nptr, __endptr, __base, 0); }
|
||||
extern __inline unsigned long int wcstoul (__const wchar_t *__restrict __nptr,
|
||||
__extern_inline unsigned long int wcstoul (__const wchar_t *__restrict __nptr,
|
||||
wchar_t **__restrict __endptr,
|
||||
int __base) __THROW
|
||||
{ return __wcstoul_internal (__nptr, __endptr, __base, 0); }
|
||||
|
||||
# ifdef __USE_GNU
|
||||
extern __inline float wcstof (__const wchar_t *__restrict __nptr,
|
||||
__extern_inline float wcstof (__const wchar_t *__restrict __nptr,
|
||||
wchar_t **__restrict __endptr) __THROW
|
||||
{ return __wcstof_internal (__nptr, __endptr, 0); }
|
||||
extern __inline long double wcstold (__const wchar_t *__restrict __nptr,
|
||||
__extern_inline long double wcstold (__const wchar_t *__restrict __nptr,
|
||||
wchar_t **__restrict __endptr) __THROW
|
||||
{ return __wcstold_internal (__nptr, __endptr, 0); }
|
||||
|
||||
|
||||
__extension__
|
||||
extern __inline long long int wcstoq (__const wchar_t *__restrict __nptr,
|
||||
__extern_inline long long int wcstoq (__const wchar_t *__restrict __nptr,
|
||||
wchar_t **__restrict __endptr,
|
||||
int __base) __THROW
|
||||
{ return __wcstoll_internal (__nptr, __endptr, __base, 0); }
|
||||
__extension__
|
||||
extern __inline unsigned long long int wcstouq (__const wchar_t *
|
||||
__extern_inline unsigned long long int wcstouq (__const wchar_t *
|
||||
__restrict __nptr,
|
||||
wchar_t **__restrict __endptr,
|
||||
int __base) __THROW
|
||||
|
Loading…
Reference in New Issue
Block a user