[gsoap/el6] Pad non-ipv6 struct gsoap to match ipv6 version

Mattias Ellert ellert at fedoraproject.org
Thu Oct 17 03:53:48 UTC 2013


commit 89f41a931435ec7a6519a7316b3a25d745947b42
Author: Mattias Ellert <mattias.ellert at fysast.uu.se>
Date:   Thu Oct 17 05:35:38 2013 +0200

    Pad non-ipv6 struct gsoap to match ipv6 version

 .gitignore      |    2 +-
 gsoap-pad.patch |   33 +++++++++++++++++++++++++++++++++
 gsoap.spec      |   15 ++++++++++-----
 soapcpp2.1      |    6 +++---
 wsdl2h.1        |   38 +++++++++++++++++++-------------------
 5 files changed, 66 insertions(+), 28 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 32a02bd..20cb71e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-gsoap_2.7.16.zip
+/*.zip
diff --git a/gsoap-pad.patch b/gsoap-pad.patch
new file mode 100644
index 0000000..114800f
--- /dev/null
+++ b/gsoap-pad.patch
@@ -0,0 +1,33 @@
+diff -ur gsoap-2.8.orig/gsoap/samples/calc_vs2005/calc_vs2005/stdsoap2.h gsoap-2.8/gsoap/samples/calc_vs2005/calc_vs2005/stdsoap2.h
+--- gsoap-2.8.orig/gsoap/samples/calc_vs2005/calc_vs2005/stdsoap2.h	2013-08-26 01:10:06.000000000 +0200
++++ gsoap-2.8/gsoap/samples/calc_vs2005/calc_vs2005/stdsoap2.h	2013-10-16 09:29:02.181454071 +0200
+@@ -2130,6 +2130,7 @@
+   struct sockaddr_storage peer;	/* IPv6: set by soap_accept and by UDP recv */
+ #else
+   struct sockaddr_in peer;	/* IPv4: set by soap_connect/soap_accept and by UDP recv */
++  unsigned char pad[sizeof(struct sockaddr_storage) - sizeof(struct sockaddr_in)];
+ #endif
+ #endif
+   size_t peerlen;
+diff -ur gsoap-2.8.orig/gsoap/stdsoap2.h gsoap-2.8/gsoap/stdsoap2.h
+--- gsoap-2.8.orig/gsoap/stdsoap2.h	2013-08-26 01:10:07.000000000 +0200
++++ gsoap-2.8/gsoap/stdsoap2.h	2013-10-16 09:29:02.181454071 +0200
+@@ -2130,6 +2130,7 @@
+   struct sockaddr_storage peer;	/* IPv6: set by soap_accept and by UDP recv */
+ #else
+   struct sockaddr_in peer;	/* IPv4: set by soap_connect/soap_accept and by UDP recv */
++  unsigned char pad[sizeof(struct sockaddr_storage) - sizeof(struct sockaddr_in)];
+ #endif
+ #endif
+   size_t peerlen;
+diff -ur gsoap-2.8.orig/gsoap/VisualStudio2005/wsdl2h/wsdl2h/stdsoap2.h gsoap-2.8/gsoap/VisualStudio2005/wsdl2h/wsdl2h/stdsoap2.h
+--- gsoap-2.8.orig/gsoap/VisualStudio2005/wsdl2h/wsdl2h/stdsoap2.h	2013-08-26 01:10:07.000000000 +0200
++++ gsoap-2.8/gsoap/VisualStudio2005/wsdl2h/wsdl2h/stdsoap2.h	2013-10-16 09:29:02.181454071 +0200
+@@ -2130,6 +2130,7 @@
+   struct sockaddr_storage peer;	/* IPv6: set by soap_accept and by UDP recv */
+ #else
+   struct sockaddr_in peer;	/* IPv4: set by soap_connect/soap_accept and by UDP recv */
++  unsigned char pad[sizeof(struct sockaddr_storage) - sizeof(struct sockaddr_in)];
+ #endif
+ #endif
+   size_t peerlen;
diff --git a/gsoap.spec b/gsoap.spec
index 7cf36fe..cacf70f 100644
--- a/gsoap.spec
+++ b/gsoap.spec
@@ -1,17 +1,18 @@
 Summary: Generator Tools for Coding SOAP/XML Web Services in C and C++
 Name: gsoap
 Version: 2.7.16
