coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

two more gnulib-induced syntax-check fixes


From: Jim Meyering
Subject: two more gnulib-induced syntax-check fixes
Date: Sun, 30 Oct 2011 22:42:19 +0100

To fix the bug that disabled "make syntax-check" I needed to update
from gnulib again.  The fixed GNUmakefile did get me past the initial
failure, but there was one other:

    gl/lib/randread.c:# define alignof(type) offsetof (struct { char c; type x; 
}, x)
    maint.mk: define the above via some gnulib .h file
    make: *** [sc_prohibit_always-defined_macros] Error 1

That's because with gnulib's new definition of alignof,
the syntax-check rule dings our private definition as removable.

>From 50424fe2a5325b17d294a0bd740df17fd21eb520 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sun, 30 Oct 2011 22:31:17 +0100
Subject: [PATCH 1/2] maint: avoid new "make syntax-check" failure due to
 stdalign definition

* gl/modules/randread (Depends-on): Add stdalign.
* gl/lib/randread.c: Include <stdalign.h>, so we can ...
[!_STRING_ARCH_unaligned]: remove definition of stdalign.
---
 gl/lib/randread.c   |    2 +-
 gl/modules/randread |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/gl/lib/randread.c b/gl/lib/randread.c
index a75d9f6..b2a3ce6 100644
--- a/gl/lib/randread.c
+++ b/gl/lib/randread.c
@@ -29,6 +29,7 @@
 #include <exitfail.h>
 #include <fcntl.h>
 #include <quotearg.h>
+#include <stdalign.h>
 #include <stdbool.h>
 #include <stdint.h>
 #include <stdio.h>
@@ -62,7 +63,6 @@
 #if _STRING_ARCH_unaligned
 # define ALIGNED_POINTER(ptr, type) true
 #else
-# define alignof(type) offsetof (struct { char c; type x; }, x)
 # define ALIGNED_POINTER(ptr, type) ((size_t) (ptr) % alignof (type) == 0)
 #endif

diff --git a/gl/modules/randread b/gl/modules/randread
index 1c4a905..33485c5 100644
--- a/gl/modules/randread
+++ b/gl/modules/randread
@@ -14,6 +14,7 @@ inline
 fopen-safer
 gettimeofday
 quotearg
+stdalign
 stdbool
 stdint
 unlocked-io
--
1.7.7.1.476.g9890


>From 8ad83063274466d28dac915a0d3dc7af1d107430 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sun, 30 Oct 2011 22:26:14 +0100
Subject: [PATCH 2/2] build: update gnulib for GNUmakefile fix

---
 gnulib |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gnulib b/gnulib
index 56ddf0f..a765077 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit 56ddf0fdeb52ce76718e0594db4f567401e90a2c
+Subproject commit a765077b04a89bffa2a6095c7988fb9a70857d7f
--
1.7.7.1.476.g9890



reply via email to

[Prev in Thread] Current Thread [Next in Thread]