opennurbs_zlib.h
1 /* $NoKeywords: $ */
2 /*
3 //
4 // Copyright (c) 1993-2012 Robert McNeel & Associates. All rights reserved.
5 // OpenNURBS, Rhinoceros, and Rhino3D are registered trademarks of Robert
6 // McNeel & Associates.
7 //
8 // THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
9 // ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF
10 // MERCHANTABILITY ARE HEREBY DISCLAIMED.
11 //
12 // For complete openNURBS copyright information see <http://www.opennurbs.org>.
13 //
14 ////////////////////////////////////////////////////////////////
15 */
16 
17 #if !defined(OPENNURBS_ZLIB_INC_)
18 #define OPENNURBS_ZLIB_INC_
19 
20 // If you are using opennurbs as a statically linked library, then
21 // you may make calls to the same zlib that opennurbs uses. This
22 // zlib is compiled with z_ symbol projectection. All the necessary
23 // header files are included by opennurbs.h.
24 //
25 // If you are using opennurbs as a DLL or writing a Rhino plug-in
26 // and you want to use the same zlib that opennurbs uses, then
27 // compile opennurbs_zlib_memory.cpp into your application
28 // and statically link with the zlib library. All the necessary
29 // header files are included by opennurbs.h.
30 
31 
32 #if !defined(Z_PREFIX)
33 /* decorates zlib functions with a "z_" prefix to prevent symbol collision. */
34 #define Z_PREFIX
35 #endif
36 
37 #if !defined(MY_ZCALLOC)
38 /* have zlib use oncalloc() and onfree() for memory managment*/
39 #define MY_ZCALLOC
40 #endif
41 
42 #pragma ON_PRAGMA_WARNING_BEFORE_DIRTY_INCLUDE
43 #include "./zlib/zlib.h"
44 #pragma ON_PRAGMA_WARNING_AFTER_DIRTY_INCLUDE
45 
46 ON_BEGIN_EXTERNC
47 voidpf zcalloc(voidpf, unsigned, unsigned);
48 void zcfree(voidpf, voidpf);
49 ON_END_EXTERNC
50 
51 #endif