-Release: 3%{?dist}
+Release: 4%{?dist}
 License: GPLv2+
 Group: Development/Tools
-URL: http://gsoap2.sourceforge.net
-Source0: http://downloads.sourceforge.net/gsoap2/gsoap_2.7.16.zip
+URL: http://gsoap2.sourceforge.net/
+Source0: http://downloads.sourceforge.net/gsoap2/%{name}_%{version}.zip
 Source1: soapcpp2.1
 Source2: wsdl2h.1
 Patch0: %{name}-libtool.patch
 Patch1: %{name}-ipv6.patch
 Patch2: %{name}-iostream.patch
 Patch3: %{name}-openssl.patch
+Patch4: %{name}-pad.patch
 BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 
 BuildRequires: flex
@@ -48,6 +49,7 @@ gSOAP generated stubs
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 
 # XML files non-executable
 find . -name "*.xml" -exec chmod a-x {} \;
@@ -56,8 +58,8 @@ find . -name "*.xml" -exec chmod a-x {} \;
 dos2unix README.txt LICENSE.txt NOTES.txt
 
 # remove .DS_Stores
-rm -rf gsoap/doc/.DS_Store
-rm -rf gsoap/doc/wsse/html/.DS_Store
+rm gsoap/doc/.DS_Store
+rm gsoap/doc/wsse/html/.DS_Store
 
 # remove stuff with gsoap license only - not GPL
 rm -rf gsoap/extras gsoap/mod_gsoap gsoap/Symbian
@@ -248,6 +250,9 @@ make check
 %postun -p /sbin/ldconfig
 
 %changelog
+* Wed Oct 16 2013 Mattias Ellert <mattias.ellert at fysast.uu.se> - 2.7.16-4
+- Pad non-ipv6 struct gsoap to match ipv6 version
+
 * Sun Aug 28 2011 Mattias Ellert <mattias.ellert at fysast.uu.se> - 2.7.16-3
 - Update the IPv6 patch
 - Add manpages from Debian
diff --git a/soapcpp2.1 b/soapcpp2.1
index f324625..052b498 100644
--- a/soapcpp2.1
+++ b/soapcpp2.1
@@ -63,7 +63,7 @@ Generate SOAP RPC encoding style bindings.
 Display help info.
 .TP
 \fB\-i\fR
-Generate service proxies and objects inherited from \fBsoap\fR struct. 
+Generate service proxies and objects inherited from \fBsoap\fR struct.
 .TP
 \fB\-I\fIpath\fR
 use \fIpath\fR(s) for \fB#import\fR.
@@ -75,7 +75,7 @@ Generate linkable modules (experimental).
 Generate Matlab(tm) code for MEX compiler.
 .TP
 \fB\-n\fR
-Use service name to rename service functions and namespace table. 
+Use service name to rename service functions and namespace table.
 .TP
 \fB\-p\fIname\fR
 Save files with new prefix \fIname\fR instead of \fBsoap\fR.
@@ -87,7 +87,7 @@ Use \fIname\fR as the C++ namespace of all declarations.
 Generate deserialization code with strict XML validation checks.
 .TP
 \fB\-t\fR
-Generate code for fully \fBxsi:type\fR typed SOAP/XML messaging. 
+Generate code for fully \fBxsi:type\fR typed SOAP/XML messaging.
 .TP
 \fB\-v\fR
 Display version info.
diff --git a/wsdl2h.1 b/wsdl2h.1
index 7c90254..07de151 100644
--- a/wsdl2h.1
+++ b/wsdl2h.1
@@ -22,15 +22,15 @@ wsdl2h \- the gSOAP WSDL parser for C and C++
 .SH DESCRIPTION
 Please see /usr/share/doc/gsoap/soapdoc2.html for details.
 .PP
-Converts a \fBWSDL\fR or\fBXSD\fR input file, or from an HTTP address,
+Converts a \fBWSDL\fR or \fBXSD\fR input file, or from an HTTP address,
 \fISOURCE\fR to a declaration file that can be parsed by
