[glibc] stdbit: Fix builtin name used in __glibc_has_builtin check for rotate_right
Uros Bizjak via Glibc-cvs <[email protected]>
| Newsgroups | gmane.comp.lib.glibc.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=331c7a4cd0ee9b3788b459a9039248597628bf41 commit 331c7a4cd0ee9b3788b459a9039248597628bf41 Author: Uros Bizjak <[email protected]> Date: Wed May 6 11:21:39 2026 +0200 stdbit: Fix builtin name used in __glibc_has_builtin check for rotate_right The __glibc_has_builtin check in include/stdbit.h incorrectly refers to ___builtin_stdc_rotate_right (with three leading underscores) instead of the correct __builtin_stdc_rotate_right (two leading underscores). As a result, the builtin is not detected even when supported by the compiler. Fix the spelling to use __builtin_stdc_rotate_right consistently in both the feature test and the corresponding comment. Fixes: 4adae8550a7a ("stdlib: Add internal stdc_rotate_right implementation") Signed-off-by: Uros Bizjak <[email protected]> Reviewed-by: Adhemerval Zanella <[email protected]> Diff: --- include/stdbit.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/stdbit.h b/include/stdbit.h index 5be19b882e..863b0f8383 100644 --- a/include/stdbit.h +++ b/include/stdbit.h @@ -5,8 +5,8 @@ #ifndef _ISOMAC # include <stdint.h> -# if __glibc_has_builtin (___builtin_stdc_rotate_right) -# define stdc_rotate_right(__x, __n) (___builtin_stdc_rotate_right (__x, __n)) +# if __glibc_has_builtin (__builtin_stdc_rotate_right) +# define stdc_rotate_right(__x, __n) (__builtin_stdc_rotate_right (__x, __n)) # define stdc_rotate_right_uc(__x, __n) (stdc_rotate_right (__x, __n)) # define stdc_rotate_right_us(__x, __n) (stdc_rotate_right (__x, __n)) # define stdc_rotate_right_ui(__x, __n) (stdc_rotate_right (__x, __n)) @@ -62,7 +62,7 @@ __ror64_inline (uint64_t __x, unsigned int __n) # define stdc_rotate_right_ul(__x, __n) (__ror32_inline (__x, __n)) # endif # define stdc_rotate_right_ull(__x, __n) (__ror64_inline (__x, __n)) -# endif /* __glibc_has_builtin (___builtin_stdc_rotate_right) */ +# endif /* __glibc_has_builtin (__builtin_stdc_rotate_right) */ # endif /* _ISOMAC */