git: d28bbfa2715a - main - localedef: Bootstrap better
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 31 May 2024 03:59:59 UTC
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d28bbfa2715a45c841e0eeec38d7f7b73513c66e commit d28bbfa2715a45c841e0eeec38d7f7b73513c66e Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2024-05-27 17:07:26 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-05-31 03:59:15 +0000 localedef: Bootstrap better Declare these functions in a macro-safe way instead of relying on ifdefs. Sponsored by: Netflix --- usr.bin/localedef/bootstrap/ctype.h | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/usr.bin/localedef/bootstrap/ctype.h b/usr.bin/localedef/bootstrap/ctype.h index 510873aaa764..6c9532540219 100644 --- a/usr.bin/localedef/bootstrap/ctype.h +++ b/usr.bin/localedef/bootstrap/ctype.h @@ -40,17 +40,14 @@ /* * On macOS isxdigit(), etc are defined in _ctype.h, but we have to include the * target _ctype.h so that localedef uses the correct values. - * To fix macOS bootstrap, provide a declaration of isxdigit(), etc. here. - * However, only do so if they are not already define as a macro (as is the - * case on Linux). + * To fix macOS bootstrap, provide a declaration of isxdigit(), etc. here in + * a macro-safe way. */ -#ifndef isxdigit __BEGIN_DECLS -int isalpha(int); -int isascii(int); -int isdigit(int); -int isgraph(int); -int islower(int); -int isxdigit(int); +int (isalpha)(int); +int (isascii)(int); +int (isdigit)(int); +int (isgraph)(int); +int (islower)(int); +int (isxdigit)(int); __END_DECLS -#endif