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

From: [email-masked]
Date: Tue, 01 Apr 2014 03:33:32 -0600

Hi.

Please don't revert this change. dfa.c is *shared* code, and there's no
reason for gawk to put stuff needed ONLY by dfa.c into its config.h
file. (Gawk doesn't have a system.h - most of that stuff is in awk.h
at the momment. The rest is in custom.h which is used to override defaults
from configure, and not for portability.)

I understand that grep doesn't need it, but dfa serves more than
one master. I appreciate the grep team's accommodating gawk's needs.

Thanks,

Arnold
------------------

Paolo Bonzini <[email-masked]> wrote:

> This partially reverts the following commits:
> - df6da5d40a47abbc6e3451cb9fab7a8c9ede12cc.
> - c40e7f7158109985b901ae67e5faa06160547471.
> - 0995fc11214ebbb1c99a4b6d675fe615b0ed8539.
>
> As far as grep is concerned, the #define *does* belong in gnulib.  gawk
> can apply the fix in a common header file like grep's src/system.h.
> ---
>  src/dfa.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/src/dfa.c b/src/dfa.c
> index b22fe97..a7f0056 100644
> --- a/src/dfa.c
> +++ b/src/dfa.c
> @@ -34,11 +34,7 @@
>  #include <locale.h>
>  #include <stdbool.h>
>  
> -/* Gawk doesn't use Gnulib, so don't assume that setlocale and
> -   static_assert are present.  */
> -#ifndef LC_ALL
> -# define setlocale(category, locale) NULL
> -#endif
> +/* Gawk doesn't use Gnulib, so don't assume static_assert is present.  */
>  #ifndef static_assert
>  # define static_assert(cond, diagnostic) \
>      extern int (*foo (void)) [!!sizeof (struct { int foo: (cond) ? 8 : -1; })]
> -- 
> 1.9.0
>
>
>
>
> From bug-grep-bounces+arnold=[email-masked]  Tue Apr  1 03:19:14 2014
> X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
> 	frenzy.freefriends.org
> X-Spam-Level: 
> X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI,
> 	RP_MATCHES_RCVD autolearn=ham version=3.3.1
> X-Envelope-From: bug-grep-bounces+arnold=[email-masked]
> Return-Path: <bug-grep-bounces+arnold=[email-masked]>
> X-Loop: [email-masked]
> Subject: bug#17157: [PATCH 1/5] Partially revert "dfa: improve port to
> 	freestanding DJGPP"
> Resent-From: Paolo Bonzini <[email-masked]>
> Original-Sender: "Debbugs-submit" <[email-masked]>
> Resent-CC: [email-masked]
> Resent-Date: Tue, 01 Apr 2014 09:19:03 +0000
> Resent-Message-ID: <[email-masked]>
> Resent-Sender: [email-masked]
> X-GNU-PR-Message: report 17157
> X-GNU-PR-Package: grep
> X-GNU-PR-Keywords: patch
> To: [email-masked]
> X-Debbugs-Original-To: [email-masked]
> From: Paolo Bonzini <[email-masked]>
> Date: Tue,  1 Apr 2014 11:18:42 +0200
> X-Mailer: git-send-email 1.9.0
> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
> 	(bad octet value).
> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
> X-BeenThere: [email-masked]
> X-Mailman-Version: 2.1.15
> Precedence: list
> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
> X-Received-From: 140.186.70.43
> Cc: [email-masked]
> X-BeenThere: [email-masked]
> List-Id: Bug reports for GNU grep <bug-grep.gnu.org>
> List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-grep>,
> 	<mailto:[email-masked]?subject=unsubscribe>
> List-Archive: <http://lists.gnu.org/archive/html/bug-grep>
> List-Post: <mailto:[email-masked]>
> List-Help: <mailto:[email-masked]?subject=help>
> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-grep>,
> 	<mailto:[email-masked]?subject=subscribe>
> Errors-To: bug-grep-bounces+arnold=[email-masked]
> Sender: bug-grep-bounces+arnold=[email-masked]
> Status: R
>
> This partially reverts the following commits:
> - df6da5d40a47abbc6e3451cb9fab7a8c9ede12cc.
> - c40e7f7158109985b901ae67e5faa06160547471.
> - 0995fc11214ebbb1c99a4b6d675fe615b0ed8539.
>
> As far as grep is concerned, the #define *does* belong in gnulib.  gawk
> can apply the fix in a common header file like grep's src/system.h.
> ---
>  src/dfa.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/src/dfa.c b/src/dfa.c
> index b22fe97..a7f0056 100644
> --- a/src/dfa.c
> +++ b/src/dfa.c
> @@ -34,11 +34,7 @@
>  #include <locale.h>
>  #include <stdbool.h>
>  
> -/* Gawk doesn't use Gnulib, so don't assume that setlocale and
> -   static_assert are present.  */
> -#ifndef LC_ALL
> -# define setlocale(category, locale) NULL
> -#endif
> +/* Gawk doesn't use Gnulib, so don't assume static_assert is present.  */
>  #ifndef static_assert
>  # define static_assert(cond, diagnostic) \
>      extern int (*foo (void)) [!!sizeof (struct { int foo: (cond) ? 8 : -1; })]
> -- 
> 1.9.0
>
>
>
>
>