[csw-devel] SF.net SVN: gar:[7580] csw/mgar/pkg/libxml2/trunk

bdwalton at users.sourceforge.net bdwalton at users.sourceforge.net
Tue Dec 8 02:05:35 CET 2009


Revision: 7580
          http://gar.svn.sourceforge.net/gar/?rev=7580&view=rev
Author:   bdwalton
Date:     2009-12-08 01:05:35 +0000 (Tue, 08 Dec 2009)

Log Message:
-----------
libxml2: further patch cleanup

Modified Paths:
--------------
    csw/mgar/pkg/libxml2/trunk/Makefile
    csw/mgar/pkg/libxml2/trunk/checksums

Added Paths:
-----------
    csw/mgar/pkg/libxml2/trunk/files/0001-relaxng.c-cast-to-allow-compilation-with-sun-studio-.patch

Removed Paths:
-------------
    csw/mgar/pkg/libxml2/trunk/files/0001-relaxng.c-add-cast-to-allow-compilation-with-sun-stu.patch

Modified: csw/mgar/pkg/libxml2/trunk/Makefile
===================================================================
--- csw/mgar/pkg/libxml2/trunk/Makefile	2009-12-07 23:25:16 UTC (rev 7579)
+++ csw/mgar/pkg/libxml2/trunk/Makefile	2009-12-08 01:05:35 UTC (rev 7580)
@@ -10,7 +10,7 @@
 MASTER_SITES = ftp://xmlsoft.org/libxml2/
 DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz
 PATCHFILES = ld-symbol-handling-fixup.patch
-PATCHFILES += 0001-relaxng.c-add-cast-to-allow-compilation-with-sun-stu.patch
+PATCHFILES += 0001-relaxng.c-cast-to-allow-compilation-with-sun-studio-.patch
 
 # We define upstream file regex so we can be notifed of new upstream software release
 UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz

Modified: csw/mgar/pkg/libxml2/trunk/checksums
===================================================================
--- csw/mgar/pkg/libxml2/trunk/checksums	2009-12-07 23:25:16 UTC (rev 7579)
+++ csw/mgar/pkg/libxml2/trunk/checksums	2009-12-08 01:05:35 UTC (rev 7580)
@@ -1,3 +1,3 @@
-238e60413c73cb046ac5ee90dac8c848  0001-relaxng.c-add-cast-to-allow-compilation-with-sun-stu.patch
+288c7d9bbe8b1a28eab9421493f1186a  0001-relaxng.c-cast-to-allow-compilation-with-sun-studio-.patch
 5e371e0f0921fc7b366c34aded6ae993  ld-symbol-handling-fixup.patch
 7740a8ec23878a2f50120e1faa2730f2  libxml2-2.7.6.tar.gz

