Blame SOURCES/glibc-rh1505492-undef-29.patch

c6d234
commit 059bf913b5b3c5553a3756b4d9794e2eb3ce4f25
c6d234
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
c6d234
Date:   Thu Jun 26 20:40:46 2014 +0530
c6d234
c6d234
    Fix Wundef warning for WIDE_CHAR_VERSION
c6d234
    
c6d234
    fnmatch.c defines WIDE_CHAR_VERSION as 1 for wide chars, but does not
c6d234
    define it for the non-wide char bits.  Define it and also undef it in
c6d234
    fnmatch_loop.c like all other macros.
c6d234
c6d234
diff --git a/posix/fnmatch.c b/posix/fnmatch.c
c6d234
index f0b7b95548c2b9ce..99ec8c4a0eba49b3 100644
c6d234
--- a/posix/fnmatch.c
c6d234
+++ b/posix/fnmatch.c
c6d234
@@ -226,6 +226,7 @@ __wcschrnul (s, c)
c6d234
 # define MEMPCPY(D, S, N) __mempcpy (D, S, N)
c6d234
 # define MEMCHR(S, C, N) memchr (S, C, N)
c6d234
 # define STRCOLL(S1, S2) strcoll (S1, S2)
c6d234
+# define WIDE_CHAR_VERSION 0
c6d234
 # include "fnmatch_loop.c"
c6d234
 
c6d234
 
