diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tcl.h | 59 |
1 files changed, 34 insertions, 25 deletions
diff --git a/generic/tcl.h b/generic/tcl.h index 2742a6d..56f5e44 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.13 1998/07/24 13:49:40 surles Exp $ + * SCCS: %Z% $Id: tcl.h,v 1.14 1998/07/29 11:09:48 escoffon Exp $ */ #ifndef _TCL @@ -157,6 +157,37 @@ #endif /* + * Macros used to declare a function to be exported by a DLL. + * Used by Windows, maps to no-op declarations on non-Windows systems + */ + +#ifdef DLL_BUILD +# ifdef __WIN32__ +# ifdef _MSC_VER +# define DLLIMPORT __declspec(dllimport) +# define DLLEXPORT __declspec(dllexport) +# endif +# else +# define DLLIMPORT +# define DLLEXPORT +# define EXPORT +# endif +#else +# define DLLIMPORT +# define DLLEXPORT +# define EXPORT +#endif + +#ifdef EXPORT +# undef EXPORT +#endif +#ifdef BUILD_tcl +# define EXPORT DLLEXPORT +#else +# define EXPORT DLLIMPORT +#endif + +/* * Definitions that allow this header file to be used either with or * without ANSI C features like function prototypes. */ @@ -174,9 +205,9 @@ #endif #ifdef __cplusplus -# define EXTERN extern "C" +# define EXTERN extern "C" EXPORT #else -# define EXTERN extern +# define EXTERN extern EXPORT #endif /* @@ -205,28 +236,6 @@ typedef long LONG; #endif /* __WIN32__ */ /* - * Macro used to declare a function to be exported by a DLL. - * Used by windows, maps to a simple declaration on non-windows systems - */ -#ifdef __WIN32__ -# ifdef STATIC_BUILD -# define EXPORT(a,b) a b -# else -# if defined(_MSC_VER) -# define EXPORT(a,b) __declspec(dllexport) a b -# else -# if defined(__BORLANDC__) -# define EXPORT(a,b) a _export b -# else -# define EXPORT(a,b) a b -# endif -# endif -# endif -#else -# define EXPORT(a,b) a b -#endif - -/* * Miscellaneous declarations. */ |