Deleted: csw/mgar/pkg/libxml2/trunk/files/0001-relaxng.c-add-cast-to-allow-compilation-with-sun-stu.patch
===================================================================
--- csw/mgar/pkg/libxml2/trunk/files/0001-relaxng.c-add-cast-to-allow-compilation-with-sun-stu.patch	2009-12-07 23:25:16 UTC (rev 7579)
+++ csw/mgar/pkg/libxml2/trunk/files/0001-relaxng.c-add-cast-to-allow-compilation-with-sun-stu.patch	2009-12-08 01:05:35 UTC (rev 7580)
@@ -1,45 +0,0 @@
-From e7372dda4881e8421b55b80f556f62ec977bfe0f Mon Sep 17 00:00:00 2001
-From: Ben Walton <bwalton at artsci.utoronto.ca>
-Date: Sat, 5 Dec 2009 13:32:49 -0500
-Subject: [PATCH] relaxng.c: add cast to allow compilation with sun studio 11
-
-Sun Studio 11 was failing to compile relaxng.c due to a type mismatch
-when calling xmlRngPErr.  The issue was caused by a type mismatch with
-in the outcomes of a ternary operation ("nothing" vs node->name).
-Cast the string literal to const xmlChar * so that both outcomes are
-of the same type and compatible with the xmlRngPErr function prototype.
-
-Cleanup another warning by casting a string literal to const unsigned
-char *.
-
-Signed-off-by: Ben Walton <bwalton at artsci.utoronto.ca>
----
- relaxng.c |    5 +++--
- 1 files changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/relaxng.c b/relaxng.c
-index 075fc4a..e78fa18 100644
---- a/relaxng.c
-+++ b/relaxng.c
-@@ -5369,7 +5369,8 @@ xmlRelaxNGParseNameClass(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node,
-     } else {
-         xmlRngPErr(ctxt, node, XML_RNGP_CHOICE_CONTENT,
-                    "expecting name, anyName, nsName or choice : got %s\n",
--                   (node == NULL ? "nothing" : node->name), NULL);
-+                   (node == NULL ? (const xmlChar *) "nothing" : node->name),
-+		   NULL);
-         return (NULL);
-     }
-     if (ret != def) {
-@@ -9459,7 +9460,7 @@ xmlRelaxNGValidateInterleave(xmlRelaxNGValidCtxtPtr ctxt,
-             ctxt->states = NULL;
-             if (found == 0) {
-                 if (cur == NULL) {
--                    VALID_ERR2(XML_RELAXNG_ERR_INTEREXTRA, "noname");
-+		    VALID_ERR2(XML_RELAXNG_ERR_INTEREXTRA, (const unsigned char *) "noname");
-                 } else {
-                     VALID_ERR2(XML_RELAXNG_ERR_INTEREXTRA, cur->name);
-                 }
--- 
-1.6.5.3
-

Added: csw/mgar/pkg/libxml2/trunk/files/0001-relaxng.c-cast-to-allow-compilation-with-sun-studio-.patch
===================================================================
--- csw/mgar/pkg/libxml2/trunk/files/0001-relaxng.c-cast-to-allow-compilation-with-sun-studio-.patch	                        (rev 0)
+++ csw/mgar/pkg/libxml2/trunk/files/0001-relaxng.c-cast-to-allow-compilation-with-sun-studio-.patch	2009-12-08 01:05:35 UTC (rev 7580)
@@ -0,0 +1,47 @@
+From f2cee2dd783b6c71ea3d98ab9701b9b397753f0a Mon Sep 17 00:00:00 2001
+From: Ben Walton <bwalton at artsci.utoronto.ca>
+Date: Sat, 5 Dec 2009 13:32:49 -0500
+Subject: [PATCH] relaxng.c: cast to allow compilation with sun studio 11
+
+Sun Studio 11 was failing to compile relaxng.c due to a type mismatch
+in a ternary operator used to provide an argument to xmlRngPErr.  It
+seems that sos11 cc is more pedantic about this part of the C99
+standard.  GCC issues a warning but doesn't fail by default.
+
+After casting the string literal "nothing" to (const xmlChar *) sos11
+cc is happy.  GCC no longer issues a warning either.
+
+Another warning was cleaned up with an identical cast.
+
+Signed-off-by: Ben Walton <bwalton at artsci.utoronto.ca>
+---
+ relaxng.c |    6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/relaxng.c b/relaxng.c
+index 075fc4a..6dbc499 100644
+--- a/relaxng.c
++++ b/relaxng.c
+@@ -5369,7 +5369,8 @@ xmlRelaxNGParseNameClass(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node,
+     } else {
+         xmlRngPErr(ctxt, node, XML_RNGP_CHOICE_CONTENT,
+                    "expecting name, anyName, nsName or choice : got %s\n",
+-                   (node == NULL ? "nothing" : node->name), NULL);
++                   (node == NULL ? (const xmlChar *) "nothing" : node->name),
++		   NULL);
+         return (NULL);
+     }
+     if (ret != def) {
+@@ -9459,7 +9460,8 @@ xmlRelaxNGValidateInterleave(xmlRelaxNGValidCtxtPtr ctxt,
+             ctxt->states = NULL;
+             if (found == 0) {
+                 if (cur == NULL) {
+-                    VALID_ERR2(XML_RELAXNG_ERR_INTEREXTRA, "noname");
++		    VALID_ERR2(XML_RELAXNG_ERR_INTEREXTRA,
++			       (const xmlChar *) "noname");
+                 } else {
+                     VALID_ERR2(XML_RELAXNG_ERR_INTEREXTRA, cur->name);
+                 }
+-- 
+1.6.5.3
+


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list