source: trunk/src/opengl/glide/swlibs/fxmisc/fxdll.h

Last change on this file was 2887, checked in by sandervl, 26 years ago

Created swlibs dir

File size: 3.7 KB
Line 
1/*
2** THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY
3** PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT
4** TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX
5** INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE
6** DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com).
7** THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
8** EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A
9** FULL TEXT OF THE NON-WARRANTY PROVISIONS.
10**
11** USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO
12** RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN
13** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013,
14** AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR
15** SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF
16** THE UNITED STATES.
17**
18** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
19**
20** $Revision: 1.1 $
21** $Date: 2000-02-25 00:33:51 $
22*/
23/* preprocessor defines for libraries to support DLL creation */
24
25/* in header file, use FX_ENTRY return-type FX_CALL function-name ( ... ) */
26/* in source file, use FX_EXPORT return-type FX_CSTYLE function-name (... ) */
27
28/* in source file, set FX_DLL_DEFINITION, include this file, then include
29 header file for library. */
30
31/* we need to use two macros per declaration/definition because MSVC
32 requires __stdcall and __declspec( dllexport ) be in different parts
33 of the prototype! */
34
35/* I use two sets in case we need to control declarations and definitions
36 differently. If it turns out we don't, it should be easy to do a search
37 and replace to eliminate one set */
38
39/* NOTE: this header file may be included more than once, and FX_DLL_DEFINITION
40 may have changed, so we do not protect this with an #fndef __FXDLL_H__
41 statement like we normally would. */
42
43
44#ifdef FX_ENTRY
45#undef FX_ENTRY
46#endif
47
48#ifdef FX_CALL
49#undef FX_CALL
50#endif
51
52#ifdef FX_EXPORT
53#undef FX_EXPORT
54#endif
55
56#ifdef FX_CSTYLE
57#undef FX_CSTYLE
58#endif
59
60#if defined(_WIN32)
61#if defined(FX_DLL_DEFINITION)
62 #if defined(FX_DLL_ENABLE)
63 #if defined(__MSC__)
64 #ifndef KERNEL
65 #define FX_ENTRY __declspec( dllexport )
66 #define FX_EXPORT __declspec( dllexport )
67 #else
68 #define FX_ENTRY
69 #define FX_EXPORT
70 #endif /* #ifndef KERNEL */
71 #define FX_CALL __stdcall
72 #define FX_CSTYLE __stdcall
73
74 #elif defined(__WATCOMC__)
75 #define FX_ENTRY
76 #define FX_CALL __stdcall __export
77
78 #define FX_EXPORT
79 #define FX_CSTYLE __stdcall __export
80
81 #else /* compiler */
82 #error define FX_ENTRY,FX_CALL & FX_EXPORT,FX_CSTYLE for your compiler
83 #endif /* compiler */
84
85 #else /* FX_DLL_ENABLE */
86 #define FX_ENTRY
87 #define FX_CALL __stdcall
88
89 #define FX_EXPORT
90 #define FX_CSTYLE __stdcall
91 #endif /* FX_DLL_ENABLE */
92
93#else /* FX_DLL_DEFINITION */
94 #define FX_ENTRY extern
95 #define FX_CALL __stdcall
96#endif /* FX_DLL_DEFINITION */
97
98#elif defined(__WIN32OS2__)
99
100 #define FX_ENTRY
101 #define FX_EXPORT
102 #define FX_CALL __stdcall
103 #define FX_CSTYLE __stdcall
104
105#elif defined(__OS2__)
106
107 #define FX_ENTRY
108 #define FX_EXPORT
109 #define FX_CALL _System
110 #define FX_CSTYLE _System
111
112#endif
113
114/*
115 * We don't want any of this DLL junk for DJGPP or UNIX
116 * so undo what is done above.
117 */
118#if defined(__DJGPP__) || defined(__unix__)
119 #ifdef FX_CALL
120 #undef FX_CALL
121 #endif
122
123 #ifdef FX_CSTYLE
124 #undef FX_CSTYLE
125 #endif
126
127 #ifdef FX_EXPORT
128 #undef FX_EXPORT
129 #endif
130
131 #ifdef FX_ENTRY
132 #undef FX_ENTRY
133 #endif
134
135 #define FX_CALL
136 #define FX_CSTYLE
137 #define FX_EXPORT
138 #define FX_ENTRY
139#endif
140
141#if defined (MSVC16)
142 #undef FX_CALL
143 #define FX_CALL
144#endif
145
Note: See TracBrowser for help on using the repository browser.