Subject: Re: bug#17157: [PATCH 1/5] Partially revert "dfa: improve port to freestanding DJGPP"

From: Jim Meyering <[email-masked]>
Date: Sun, 6 Apr 2014 10:01:15 -0700

On Sat, Apr 5, 2014 at 4:36 PM, Paul Eggert <[email-masked]> wrote:
> Jim Meyering wrote:
>>
>> Thanks!  The grep changes all look fine.
>
>
> OK, thanks, I installed them and am marking this bug as done.  As I
> understand it, Aharon is in the middle of a gawk release and so now's not a
> good time to install the gawk changes, but we can address any integration
> issues if they later come up.

Hi Paul,

I see that dfa.c now fails to compile on systems without static_assert
support, e.g., OS X 10.8.5 (even with gcc-4.9.0 20140324):

dfa.c:918:16: error: expected declaration specifiers or '...' before '(' token
 static_assert ((sizeof lonesome_lower / sizeof *lonesome_lower + 2

I've pushed the attached to make grep buildable again.
From a09cec8b667bcbae2f96c8b3de12dc9de4a3ab87 Mon Sep 17 00:00:00 2001
From: Jim Meyering <[email-masked]>
Date: Sun, 6 Apr 2014 09:25:41 -0700
Subject: [PATCH] build: avoid OS X 10.8.5 build failure due to lack of
 static_assert

* bootstrap.conf (gnulib_modules): Add assert-h, to accommodate the
new use of static_assert on systems lacking support for that construct.
Without this change, compilation of dfa.c failed on OS X 10.8.5 with
gcc-4.9.0 20140324.  We should be using gnulib's assert-h module,
regardless, for its nominal improved portability, since grep includes
assert.h and uses assert.
---
 bootstrap.conf | 1 +
 1 file changed, 1 insertion(+)

diff --git a/bootstrap.conf b/bootstrap.conf
index 367427d..86cd81d 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -24,6 +24,7 @@ gnulib_modules='
 alloca
 announce-gen
 argmatch
+assert-h
 binary-io
 btowc
 c-ctype
-- 
1.9.0.258.g00eda23