#ifndef TARGET_H #define TARGET_H /////////////////////////////////////////////////////////////////////////////// // Target.h // // // // Copyright (c) Jan Knepper, 1998. All Rights Reserved. // // Written by Jan Knepper // // // // Redistribution and use in source and binary forms, with or without // // modification, are permitted provided that the following conditions // // are met: // // 1. Redistributions of source code must retain the above copyright // // notice, this list of conditions and the following disclaimer. // // 2. Redistributions in binary form must reproduce the above copyright // // notice, this list of conditions and the following disclaimer in the // // documentation and/or other materials provided with the distribution. // // 3. The name of the author may not be used to endorse or promote products // // derived from this software without specific prior written permission. // // // // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND // // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR // // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE // // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR // // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF // // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS // // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN // // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) // // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF // // THE POSSIBILITY OF SUCH DAMAGE. // /////////////////////////////////////////////////////////////////////////////// #if defined(__SC__) // Symantec C++. #if ( defined(_CPPRTTI) && !defined(__TYPEINFO_H) ) # include #endif # if ( defined(_WIN32) || defined(__NT__) ) # define I_WIN_32 1 // Windows 32 bits. # define I_NNW 1 # if defined(_WINDLL) # define I_DLL 1 // Compiling a DLL. # endif //# define I_IMPORT __declspec(dllimport) # define I_IMPORT __declspec(dllexport) # define I_EXPORT __declspec(dllexport) # elif defined(_WINDOWS) # define I_WIN_16 1 // Windows 16 bits. # define I_NNW 1 # if defined(_WINDLL) # define I_DLL 1 // Compiling a DLL. # endif # define I_IMPORT __declspec(dllexport) # define I_EXPORT __declspec(dllexport) # elif defined(DOS386) # define I_DOS_32 1 // DOS 32 bits. # define I_DOS_32_X 1 // DOSX for Symantec C++. # define I_NNW 1 # else # define I_DOS_16 1 // DOS 16 bits. # endif #elif defined(__BORLANDC__) // Borland C++. #if ( defined(__BCPLUSPLUS__) && ( __BORLANDC__ > 0x450 ) ) # include #endif # if defined(__WIN32__) || defined(__CONSOLE__) # define I_WIN_32 1 // Windows 32 bits. # define I_NNW 1 # if defined(__DLL__) # define I_DLL 1 // Compiling a DLL. # endif # define I_IMPORT __import # define I_EXPORT __export # elif defined(_Windows) # define I_WIN_16 1 // Windows 16 bits. # define I_NNW 1 # if defined(__DLL__) # define I_DLL 1 // Compiling a DLL. # endif # elif defined(__DPMI32__) # define I_DOS_32 1 // DOS 32 bits. # define I_DOS_32_PP 1 # define I_NNW 1 # else # define I_DOS_16 1 // DOS 16 bits. # endif #elif defined(__WATCOMC__) // Watcom C++. # if defined(__NT__) # define I_WIN_32 1 // Windows 32 bits. # define I_NNW 1 # elif defined(__WINDOWS__) # define I_WIN_16 1 // Windows 16 bits. # define I_NNW 1 # elif defined(__OS2__) # define I_OS2_32 1 // OS/2 32 bits. # elif defined(__NETWARE_386__) # define I_NET_32 1 // NetWare 386. # elif defined(__DOS4G__) # define I_DOS_32 1 // DOS 32 bits. # define I_DOS_32_4G 1 // DOS4G for Watcom C++. # define I_NNW 1 # else # define I_DOS_16 1 // DOS 16 bits. # endif #else # error "Compiler not defined in 'Target.h' #endif //#define I_USERDLL(x) (x)?I_EXPORT:I_IMPORT #endif // TARGETH