From: Paul Eggert Date: Sat, 11 Nov 2023 08:14:48 +0000 (-0800) Subject: maint: port randread to FreeBSD 14 X-Git-Tag: v9.5~110 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4c15a1b6e68c982ce2af398336631f95ce2dd341;p=thirdparty%2Fcoreutils.git maint: port randread to FreeBSD 14 * gl/lib/randread.c (POINTER_IS_ALIGNED): Rename from ALIGNED_POINTER to avoid a collision with on FreeBSD 14. --- diff --git a/gl/lib/randread.c b/gl/lib/randread.c index b729fedbc3..fdeb79d16a 100644 --- a/gl/lib/randread.c +++ b/gl/lib/randread.c @@ -46,9 +46,9 @@ #include "xalloc.h" #if _STRING_ARCH_unaligned || _STRING_INLINE_unaligned -# define ALIGNED_POINTER(ptr, type) true +# define POINTER_IS_ALIGNED(ptr, type) true #else -# define ALIGNED_POINTER(ptr, type) ((size_t) (ptr) % alignof (type) == 0) +# define POINTER_IS_ALIGNED(ptr, type) ((size_t) (ptr) % alignof (type) == 0) #endif /* The maximum buffer size used for reads of random data. Using the @@ -271,7 +271,7 @@ readisaac (struct isaac *isaac, void *p, size_t size) /* If P is aligned, write to *P directly to avoid the overhead of copying from the buffer. */ - if (ALIGNED_POINTER (p, isaac_word)) + if (POINTER_IS_ALIGNED (p, isaac_word)) { isaac_word *wp = p; while (ISAAC_BYTES <= size)