22928059 xmlto uses poor variable name
authorJohn Beck <John.Beck@Oracle.COM>
Mon, 14 Mar 2016 15:30:47 -0700
changeset 5600 55d0d4d6900a
parent 5599 507d1efef52b
child 5601 848c42f0ddc1
22928059 xmlto uses poor variable name
components/xmlto/patches/fix-val.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/xmlto/patches/fix-val.patch	Mon Mar 14 15:30:47 2016 -0700
@@ -0,0 +1,43 @@
+This patch uses a "belt & suspenders" approach: either the inclusion of
+<sys/types.h> before the define, or changing the variable name is sufficient,
+but both are used out of precaution.  The patch was developed in-house;
+the changing of the variable name part has been fed upstream and will be
+included in the next version.
+
+--- xmlto-0.0.28/xmlif/xmlif.c.~1~	2015-11-10 04:05:27.000000000 -0800
++++ xmlto-0.0.28/xmlif/xmlif.c	2016-03-14 13:33:03.905766962 -0700
+@@ -20,6 +20,7 @@
+ #include <string.h>
+ #include <errno.h>
+ #include <stdlib.h>
++#include <sys/types.h>
+ 
+ /* end standard C headers. */
+ 
+@@ -1306,7 +1307,7 @@
+ 
+ #define INITIAL 0
+ #define attrib 1
+-#define val 2
++#define xmlif_val 2
+ 
+ #ifndef YY_NO_UNISTD_H
+ /* Special case for "unistd.h", since it is non-ANSI. We include it way
+@@ -1594,7 +1595,7 @@
+ case 8:
+ YY_RULE_SETUP
+ #line 217 "xmlif/xmlif.l"
+-{BEGIN(val);}
++{BEGIN(xmlif_val);}
+ 	YY_BREAK
+ case 9:
+ YY_RULE_SETUP
+@@ -1636,7 +1637,7 @@
+ #line 1637 "xmlif/xmlif.c"
+ case YY_STATE_EOF(INITIAL):
+ case YY_STATE_EOF(attrib):
+-case YY_STATE_EOF(val):
++case YY_STATE_EOF(xmlif_val):
+ 	yyterminate();
+ 
+ 	case YY_END_OF_BUFFER: