summaryrefslogtreecommitdiffstats
path: root/generic/tcl.h
diff options
context:
space:
mode:
authorescoffon <escoffon>1998-07-29 11:09:48 (GMT)
committerescoffon <escoffon>1998-07-29 11:09:48 (GMT)
commitae70bad153d5dfe6aabae15acc249f6e5a45102c (patch)
tree94823b97555aafd6ae5cb8acb5d18b79fed27686 /generic/tcl.h
parenteaba13bb7910dc41da26122b827bbee773468360 (diff)
downloadtcl-ae70bad153d5dfe6aabae15acc249f6e5a45102c.zip
tcl-ae70bad153d5dfe6aabae15acc249f6e5a45102c.tar.gz
tcl-ae70bad153d5dfe6aabae15acc249f6e5a45102c.tar.bz2
Added support for DLL import/export declarations in the EXTERN macro
Diffstat (limited to 'generic/tcl.h')
-rw-r--r--generic/tcl.h59
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.
*/