-\fBsoapcpp2\fR(1).  If no \fISOURCE\fR argument is specified, read
-from standard input. 
+\fBsoapcpp2\fR(1). If no \fISOURCE\fR argument is specified, read
+from standard input.
 .SH OPTIONS
 .TP
 \fB\-a\fR
 Generate indexed struct names for local elements with anonymous
-types. 
+types.
 .TP
 \fB\-c\fR
 Generate C source code.
@@ -40,7 +40,7 @@ Use DOM to populate \fBxs\fR:\fIany\fR, \fBxs\fR:\fIanyType\fR and
 \fBxs\fR:\fIanyAttribute\fR.
 .TP
 \fB\-e\fR
-Don not qualify enum names.
+Do not qualify enum names.
 .TP
 \fB\-f\fR
 Generate flat C++ class hierarchy.
@@ -49,26 +49,26 @@ Generate flat C++ class hierarchy.
 Generate global top-level element declarations.
 .TP
 \fB\-h\fR
-Display help info
+Display help info.
 .TP
 \fB\-I\fIpath\fR
 Use \fIpath\fR to find files.
 .TP
 \fB\-j\fR
-Don not generate \fBSOAP_ENV__Header\fR and \fBSOAP_ENV__Detail\fR
+Do not generate \fBSOAP_ENV__Header\fR and \fBSOAP_ENV__Detail\fR
 definitions.
 .TP
 \fB\-k\fR
-Don not generate \fBSOAP_ENV__Header\fR mustUnderstand qualifiers.
+Do not generate \fBSOAP_ENV__Header\fR mustUnderstand qualifiers.
 .TP
 \fB\-l\fR
 Display license information.
 .TP
 \fB\-m\fR
-Use \fBxsd.h\fR module to import primitive types. 
+Use \fBxsd.h\fR module to import primitive types.
 .TP
 \fB\-n\fIname\fR
-Use \fIname\fR as the base namespace prefix instead of \fBns\fR. 
+Use \fIname\fR as the base namespace prefix instead of \fBns\fR.
 .TP
 \fB\-N\fIname\fR
 Use \fIname\fR as the base namespace prefix for service namespaces.
@@ -78,7 +78,7 @@ Output to file \fIfile\fR.
 .TP
 \fB\-p\fR
 Create polymorphic types with C++ inheritance from base
-\fBxsd__anyType\fR. 
+\fBxsd__anyType\fR.
 .TP
 \fB\-P\fR
 Do not create polymorphic types with C++ inheritance from \fBxsd__anyType\fR.
@@ -90,29 +90,29 @@ Use \fIname\fR for the C++ namespace of all declarations.
 Connect via proxy \fIhost\fR, \fIport\fR and proxy credentials.
 .TP
 \fB\-s\fR
-Don not generate STL code (no \fBstd::string\fR and no
-\fBstd::vector\fR). 
+Do not generate STL code (no \fBstd::string\fR and no
+\fBstd::vector\fR).
 .TP
 \fB\-t\fIfile\fR
 Use type map file \fIfile\fR instead of the default file
-\fBtypemap.dat\fR. 
+\fBtypemap.dat\fR.
 .TP
 \fB\-u\fR
-Don not generate unions.
+Do not generate unions.
 .TP
 \fB\-v\fR
 Verbose output.
 .TP
 \fB\-w\fR
 Always wrap response parameters in a response struct (<=1.1.4
-behaviour). 
+behaviour).
 .TP
 \fB\-x\fR
 Do not generate \fB_XML\fR \fIany\fR/\fIanyAttribute\fR extensibility
-elements. 
+elements.
 .TP
 \fB\-y\fR
-Generate typedef synonyms for structs and enums. 
+Generate typedef synonyms for structs and enums.
 .TP
 \fB\-z1\fR
 Compatibility with 2.7.6e: Generate pointer-based arrays.
@@ -123,7 +123,7 @@ Compatibility with 2.7.15: Qualify element/attribute referenced members.
 \fB\-_\fR
 Do not generate _USCORE (replace with UNICODE _x005f).
 .SH SEE ALSO
-.BR soapcpp2 (1),
+.BR soapcpp2 (1).
 .SH AUTHOR
 This manual page was written by Thomas Wana <greuff at debian.org>,
 for the Debian project (but may be used by others).


More information about the scm-commits mailing list