OpenSDE Packages Database (without history before r20070)
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

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../pixie/pixie-2.2.6-zlib-1.2.5.2.patch
  5. # Copyright (C) 2012 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. Fix build when using zlib >= 1.2.5.2
  17. original patch taken from gentoo linux
  18. http://bugs.gentoo.org/406899
  19. --- a/src/ri/rib.l
  20. +++ b/src/ri/rib.l
  21. @@ -17,7 +17,7 @@
  22. // Overwrite the YYinput so that it uses libz
  23. #undef YY_INPUT
  24. -#define YY_INPUT(buf, retval, maxlen) if ( (retval = gzread(ribin,buf,maxlen)) < 0) \
  25. +#define YY_INPUT(buf, retval, maxlen) if ( (retval = gzread((gzFile)ribin,buf,maxlen)) < 0) \
  26. YY_FATAL_ERROR( "input in flex scanner failed" );
  27. #endif
  28. @@ -223,7 +223,7 @@
  29. TRibFile *nextFile = ribStack->next;
  30. rib_delete_buffer( YY_CURRENT_BUFFER );
  31. #ifdef HAVE_ZLIB
  32. - gzclose(ribin);
  33. + gzclose((gzFile)ribin);
  34. #else
  35. fclose(ribin);
  36. #endif
  37. @@ -243,7 +243,7 @@
  38. rib_delete_buffer( YY_CURRENT_BUFFER );
  39. #ifdef HAVE_ZLIB
  40. - gzclose(ribin);
  41. + gzclose((gzFile)ribin);
  42. #else
  43. fclose(ribin);
  44. #endif
  45. --- a/src/ri/ribOut.cpp
  46. +++ b/src/ri/ribOut.cpp
  47. @@ -162,7 +162,7 @@
  48. #ifdef HAVE_ZLIB
  49. if (outputCompressed) {
  50. - gzclose(outFile);
  51. + gzclose((gzFile)outFile);
  52. } else {
  53. fclose(outFile);
  54. }
  55. --- a/src/ri/ribOut.h
  56. +++ b/src/ri/ribOut.h
  57. @@ -237,7 +237,7 @@
  58. const int l = vsprintf(scratch,mes,args);
  59. #ifdef HAVE_ZLIB
  60. - if (outputCompressed) gzwrite(outFile,scratch,l);
  61. + if (outputCompressed) gzwrite((gzFile)outFile,scratch,l);
  62. else fwrite(scratch,1,l,outFile);
  63. #else
  64. fwrite(scratch,1,l,outFile);
  65. @@ -258,7 +258,7 @@
  66. const int l = vsprintf(scratch,mes,args);
  67. #ifdef HAVE_ZLIB
  68. - if (outputCompressed) gzwrite(outFile,scratch,l);
  69. + if (outputCompressed) gzwrite((gzFile)outFile,scratch,l);
  70. else fwrite(scratch,1,l,outFile);
  71. #else
  72. fwrite(scratch,1,l,outFile);
  73. --- a/src/ri/rib.y
  74. +++ b/src/ri/rib.y
  75. @@ -2940,7 +2940,7 @@
  76. if (ribin != NULL) {
  77. #ifdef HAVE_ZLIB
  78. - gzclose(ribin);
  79. + gzclose((gzFile)ribin);
  80. #else
  81. fclose(ribin);
  82. #endif