blob: 8a2c32027b9975dfda97e885a60e65c17e8227e4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
diff --git a/util/StrDefs.ct b/util/StrDefs.ct
index b597b2051..b682255ad 100644
--- a/util/StrDefs.ct
+++ b/util/StrDefs.ct
@@ -46,6 +46,8 @@ SOFTWARE.
******************************************************************/
#define Const const
+#include "StringDefs.h"
+#include "Shell.h"
<<<STRING_TABLE_GOES_HERE>>>
diff --git a/util/StrDefs.ht b/util/StrDefs.ht
index 2ce20562f..ceab2610f 100644
--- a/util/StrDefs.ht
+++ b/util/StrDefs.ht
@@ -52,6 +52,18 @@ SOFTWARE.
#define _XtStringDefs_h_Const const
#endif
+#ifndef XT_EXTERN_API
+# if defined(_MSC_VER) && defined(XT_DLL_EXPORTS)
+# ifdef XT_BUILD
+# define XT_EXTERN_API extern __declspec(dllexport)
+# else
+# define XT_EXTERN_API extern __declspec(dllimport)
+# endif
+# else
+# define XT_EXTERN_API extern
+# endif
+#endif
+
<<<STRING_TABLE_GOES_HERE>>>
#ifndef XTSTRINGDEFINES
diff --git a/util/string.list b/util/string.list
index 49ba7476e..753c592b3 100644
--- a/util/string.list
+++ b/util/string.list
@@ -6,7 +6,7 @@
#prefix Xt
#feature XTSTRINGDEFINES
-#externref extern
+#externref XT_EXTERN_API
#externdef
! note that the trailing space is required in the #externdef line.
#ctmpl util/StrDefs.ct
diff --git a/util/Shell.ht b/util/Shell.ht
index 500e0fd75..ac8fc2a2e 100644
--- a/util/Shell.ht
+++ b/util/Shell.ht
@@ -64,6 +64,18 @@ SOFTWARE.
#define _XtShell_h_Const const
#endif
+#ifndef XT_EXTERN_API
+# if defined(_MSC_VER) && defined(XT_DLL_EXPORTS)
+# ifdef XT_BUILD
+# define XT_EXTERN_API extern __declspec(dllexport)
+# else
+# define XT_EXTERN_API extern __declspec(dllimport)
+# endif
+# else
+# define XT_EXTERN_API extern
+# endif
+#endif
+
<<<STRING_TABLE_GOES_HERE>>>
#ifndef XTSTRINGDEFINES
diff --git a/include/X11/Intrinsic.h b/include/X11/Intrinsic.h
index 559697aa0..d11eb0955 100644
--- a/include/X11/Intrinsic.h
+++ b/include/X11/Intrinsic.h
@@ -106,7 +106,18 @@ typedef char *String;
#define externalref globalref
#define externaldef(psect) globaldef {"psect"} noshare
#else
-#define externalref extern
+#ifndef XT_EXTERN_API
+# if defined(_MSC_VER) && defined(XT_DLL_EXPORTS)
+# ifdef XT_BUILD
+# define XT_EXTERN_API extern __declspec(dllexport)
+# else
+# define XT_EXTERN_API extern __declspec(dllimport)
+# endif
+# else
+# define XT_EXTERN_API extern
+# endif
+#endif
+#define externalref XT_EXTERN_API
#define externaldef(psect)
#endif /* VMS */
|