]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: port randread to FreeBSD 14
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 11 Nov 2023 08:14:48 +0000 (00:14 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 11 Nov 2023 08:17:49 +0000 (00:17 -0800)
* gl/lib/randread.c (POINTER_IS_ALIGNED): Rename from
ALIGNED_POINTER to avoid a collision with <machine/param.h>
on FreeBSD 14.

gl/lib/randread.c

index b729fedbc3ba41a094b5eea15eec825c9b056c05..fdeb79d16abbad712c5d88e24a380181ce010e1b 100644 (file)
@@ -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)