From 39fc05fb065833938aad7ab0285f017e616a60f2 Mon Sep 17 00:00:00 2001
From: Eric Blake <ebb9@byu.net>
Date: Thu, 15 May 2008 14:37:29 -0600
Subject: [PATCH] Fix violation of <stdbool.h> replacement in regex.

* lib/regcomp.c (re_compile_internal): Avoid implicit cast to bool.
Reported by Heinrich Mislik <Heinrich.Mislik@univie.ac.at>.

Signed-off-by: Eric Blake <ebb9@byu.net>
---
 ChangeLog     | 8 +++++++-
 lib/regcomp.c | 4 ++--
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2e4d587237..04ee46e7f3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-05-15  Eric Blake  <ebb9@byu.net>
+
+	Fix violation of <stdbool.h> replacement in regex.
+	* lib/regcomp.c (re_compile_internal): Avoid implicit cast to bool.
+	Reported by Heinrich Mislik <Heinrich.Mislik@univie.ac.at>.
+
 2008-05-15  Jim Meyering  <meyering@redhat.com>
 
 	avoid distracting test output when git or cvs is not fount
@@ -69,7 +75,7 @@
 	* lib/xmalloc.c (xmemdup0): Likewise.
 
 2008-05-13  Eric Blake  <ebb9@byu.net>
-            Bruno Haible  <bruno@clisp.org>
+	    Bruno Haible  <bruno@clisp.org>
 
 	Reduce number of forks required during autoconf.
 	* gnulib-tool (func_emit_initmacro_start): Prepare gl_LIBSOURCES_LIST
diff --git a/lib/regcomp.c b/lib/regcomp.c
index dc15666503..a3a745db86 100644
--- a/lib/regcomp.c
+++ b/lib/regcomp.c
@@ -1,5 +1,5 @@
 /* Extended regular expression matching and search library.
-   Copyright (C) 2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc.
+   Copyright (C) 2002,2003,2004,2005,2006,2007,2008 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
 
@@ -776,7 +776,7 @@ re_compile_internal (regex_t *preg, const char * pattern, size_t length,
   __libc_lock_init (dfa->lock);
 
   err = re_string_construct (&regexp, pattern, length, preg->translate,
-			     syntax & RE_ICASE, dfa);
+			     (syntax & RE_ICASE) != 0, dfa);
   if (BE (err != REG_NOERROR, 0))
     {
     re_compile_internal_free_return:
-- 
2.39.5