00001 #ifndef __LDK_API_H__
00002 #define __LDK_API_H__
00003
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00028
00033 #if defined WIN32 || defined _WIN64 || defined _W64
00034 #ifndef _WINDOWS
00035 #define _WINDOWS
00036 #if defined( _DEBUG ) && !defined( DEBUG )
00037 #define DEBUG
00038 #endif //defined( _DEBUG ) && !defined( DEBUG )
00039 #endif //_WINDOWS
00040 #ifdef _MSC_VER
00041
00042 #pragma warning (disable : 4996) //CRT deprecated warning
00043 #endif //_MSC_VER
00044 #endif //WIN32
00045
00046 #ifdef _WINDOWS
00047 #define DLLIMPORT __declspec(dllimport)
00048 #define DLLEXPORT __declspec(dllexport)
00049 #ifdef LDK_STATIC
00050 #define LDK_API
00051 #ifdef LDK_EXPORT
00052 #define LDK_TLS_API DLLEXPORT
00053 #else
00054 #define LDK_TLS_API DLLIMPORT
00055 #endif //LDK_EXPORT
00056 #else //building dynamic lib
00057 #ifdef LDK_EXPORT
00058 #define LDK_API DLLEXPORT
00059 #define LDK_TLS_API DLLEXPORT
00060 #else
00061 #define LDK_API DLLIMPORT
00062 #define LDK_TLS_API DLLIMPORT
00063 #endif //LDK_EXPORT
00064 #endif //LDK_STATIC
00065 #else
00066 #define DLLIMPORT
00067 #define DLLEXPORT
00068 #define LDK_API
00069 #define LDK_TLS_API
00070 #endif //_WINDOWS
00071
00072
00073 #ifdef _WINDOWS
00074 #ifdef WIN32
00075 #define THIRTY_TWO_BIT 1
00076 #elif defined (_WIN64) || defined _W64
00077 #define SIXTY_FOUR_BIT 1
00078 #endif //WIN32
00079 #elif defined unix
00080
00081
00082 #if defined(__x86_64__) || defined (__ia64__)
00083 #define SIXTY_FOUR_BIT 1
00084 #else
00085 #define THIRTY_TWO_BIT 1
00086 #endif //defined(__x86_64__) || defined (__ia64__)
00087 #ifdef __GNUC__
00088 #define ALIGNED16 __attribute__ ((aligned(16)))
00089 #elif defined _MSC_VER
00090 #define ALIGNED16 __declspec(align(16))
00091 #endif //__GNUC__
00092 #endif //_WINDOWS
00093
00094
00095 #endif //__LDK_API_H__