]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
stdbit: Fix builtin name used in __glibc_has_builtin check for rotate_right
authorUros Bizjak <ubizjak@gmail.com>
Wed, 6 May 2026 09:21:39 +0000 (11:21 +0200)
committerUros Bizjak <ubizjak@gmail.com>
Wed, 6 May 2026 12:09:12 +0000 (14:09 +0200)
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 <ubizjak@gmail.com>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
include/stdbit.h

index 5be19b882edfa60efa1d51fd037107762c51c474..863b0f8383cdfba369751c70e6d3362f76a61629 100644 (file)
@@ -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 */