Changed factoring of function declaration macros to be based on choice of

compiler rather than OS
This commit is contained in:
fur%netscape.com 1999-02-26 23:18:37 +00:00
Родитель 622e57b041
Коммит db0bb1807e
1 изменённых файлов: 14 добавлений и 13 удалений

Просмотреть файл

@ -20,21 +20,22 @@
* Export definitions.
*/
#ifdef XP_PC
#define NS_NATIVECALL(inReturnType) inReturnType __stdcall
#define NS_EXPORT __declspec(dllexport)
#ifdef GENERATE_FOR_X86
#ifdef __GNUC__
#define NS_NATIVECALL(inReturnType) __attribute__((stdcall)) inReturnType
#define NS_EXPORT
#define NS_EXTERN
#else /* MSVC */
#define NS_NATIVECALL(inReturnType) inReturnType __stdcall
#define NS_EXPORT __declspec(dllexport)
#ifdef IMPORTING_VM_FILES /* Defined by all modules that import Vm header files */
#define NS_EXTERN __declspec(dllimport)
#else
#define NS_EXTERN __declspec(dllexport)
#endif
#ifdef IMPORTING_VM_FILES /* Defined by all modules that import Vm header files */
#define NS_EXTERN __declspec(dllimport)
#else
#define NS_EXTERN __declspec(dllexport)
#pragma warning(disable: 4251)
#endif
#pragma warning(disable: 4251)
#elif defined(LINUX) || defined(FREEBSD)
#define NS_NATIVECALL(inReturnType) __attribute__((stdcall)) inReturnType
#define NS_EXPORT
#define NS_EXTERN
#else
#define NS_NATIVECALL(inReturnType) inReturnType
#define NS_EXPORT