1 |
commit: 8aa9e957f008d673188d8fedaa9851f467b4f9e7 |
2 |
Author: Chris Kerr <debdepba <AT> dasganma <DOT> tk> |
3 |
AuthorDate: Thu Jan 29 13:29:42 2015 +0000 |
4 |
Commit: Christoph Junghans <ottxor <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 29 14:27:42 2015 +0000 |
6 |
URL: http://sources.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=8aa9e957 |
7 |
|
8 |
Improved the minigzip patch after tracking down what OF() does |
9 |
|
10 |
--- |
11 |
.../mantid/files/mantid-3.3.0-minigzip-OF.patch | 12 +++++++++--- |
12 |
1 file changed, 9 insertions(+), 3 deletions(-) |
13 |
|
14 |
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 |
15 |
index 1dc5ec7..6067ad7 100644 |
16 |
--- a/sci-visualization/mantid/files/mantid-3.3.0-minigzip-OF.patch |
17 |
+++ b/sci-visualization/mantid/files/mantid-3.3.0-minigzip-OF.patch |
18 |
@@ -1,6 +1,7 @@ |
19 |
The minigzip code does the same thing as sys-libs/zlib[minizip] but for .gz files rather than .zip |
20 |
|
21 |
-It uses a macro 'OF(args)'. I'm not sure what it does but defining it as nothing seems to work. |
22 |
+It uses a macro 'OF(args)' - this seems to be for compatibility with old C compilers. |
23 |
+It is declared in zconf.h but newer versions of zlib use _Z_OF instead. |
24 |
|
25 |
This patch has been submitted upstream at: |
26 |
https://github.com/mantidproject/mantid/pull/149 |
27 |
@@ -9,12 +10,17 @@ diff --git a/MantidPlot/src/zlib123/minigzip.c b/MantidPlot/src/zlib123/minigzip |
28 |
index 97fbae1..5f4612f 100644 |
29 |
--- a/MantidPlot/src/zlib123/minigzip.c |
30 |
+++ b/MantidPlot/src/zlib123/minigzip.c |
31 |
-@@ -50,6 +50,10 @@ |
32 |
+@@ -50,6 +50,15 @@ |
33 |
# include <unix.h> /* for fileno */ |
34 |
#endif |
35 |
|
36 |
++/* New versions of zlib use _Z_OF rather than OF */ |
37 |
+#ifndef OF |
38 |
-+# define OF(args) args |
39 |
++# ifdef _Z_OF |
40 |
++# define OF _Z_OF |
41 |
++# else |
42 |
++# define OF(args) args |
43 |
++# endif |
44 |
+#endif |
45 |
+ |
46 |
#ifndef WIN32 /* unlink already in stdio.h for WIN32 */ |