commit:     8aa9e957f008d673188d8fedaa9851f467b4f9e7
Author:     Chris Kerr <debdepba <AT> dasganma <DOT> tk>
AuthorDate: Thu Jan 29 13:29:42 2015 +0000
Commit:     Christoph Junghans <ottxor <AT> gentoo <DOT> org>
CommitDate: Thu Jan 29 14:27:42 2015 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=8aa9e957

Improved the minigzip patch after tracking down what OF() does

---
 .../mantid/files/mantid-3.3.0-minigzip-OF.patch              | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/sci-visualization/mantid/files/mantid-3.3.0-minigzip-OF.patch 
b/sci-visualization/mantid/files/mantid-3.3.0-minigzip-OF.patch
index 1dc5ec7..6067ad7 100644
--- a/sci-visualization/mantid/files/mantid-3.3.0-minigzip-OF.patch
+++ b/sci-visualization/mantid/files/mantid-3.3.0-minigzip-OF.patch
@@ -1,6 +1,7 @@
 The minigzip code does the same thing as sys-libs/zlib[minizip] but for .gz 
files rather than .zip
 
-It uses a macro 'OF(args)'. I'm not sure what it does but defining it as 
nothing seems to work.
+It uses a macro 'OF(args)' - this seems to be for compatibility with old C 
compilers.
+It is declared in zconf.h but newer versions of zlib use _Z_OF instead.
 
 This patch has been submitted upstream at:
 https://github.com/mantidproject/mantid/pull/149
@@ -9,12 +10,17 @@ diff --git a/MantidPlot/src/zlib123/minigzip.c 
b/MantidPlot/src/zlib123/minigzip
 index 97fbae1..5f4612f 100644
 --- a/MantidPlot/src/zlib123/minigzip.c
 +++ b/MantidPlot/src/zlib123/minigzip.c
-@@ -50,6 +50,10 @@
+@@ -50,6 +50,15 @@
  #  include <unix.h> /* for fileno */
  #endif
  
++/* New versions of zlib use _Z_OF rather than OF */
 +#ifndef OF
-+#  define OF(args) args
++#  ifdef _Z_OF
++#    define OF _Z_OF
++#  else
++#    define OF(args) args
++#  endif
 +#endif
 +
  #ifndef WIN32 /* unlink already in stdio.h for WIN32 */

Reply via email to