added my Recipes
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
From 25451c0a56ef8d3b32fd23847bef516486bd8ed4 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Mon, 16 Jan 2023 18:50:10 -0800
|
||||
Subject: [PATCH] libxml-mm: Fix function prototypes in function pointers
|
||||
|
||||
This is now detected with latest clang16+
|
||||
|
||||
Fixes
|
||||
error: incompatible function pointer types passing 'void (void *, void *, xmlChar *)' (aka 'void (void *, void *, unsigned char *)') to parameter of type 'xmlHashScanner' (aka 'void (*)(void *, void *, const unsigned char *)') [-Wincompatible-function-pointer-types]
|
||||
xmlHashScan(r, PmmRegistryDumpHashScanner, NULL);
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/shlomif/perl-XML-LibXML/pull/75]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
perl-libxml-mm.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/perl-libxml-mm.c b/perl-libxml-mm.c
|
||||
index a3e78a2..ec2b5ea 100644
|
||||
--- a/perl-libxml-mm.c
|
||||
+++ b/perl-libxml-mm.c
|
||||
@@ -121,7 +121,7 @@ PmmFreeHashTable(xmlHashTablePtr table)
|
||||
extern SV* PROXY_NODE_REGISTRY_MUTEX;
|
||||
|
||||
/* Utility method used by PmmDumpRegistry */
|
||||
-void PmmRegistryDumpHashScanner(void * payload, void * data, xmlChar * name)
|
||||
+void PmmRegistryDumpHashScanner(void * payload, void * data, const xmlChar * name)
|
||||
{
|
||||
LocalProxyNodePtr lp = (LocalProxyNodePtr) payload;
|
||||
ProxyNodePtr node = (ProxyNodePtr) lp->proxy;
|
||||
@@ -215,7 +215,7 @@ PmmRegisterProxyNode(ProxyNodePtr proxy)
|
||||
/* PP: originally this was static inline void, but on AIX the compiler
|
||||
did not chew it, so I'm removing the inline */
|
||||
static void
|
||||
-PmmRegistryHashDeallocator(void *payload, xmlChar *name)
|
||||
+PmmRegistryHashDeallocator(void *payload, const xmlChar *name)
|
||||
{
|
||||
Safefree((LocalProxyNodePtr) payload);
|
||||
}
|
||||
@@ -279,7 +279,7 @@ PmmRegistryREFCNT_dec(ProxyNodePtr proxy)
|
||||
* internal, used by PmmCloneProxyNodes
|
||||
*/
|
||||
void *
|
||||
-PmmRegistryHashCopier(void *payload, xmlChar *name)
|
||||
+PmmRegistryHashCopier(void *payload, const xmlChar *name)
|
||||
{
|
||||
ProxyNodePtr proxy = ((LocalProxyNodePtr) payload)->proxy;
|
||||
LocalProxyNodePtr lp;
|
||||
--
|
||||
2.39.0
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
Do not use the _libxml_check_lib() on cross-compile
|
||||
|
||||
Upstream-Status: Inappropriate [configuration]
|
||||
|
||||
xml2 have been added into package's DEPENDS, so not need to use the
|
||||
_libxml_check_lib() to check it again, and _libxml_check_lib() always
|
||||
return false on cross-compile environment
|
||||
|
||||
Signed-off-by: Roy Li <rongqing.li@windriver.com>
|
||||
---
|
||||
Makefile.PL | 52 ++++++++++++++++++++++++++--------------------------
|
||||
1 file changed, 26 insertions(+), 26 deletions(-)
|
||||
|
||||
diff --git a/Makefile.PL b/Makefile.PL
|
||||
index c0485f1..09c676b 100644
|
||||
--- a/Makefile.PL
|
||||
+++ b/Makefile.PL
|
||||
@@ -411,32 +411,32 @@ sub _libxml_check_lib {
|
||||
}
|
||||
}
|
||||
|
||||
-print "Checking for ability to link against xml2...";
|
||||
-if ( _libxml_check_lib('xml2') ) {
|
||||
- print "yes\n";
|
||||
-}
|
||||
-else {
|
||||
- print "no\n";
|
||||
- print "Checking for ability to link against libxml2...";
|
||||
- if ( _libxml_check_lib('libxml2')) {
|
||||
- print "yes\n";
|
||||
- }
|
||||
- else {
|
||||
- print STDERR <<"DEATH";
|
||||
-libxml2, zlib, and/or the Math library (-lm) have not been found.
|
||||
-Try setting LIBS and INC values on the command line
|
||||
-Or get libxml2 from
|
||||
- http://xmlsoft.org/
|
||||
-If you install via RPMs, make sure you also install the -devel
|
||||
-RPMs, as this is where the headers (.h files) are.
|
||||
-
|
||||
-Also, you may try to run perl Makefile.PL with the DEBUG=1 parameter
|
||||
-to see the exact reason why the detection of libxml2 installation
|
||||
-failed or why Makefile.PL was not able to compile a test program.
|
||||
-DEATH
|
||||
- exit 0; # 0 recommended by http://cpantest.grango.org (Notes for CPAN Authors)
|
||||
- }
|
||||
-}
|
||||
+#print "Checking for ability to link against xml2...";
|
||||
+#if ( _libxml_check_lib('xml2') ) {
|
||||
+# print "yes\n";
|
||||
+#}
|
||||
+#else {
|
||||
+# print "no\n";
|
||||
+# print "Checking for ability to link against libxml2...";
|
||||
+# if ( _libxml_check_lib('libxml2')) {
|
||||
+# print "yes\n";
|
||||
+# }
|
||||
+# else {
|
||||
+# print STDERR <<"DEATH";
|
||||
+#libxml2, zlib, and/or the Math library (-lm) have not been found.
|
||||
+#Try setting LIBS and INC values on the command line
|
||||
+#Or get libxml2 from
|
||||
+# http://xmlsoft.org/
|
||||
+#If you install via RPMs, make sure you also install the -devel
|
||||
+#RPMs, as this is where the headers (.h files) are.
|
||||
+#
|
||||
+#Also, you may try to run perl Makefile.PL with the DEBUG=1 parameter
|
||||
+#to see the exact reason why the detection of libxml2 installation
|
||||
+#failed or why Makefile.PL was not able to compile a test program.
|
||||
+#DEATH
|
||||
+# exit 0; # 0 recommended by http://cpantest.grango.org (Notes for CPAN Authors)
|
||||
+# }
|
||||
+#}
|
||||
|
||||
# -------------------------------------------------------------------------- #
|
||||
# _NOW_ write the Makefile
|
||||
--
|
||||
1.7.10.4
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
[PATCH] Fix a compile error
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Fix a compile error by conditional using 'catal' since catal
|
||||
is only defined when LIBXML_CATALOG_ENABLED is enabled.
|
||||
|
||||
Signed-off-by: Roy Li <rongqing.li@windriver.com>
|
||||
---
|
||||
LibXML.xs | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/LibXML.xs b/LibXML.xs
|
||||
index 66da04b..45da681 100644
|
||||
--- a/LibXML.xs
|
||||
+++ b/LibXML.xs
|
||||
@@ -2777,9 +2777,11 @@ _default_catalog( self, catalog )
|
||||
xmlCatalogPtr catal = INT2PTR(xmlCatalogPtr,SvIV(SvRV(catalog)));
|
||||
#endif
|
||||
INIT:
|
||||
+#ifdef LIBXML_CATALOG_ENABLED
|
||||
if ( catal == NULL ) {
|
||||
croak( "empty catalog\n" );
|
||||
}
|
||||
+#endif
|
||||
CODE:
|
||||
warn( "this feature is not implemented" );
|
||||
RETVAL = 0;
|
||||
--
|
||||
1.7.10.4
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
[PATCH] Fix a compile error
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
by conditional using 'XML_DOCB_DOCUMENT_NODE' since it is only
|
||||
defined when LIBXML_DOCB_ENABLED is enabled in xmlversion.h.
|
||||
|
||||
Signed-off-by: Roy Li <rongqing.li@windriver.com>
|
||||
---
|
||||
LibXML.xs | 9 +-
|
||||
dom.c | 2 +
|
||||
perl-libxml-mm.c | 4 +
|
||||
4 files changed, 678 insertions(+), 658 deletions(-)
|
||||
|
||||
diff --git a/LibXML.xs b/LibXML.xs
|
||||
index b299ba4..66da04b 100644
|
||||
--- a/LibXML.xs
|
||||
+++ b/LibXML.xs
|
||||
@@ -5026,7 +5026,9 @@ addChild( self, nNode )
|
||||
XSRETURN_UNDEF;
|
||||
case XML_DOCUMENT_NODE :
|
||||
case XML_HTML_DOCUMENT_NODE :
|
||||
+#ifdef LIBXML_DOCB_ENABLED
|
||||
case XML_DOCB_DOCUMENT_NODE :
|
||||
+#endif
|
||||
croak("addChild: HIERARCHY_REQUEST_ERR\n");
|
||||
XSRETURN_UNDEF;
|
||||
case XML_NOTATION_NODE :
|
||||
@@ -5286,7 +5288,9 @@ _toStringC14N(self, comments=0, xpath=&PL_sv_undef, exclusive=0, inc_prefix_list
|
||||
if ( nodepath == NULL
|
||||
&& self->type != XML_DOCUMENT_NODE
|
||||
&& self->type != XML_HTML_DOCUMENT_NODE
|
||||
+#ifdef LIBXML_DOCB_ENABLED
|
||||
&& self->type != XML_DOCB_DOCUMENT_NODE
|
||||
+#endif
|
||||
) {
|
||||
if (comments)
|
||||
nodepath = xmlStrdup( (const xmlChar *) "(. | .//node() | .//@* | .//namespace::*)" );
|
||||
@@ -5297,7 +5301,10 @@ _toStringC14N(self, comments=0, xpath=&PL_sv_undef, exclusive=0, inc_prefix_list
|
||||
if ( nodepath != NULL ) {
|
||||
if ( self->type == XML_DOCUMENT_NODE
|
||||
|| self->type == XML_HTML_DOCUMENT_NODE
|
||||
- || self->type == XML_DOCB_DOCUMENT_NODE ) {
|
||||
+#ifdef LIBXML_DOCB_ENABLED
|
||||
+ || self->type == XML_DOCB_DOCUMENT_NODE
|
||||
+#endif
|
||||
+ ) {
|
||||
refNode = xmlDocGetRootElement( self->doc );
|
||||
}
|
||||
if (SvOK(xpath_context)) {
|
||||
diff --git a/dom.c b/dom.c
|
||||
index 87eb61d..cbd391b 100644
|
||||
--- a/dom.c
|
||||
+++ b/dom.c
|
||||
@@ -654,7 +654,9 @@ domName(xmlNodePtr node) {
|
||||
|
||||
case XML_DOCUMENT_NODE :
|
||||
case XML_HTML_DOCUMENT_NODE :
|
||||
+#ifdef LIBXML_DOCB_ENABLED
|
||||
case XML_DOCB_DOCUMENT_NODE :
|
||||
+#endif
|
||||
name = (const xmlChar *) "#document";
|
||||
break;
|
||||
|
||||
diff --git a/perl-libxml-mm.c b/perl-libxml-mm.c
|
||||
index d162b06..7ac5436 100644
|
||||
--- a/perl-libxml-mm.c
|
||||
+++ b/perl-libxml-mm.c
|
||||
@@ -331,7 +331,9 @@ PmmNewNode(xmlNodePtr node)
|
||||
switch ( node->type ) {
|
||||
case XML_DOCUMENT_NODE:
|
||||
case XML_HTML_DOCUMENT_NODE:
|
||||
+#ifdef LIBXML_DOCB_ENABLED
|
||||
case XML_DOCB_DOCUMENT_NODE:
|
||||
+#endif
|
||||
proxy = (ProxyNodePtr)xmlMalloc(sizeof(struct _DocProxyNode));
|
||||
if (proxy != NULL) {
|
||||
((DocProxyNodePtr)proxy)->psvi_status = Pmm_NO_PSVI;
|
||||
@@ -550,7 +552,9 @@ PmmNodeToSv( xmlNodePtr node, ProxyNodePtr owner )
|
||||
switch ( node->type ) {
|
||||
case XML_DOCUMENT_NODE:
|
||||
case XML_HTML_DOCUMENT_NODE:
|
||||
+#ifdef LIBXML_DOCB_ENABLED
|
||||
case XML_DOCB_DOCUMENT_NODE:
|
||||
+#endif
|
||||
if ( ((xmlDocPtr)node)->encoding != NULL ) {
|
||||
SetPmmENCODING(dfProxy, (int)xmlParseCharEncoding( (const char*)((xmlDocPtr)node)->encoding ));
|
||||
}
|
||||
--
|
||||
1.7.10.4
|
||||
|
||||
Reference in New Issue
Block a user