You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
93 lines
2.8 KiB
93 lines
2.8 KiB
# --- SDE-COPYRIGHT-NOTE-BEGIN --- |
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|
# |
|
# Filename: package/.../pixie/pixie-2.2.6-zlib-1.2.5.2.patch |
|
# Copyright (C) 2012 The OpenSDE Project |
|
# |
|
# More information can be found in the files COPYING and README. |
|
# |
|
# This patch file is dual-licensed. It is available under the license the |
|
# patched project is licensed under, as long as it is an OpenSource license |
|
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms |
|
# of the GNU General Public License as published by the Free Software |
|
# Foundation; either version 2 of the License, or (at your option) any later |
|
# version. |
|
# --- SDE-COPYRIGHT-NOTE-END --- |
|
|
|
Fix build when using zlib >= 1.2.5.2 |
|
|
|
original patch taken from gentoo linux |
|
|
|
http://bugs.gentoo.org/406899 |
|
|
|
--- a/src/ri/rib.l |
|
+++ b/src/ri/rib.l |
|
@@ -17,7 +17,7 @@ |
|
|
|
// Overwrite the YYinput so that it uses libz |
|
#undef YY_INPUT |
|
-#define YY_INPUT(buf, retval, maxlen) if ( (retval = gzread(ribin,buf,maxlen)) < 0) \ |
|
+#define YY_INPUT(buf, retval, maxlen) if ( (retval = gzread((gzFile)ribin,buf,maxlen)) < 0) \ |
|
YY_FATAL_ERROR( "input in flex scanner failed" ); |
|
|
|
#endif |
|
@@ -223,7 +223,7 @@ |
|
TRibFile *nextFile = ribStack->next; |
|
rib_delete_buffer( YY_CURRENT_BUFFER ); |
|
#ifdef HAVE_ZLIB |
|
- gzclose(ribin); |
|
+ gzclose((gzFile)ribin); |
|
#else |
|
fclose(ribin); |
|
#endif |
|
@@ -243,7 +243,7 @@ |
|
rib_delete_buffer( YY_CURRENT_BUFFER ); |
|
|
|
#ifdef HAVE_ZLIB |
|
- gzclose(ribin); |
|
+ gzclose((gzFile)ribin); |
|
#else |
|
fclose(ribin); |
|
#endif |
|
--- a/src/ri/ribOut.cpp |
|
+++ b/src/ri/ribOut.cpp |
|
@@ -162,7 +162,7 @@ |
|
|
|
#ifdef HAVE_ZLIB |
|
if (outputCompressed) { |
|
- gzclose(outFile); |
|
+ gzclose((gzFile)outFile); |
|
} else { |
|
fclose(outFile); |
|
} |
|
--- a/src/ri/ribOut.h |
|
+++ b/src/ri/ribOut.h |
|
@@ -237,7 +237,7 @@ |
|
const int l = vsprintf(scratch,mes,args); |
|
|
|
#ifdef HAVE_ZLIB |
|
- if (outputCompressed) gzwrite(outFile,scratch,l); |
|
+ if (outputCompressed) gzwrite((gzFile)outFile,scratch,l); |
|
else fwrite(scratch,1,l,outFile); |
|
#else |
|
fwrite(scratch,1,l,outFile); |
|
@@ -258,7 +258,7 @@ |
|
const int l = vsprintf(scratch,mes,args); |
|
|
|
#ifdef HAVE_ZLIB |
|
- if (outputCompressed) gzwrite(outFile,scratch,l); |
|
+ if (outputCompressed) gzwrite((gzFile)outFile,scratch,l); |
|
else fwrite(scratch,1,l,outFile); |
|
#else |
|
fwrite(scratch,1,l,outFile); |
|
--- a/src/ri/rib.y |
|
+++ b/src/ri/rib.y |
|
@@ -2940,7 +2940,7 @@ |
|
|
|
if (ribin != NULL) { |
|
#ifdef HAVE_ZLIB |
|
- gzclose(ribin); |
|
+ gzclose((gzFile)ribin); |
|
#else |
|
fclose(ribin); |
|
#endif
|
|
|