Skip to content

Commit

Permalink
Don't define Z_PREFIX here - precludes using a system zlib
Browse files Browse the repository at this point in the history
  • Loading branch information
starseeker committed Feb 16, 2024
1 parent 1ce0f10 commit 3697110
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 deletions opennurbs/opennurbs_zlib.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- opennurbs/opennurbs_compress.cpp 2024-02-16 15:09:48.559498749 -0500
+++ OPENNURBS_BLD/opennurbs_compress.cpp 2024-02-16 15:09:21.551948687 -0500
--- opennurbs/opennurbs_compress.cpp 2024-02-16 15:39:23.491884645 -0500
+++ OPENNURBS_BLD/opennurbs_compress.cpp 2024-02-16 15:23:15.326224509 -0500
@@ -128,7 +128,7 @@
// compressed output in m_zlib.strm.next_out[], or do both.

Expand Down Expand Up @@ -82,8 +82,8 @@
if ( zrc < 0 )
{
// Something went haywire - bail out.
--- opennurbs/opennurbs_zlib.cpp 2024-02-16 15:09:48.575498483 -0500
+++ OPENNURBS_BLD/opennurbs_zlib.cpp 2024-02-16 15:10:11.099123079 -0500
--- opennurbs/opennurbs_zlib.cpp 2024-02-16 15:39:23.535883954 -0500
+++ OPENNURBS_BLD/opennurbs_zlib.cpp 2024-02-16 15:23:15.326224509 -0500
@@ -23,6 +23,7 @@

#include "opennurbs_zlib.h"
Expand Down Expand Up @@ -157,9 +157,23 @@
rc = false;
break;
}
--- opennurbs/opennurbs_zlib.h 2024-02-16 15:09:48.575498483 -0500
+++ OPENNURBS_BLD/opennurbs_zlib.h 2024-02-16 15:09:21.551948687 -0500
@@ -37,7 +37,7 @@
--- opennurbs/opennurbs_zlib.h 2024-02-16 15:39:23.535883954 -0500
+++ OPENNURBS_BLD/opennurbs_zlib.h 2024-02-16 15:38:23.556824827 -0500
@@ -25,19 +25,19 @@
// and statically link with the zlib library. All the necessary
// header files are included by opennurbs.h.

-
+#if 0
#if !defined(Z_PREFIX)
/* decorates zlib functions with a "z_" prefix to prevent symbol collision. */
#define Z_PREFIX
#endif
-
+#endif
#if !defined(MY_ZCALLOC)
/* have zlib use oncalloc() and onfree() for memory management*/
#define MY_ZCALLOC
#endif

#pragma ON_PRAGMA_WARNING_BEFORE_DIRTY_INCLUDE
Expand Down

0 comments on commit 3697110

Please sign in to comment.