From e182654151a0f6ebbe628c8f2f6b041c69adbac1 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 14 Dec 2020 17:51:38 +0000 Subject: [PATCH] Remove strtoimax, strtoumax, wcstoimax, wcstoumax inlines inttypes.h has inline implementations of the strtoimax, strtoumax, wcstoimax and wcstoumax functions, despite the corresponding stdlib.h and wchar.h inlines having been removed in 2007 (commit 9b2e9577b228350b15d88303b00097dd58e8d29b). Remove those inlines, thereby eliminating all references to the corresponding __*_internal functions from installed headers (so they could be made into compat symbols in future if desired). Tested for x86_64 and x86. --- stdlib/inttypes.h | 118 ---------------------------------------------- 1 file changed, 118 deletions(-) diff --git a/stdlib/inttypes.h b/stdlib/inttypes.h index 611a8b56c3..bcc56f6af6 100644 --- a/stdlib/inttypes.h +++ b/stdlib/inttypes.h @@ -311,124 +311,6 @@ extern uintmax_t wcstoumax (const __gwchar_t *__restrict __nptr, __gwchar_t ** __restrict __endptr, int __base) __THROW; -#ifdef __USE_EXTERN_INLINES - -# if __WORDSIZE == 64 - -extern long int __strtol_internal (const char *__restrict __nptr, - char **__restrict __endptr, - int __base, int __group) - __THROW __nonnull ((1)) __wur; -/* Like `strtol' but convert to `intmax_t'. */ -__extern_inline intmax_t -__NTH (strtoimax (const char *__restrict __nptr, char **__restrict __endptr, - int __base)) -{ - return __strtol_internal (__nptr, __endptr, __base, 0); -} - -extern unsigned long int __strtoul_internal (const char *__restrict __nptr, - char ** __restrict __endptr, - int __base, int __group) - __THROW __nonnull ((1)) __wur; -/* Like `strtoul' but convert to `uintmax_t'. */ -__extern_inline uintmax_t -__NTH (strtoumax (const char *__restrict __nptr, char **__restrict __endptr, - int __base)) -{ - return __strtoul_internal (__nptr, __endptr, __base, 0); -} - -extern long int __wcstol_internal (const __gwchar_t * __restrict __nptr, - __gwchar_t **__restrict __endptr, - int __base, int __group) - __THROW __nonnull ((1)) __wur; -/* Like `wcstol' but convert to `intmax_t'. */ -__extern_inline intmax_t -__NTH (wcstoimax (const __gwchar_t *__restrict __nptr, - __gwchar_t **__restrict __endptr, int __base)) -{ - return __wcstol_internal (__nptr, __endptr, __base, 0); -} - -extern unsigned long int __wcstoul_internal (const __gwchar_t * - __restrict __nptr, - __gwchar_t ** - __restrict __endptr, - int __base, int __group) - __THROW __nonnull ((1)) __wur; -/* Like `wcstoul' but convert to `uintmax_t'. */ -__extern_inline uintmax_t -__NTH (wcstoumax (const __gwchar_t *__restrict __nptr, - __gwchar_t **__restrict __endptr, int __base)) -{ - return __wcstoul_internal (__nptr, __endptr, __base, 0); -} - -# else /* __WORDSIZE == 32 */ - -__extension__ -extern long long int __strtoll_internal (const char *__restrict __nptr, - char **__restrict __endptr, - int __base, int __group) - __THROW __nonnull ((1)) __wur; -/* Like `strtol' but convert to `intmax_t'. */ -__extern_inline intmax_t -__NTH (strtoimax (const char *__restrict __nptr, char **__restrict __endptr, - int __base)) -{ - return __strtoll_internal (__nptr, __endptr, __base, 0); -} - -__extension__ -extern unsigned long long int __strtoull_internal (const char * - __restrict __nptr, - char ** - __restrict __endptr, - int __base, - int __group) - __THROW __nonnull ((1)) __wur; -/* Like `strtoul' but convert to `uintmax_t'. */ -__extern_inline uintmax_t -__NTH (strtoumax (const char *__restrict __nptr, char **__restrict __endptr, - int __base)) -{ - return __strtoull_internal (__nptr, __endptr, __base, 0); -} - -__extension__ -extern long long int __wcstoll_internal (const __gwchar_t *__restrict __nptr, - __gwchar_t **__restrict __endptr, - int __base, int __group) - __THROW __nonnull ((1)) __wur; -/* Like `wcstol' but convert to `intmax_t'. */ -__extern_inline intmax_t -__NTH (wcstoimax (const __gwchar_t *__restrict __nptr, - __gwchar_t **__restrict __endptr, int __base)) -{ - return __wcstoll_internal (__nptr, __endptr, __base, 0); -} - - -__extension__ -extern unsigned long long int __wcstoull_internal (const __gwchar_t * - __restrict __nptr, - __gwchar_t ** - __restrict __endptr, - int __base, - int __group) - __THROW __nonnull ((1)) __wur; -/* Like `wcstoul' but convert to `uintmax_t'. */ -__extern_inline uintmax_t -__NTH (wcstoumax (const __gwchar_t *__restrict __nptr, - __gwchar_t **__restrict __endptr, int __base)) -{ - return __wcstoull_internal (__nptr, __endptr, __base, 0); -} - -# endif /* __WORDSIZE == 32 */ -#endif /* Use extern inlines. */ - __END_DECLS #endif /* inttypes.h */ -- 2.43.5