diff options
author | escoffon <escoffon> | 1998-07-29 20:27:59 (GMT) |
---|---|---|
committer | escoffon <escoffon> | 1998-07-29 20:27:59 (GMT) |
commit | 16b7e804de016ea8a6b0be74cce7a05722a400bf (patch) | |
tree | de014fd73de0c2d09c68531f86ffad19353b1352 /generic | |
parent | 41d923e2b29ba22c7a720b6a679d8b776443e256 (diff) | |
download | tcl-16b7e804de016ea8a6b0be74cce7a05722a400bf.zip tcl-16b7e804de016ea8a6b0be74cce7a05722a400bf.tar.gz tcl-16b7e804de016ea8a6b0be74cce7a05722a400bf.tar.bz2 |
rearranged the DLL import/export macros to give better default behaviour
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tcl.h | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/generic/tcl.h b/generic/tcl.h index 94685fc..dc7b2ad 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * SCCS: %Z% $Id: tcl.h,v 1.16 1998/07/29 11:43:18 escoffon Exp $ + * SCCS: %Z% $Id: tcl.h,v 1.17 1998/07/29 20:27:59 escoffon Exp $ */ #ifndef _TCL @@ -158,18 +158,25 @@ /* * Macros used to declare a function to be exported by a DLL. - * Used by Windows, maps to no-op declarations on non-Windows systems + * Used by Windows, maps to no-op declarations on non-Windows systems. + * The default build on windows is for a DLL, which causes the DLLIMPORT + * and DLLEXPORT macros to be nonempty. To build a static library, the + * macro STATIC_BUILD should be defined. + * The support follows the convention that a macro called BUILD_xxxx, where + * xxxx is the name of a library we are building, is set on the compile line + * for sources that are to be placed in the library. See BUILD_tcl in this + * file for an example of how the macro is to be used. */ -#ifdef DLL_BUILD -# ifdef __WIN32__ +#ifdef __WIN32__ +# ifdef STATIC_BUILD +# define DLLIMPORT +# define DLLEXPORT +# else # ifdef _MSC_VER # define DLLIMPORT __declspec(dllimport) # define DLLEXPORT __declspec(dllexport) # endif -# else -# define DLLIMPORT -# define DLLEXPORT # endif #else # define DLLIMPORT |