6 * Copyright (c) 2002-2004 Andreas Kupries <andreas_kupries@users.sourceforge.net>
8 * Zveno Pty Ltd makes this software and associated documentation
9 * available free of charge for any purpose. You may make copies
10 * of the software but you must include all of this notice on any copy.
12 * Zveno Pty Ltd does not warrant that this software is error free
13 * or fit for any purpose. Zveno Pty Ltd disclaims any liability for
14 * all claims, expenses, losses, damages and costs any user may incur
15 * as a result of using, copying or modifying the software.
17 * $Id: zlibtcl.h,v 1.3 2004/08/16 19:23:39 andreas_kupries Exp $
26 #define ZLIBTCL_MAJOR_VERSION 1
27 #define ZLIBTCL_MINOR_VERSION 2
28 #define ZLIBTCL_RELEASE_LEVEL TCL_RELEASE
29 #define ZLIBTCL_RELEASE_SERIAL 1
31 #define ZLIBTCL_VERSION "1.2.1"
32 #define ZLIBTCL_PATCH_LEVEL "1.2.1"
35 * Used to block the rest of this header file from resource compilers so
36 * we can just get the version info.
40 /* TIP 27 update. If CONST84 is not defined we are compiling against a
41 * core before 8.4 and have to disable some CONST'ness.
49 * Fix the Borland bug that's in the EXTERN macro from tcl.h.
54 # if defined(STATIC_BUILD)
57 # elif (defined(__WIN32__) && (defined(_MSC_VER) || (__BORLANDC__ >= 0x0550) || (defined(__GNUC__) && defined(__declspec)))) || (defined(MAC_TCL) && FUNCTION_DECLSPEC)
58 # define DLLIMPORT __declspec(dllimport)
59 # define DLLEXPORT __declspec(dllexport)
60 # elif defined(__BORLANDC__)
62 # define DLLIMPORT __import
63 # define DLLEXPORT __export
68 /* Avoid name mangling from C++ compilers. */
70 # define TCL_EXTRNC extern "C"
72 # define TCL_EXTRNC extern
74 /* Pre-5.5 Borland requires the attributes be placed after the */
77 # define TCL_EXTERN(RTYPE) TCL_EXTRNC RTYPE TCL_STORAGE_CLASS
79 # define TCL_EXTERN(RTYPE) TCL_EXTRNC TCL_STORAGE_CLASS RTYPE
86 * These macros are used to control whether functions are being declared for
87 * import or export in Windows,
88 * They map to no-op declarations on non-Windows systems.
89 * Assumes that tcl.h defines DLLEXPORT & DLLIMPORT correctly.
90 * The default build on windows is for a DLL, which causes the DLLIMPORT
91 * and DLLEXPORT macros to be nonempty. To build a static library, the
92 * macro STATIC_BUILD should be defined before the inclusion of tcl.h
94 * If a function is being declared while it is being built
95 * to be included in a shared library, then it should have the DLLEXPORT
96 * storage class. If is being declared for use by a module that is going to
97 * link against the shared library, then it should have the DLLIMPORT storage
98 * class. If the symbol is beind declared for a static build or for use from a
99 * stub library, then the storage class should be empty.
101 * The convention is that a macro called BUILD_xxxx, where xxxx is the
102 * name of a library we are building, is set on the compile line for sources
103 * that are to be placed in the library. When this macro is set, the
104 * storage class will be set to DLLEXPORT. At the end of the header file, the
105 * storage class will be reset to DLLIMPORt.
108 #undef TCL_STORAGE_CLASS
110 # define TCL_STORAGE_CLASS DLLEXPORT
112 # ifdef USE_ZLIBTCL_STUBS
113 # define TCL_STORAGE_CLASS
115 # define TCL_STORAGE_CLASS DLLIMPORT
120 *----------------------------------------------------------------------------
121 * C API for Zlibtcl generic layer
122 *----------------------------------------------------------------------------
126 *----------------------------------------------------------------------------
127 * Function prototypes for publically accessible routines
128 *----------------------------------------------------------------------------
131 #include "zlibtclDecls.h"
134 *----------------------------------------------------------------------------
135 * Function prototypes for stub initialization.
136 *----------------------------------------------------------------------------
139 #ifdef USE_ZLIBTCL_STUBS
141 Zlibtcl_InitStubs
_ANSI_ARGS_((Tcl_Interp
*interp
, CONST
char *version
, int exact
));
145 * When not using stubs, make it a macro.
148 #define Zlibtcl_InitStubs(interp, version, exact) \
149 Tcl_PkgRequire(interp, "zlibtcl", version, exact)
152 #undef TCL_STORAGE_CLASS
153 #define TCL_STORAGE_CLASS DLLIMPORT
155 #endif /* RC_INVOKED */
156 #endif /* __ZLIBTCL_H__ */