arrfab / rpms / glibc

Forked from rpms/glibc 5 years ago
Clone

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

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