c6d234
diff --git a/posix/fnmatch_loop.c b/posix/fnmatch_loop.c
c6d234
index 7ffa3a9944630a0c..e289f451cc23c1ee 100644
c6d234
--- a/posix/fnmatch_loop.c
c6d234
+++ b/posix/fnmatch_loop.c
c6d234
@@ -503,7 +503,7 @@ FCT (pattern, string, string_end, no_leading_period, flags, ends, alloca_used)
c6d234
 			  {
c6d234
 			    int32_t table_size;
c6d234
 			    const int32_t *symb_table;
c6d234
-# ifdef WIDE_CHAR_VERSION
c6d234
+# if WIDE_CHAR_VERSION
c6d234
 			    char str[c1];
c6d234
 			    unsigned int strcnt;
c6d234
 # else
c6d234
@@ -515,7 +515,7 @@ FCT (pattern, string, string_end, no_leading_period, flags, ends, alloca_used)
c6d234
 			    int32_t second;
c6d234
 			    int32_t hash;
c6d234
 
c6d234
-# ifdef WIDE_CHAR_VERSION
c6d234
+# if WIDE_CHAR_VERSION
c6d234
 			    /* We have to convert the name to a single-byte
c6d234
 			       string.  This is possible since the names
c6d234
 			       consist of ASCII characters and the internal
c6d234
@@ -570,7 +570,7 @@ FCT (pattern, string, string_end, no_leading_period, flags, ends, alloca_used)
c6d234
 			      {
c6d234
 				/* Compare the byte sequence but only if
c6d234
 				   this is not part of a range.  */
c6d234
-# ifdef WIDE_CHAR_VERSION
c6d234
+# if WIDE_CHAR_VERSION
c6d234
 				int32_t *wextra;
c6d234
 
c6d234
 				idx += 1 + extra[idx];
c6d234
@@ -582,7 +582,7 @@ FCT (pattern, string, string_end, no_leading_period, flags, ends, alloca_used)
c6d234
 
c6d234
 				if (! is_range)
c6d234
 				  {
c6d234
-# ifdef WIDE_CHAR_VERSION
c6d234
+# if WIDE_CHAR_VERSION
c6d234
 				    for (c1 = 0;
c6d234
 					 (int32_t) c1 < wextra[idx];
c6d234
 					 ++c1)
c6d234
@@ -603,7 +603,7 @@ FCT (pattern, string, string_end, no_leading_period, flags, ends, alloca_used)
c6d234
 
c6d234
 				/* Get the collation sequence value.  */
c6d234
 				is_seqval = 1;
c6d234
-# ifdef WIDE_CHAR_VERSION
c6d234
+# if WIDE_CHAR_VERSION
c6d234
 				cold = wextra[1 + wextra[idx]];
c6d234
 # else
c6d234
 				/* Adjust for the alignment.  */
c6d234
@@ -666,7 +666,7 @@ FCT (pattern, string, string_end, no_leading_period, flags, ends, alloca_used)
c6d234
 			uint32_t lcollseq;
c6d234
 			UCHAR cend = *p++;
c6d234
 
c6d234
-# ifdef WIDE_CHAR_VERSION
c6d234
+# if WIDE_CHAR_VERSION
c6d234
 			/* Search in the `names' array for the characters.  */
c6d234
 			fcollseq = __collseq_table_lookup (collseq, fn);
c6d234
 			if (fcollseq == ~((uint32_t) 0))
c6d234
@@ -721,7 +721,7 @@ FCT (pattern, string, string_end, no_leading_period, flags, ends, alloca_used)
c6d234
 			      {
c6d234
 				int32_t table_size;
c6d234
 				const int32_t *symb_table;
c6d234
-# ifdef WIDE_CHAR_VERSION
c6d234
+# if WIDE_CHAR_VERSION
c6d234
 				char str[c1];
c6d234
 				unsigned int strcnt;
c6d234
 # else
c6d234
@@ -733,7 +733,7 @@ FCT (pattern, string, string_end, no_leading_period, flags, ends, alloca_used)
c6d234
 				int32_t second;
c6d234
 				int32_t hash;
c6d234
 
c6d234
-# ifdef WIDE_CHAR_VERSION
c6d234
+# if WIDE_CHAR_VERSION
c6d234
 				/* We have to convert the name to a single-byte
c6d234
 				   string.  This is possible since the names
c6d234
 				   consist of ASCII characters and the internal
c6d234
@@ -788,7 +788,7 @@ FCT (pattern, string, string_end, no_leading_period, flags, ends, alloca_used)
c6d234
 				  {
c6d234
 				    /* Compare the byte sequence but only if
c6d234
 				       this is not part of a range.  */
c6d234
-# ifdef WIDE_CHAR_VERSION
c6d234
+# if WIDE_CHAR_VERSION
c6d234
 				    int32_t *wextra;
c6d234
 
c6d234
 				    idx += 1 + extra[idx];
c6d234
@@ -799,7 +799,7 @@ FCT (pattern, string, string_end, no_leading_period, flags, ends, alloca_used)
c6d234
 # endif
c6d234
 				    /* Get the collation sequence value.  */
c6d234
 				    is_seqval = 1;
c6d234
-# ifdef WIDE_CHAR_VERSION
c6d234
+# if WIDE_CHAR_VERSION
c6d234
 				    cend = wextra[1 + wextra[idx]];
c6d234
 # else
c6d234
 				    /* Adjust for the alignment.  */
c6d234
@@ -831,7 +831,7 @@ FCT (pattern, string, string_end, no_leading_period, flags, ends, alloca_used)
c6d234
 			   characters which are not mentioned in the
c6d234
 			   collation specification.  */
c6d234
 			if (
c6d234
-# ifdef WIDE_CHAR_VERSION
c6d234
+# if WIDE_CHAR_VERSION
c6d234
 			    lcollseq == 0xffffffff ||
c6d234
 # endif
c6d234
 			    lcollseq <= fcollseq)
c6d234
@@ -843,7 +843,7 @@ FCT (pattern, string, string_end, no_leading_period, flags, ends, alloca_used)
c6d234
 			      hcollseq = cend;
c6d234
 			    else
c6d234
 			      {
c6d234
-# ifdef WIDE_CHAR_VERSION
c6d234
+# if WIDE_CHAR_VERSION
c6d234
 				hcollseq =
c6d234
 				  __collseq_table_lookup (collseq, cend);
c6d234
 				if (hcollseq == ~((uint32_t) 0))
c6d234
@@ -864,7 +864,7 @@ FCT (pattern, string, string_end, no_leading_period, flags, ends, alloca_used)
c6d234
 			    if (lcollseq <= hcollseq && fcollseq <= hcollseq)
c6d234
 			      goto matched;
c6d234
 			  }
c6d234
-# ifdef WIDE_CHAR_VERSION
c6d234
+# if WIDE_CHAR_VERSION
c6d234
 		      range_not_matched:
c6d234
 # endif
c6d234
 #else
c6d234
@@ -1279,3 +1279,4 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
c6d234
 #undef STRCAT
c6d234
 #undef L
c6d234
 #undef BTOWC
c6d234
+#undef WIDE_CHAR_VERSION