Add a script to clean up after Tcl/Tk installation
[git/jnareb-git.git] / mingw / include / zlibtcl.h
blob8774d3b33a1e4309f8433f964de6ac3ef35f03b9
1 /*
2 * zlibtcl.h --
4 * Interface to libz.
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 $
21 #ifndef __ZLIBTCL_H__
22 #define __ZLIBTCL_H__
24 #include "tcl.h"
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.
38 #ifndef RC_INVOKED
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.
44 #ifndef CONST84
45 # define CONST84
46 #endif
49 * Fix the Borland bug that's in the EXTERN macro from tcl.h.
51 #ifndef TCL_EXTERN
52 # undef DLLIMPORT
53 # undef DLLEXPORT
54 # if defined(STATIC_BUILD)
55 # define DLLIMPORT
56 # define DLLEXPORT
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__)
61 # define OLDBORLAND 1
62 # define DLLIMPORT __import
63 # define DLLEXPORT __export
64 # else
65 # define DLLIMPORT
66 # define DLLEXPORT
67 # endif
68 /* Avoid name mangling from C++ compilers. */
69 # ifdef __cplusplus
70 # define TCL_EXTRNC extern "C"
71 # else
72 # define TCL_EXTRNC extern
73 # endif
74 /* Pre-5.5 Borland requires the attributes be placed after the */
75 /* return type. */
76 # ifdef OLDBORLAND
77 # define TCL_EXTERN(RTYPE) TCL_EXTRNC RTYPE TCL_STORAGE_CLASS
78 # else
79 # define TCL_EXTERN(RTYPE) TCL_EXTRNC TCL_STORAGE_CLASS RTYPE
80 # endif
81 #endif
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
109 #ifdef BUILD_zlibtcl
110 # define TCL_STORAGE_CLASS DLLEXPORT
111 #else
112 # ifdef USE_ZLIBTCL_STUBS
113 # define TCL_STORAGE_CLASS
114 # else
115 # define TCL_STORAGE_CLASS DLLIMPORT
116 # endif
117 #endif
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
140 EXTERN CONST char *
141 Zlibtcl_InitStubs _ANSI_ARGS_((Tcl_Interp *interp, CONST char *version, int exact));
142 #else
145 * When not using stubs, make it a macro.
148 #define Zlibtcl_InitStubs(interp, version, exact) \
149 Tcl_PkgRequire(interp, "zlibtcl", version, exact)
150 #endif
152 #undef TCL_STORAGE_CLASS
153 #define TCL_STORAGE_CLASS DLLIMPORT
155 #endif /* RC_INVOKED */
156 #endif /* __ZLIBTCL_H__ */