- Main Page
- Classes
- Files
- Directories

- File List
- File Members

# fbxarch.h

Go to the documentation of this file.

    00001 /****************************************************************************************
    00002
    00003    Copyright (C) 2013 Autodesk, Inc.
    00004    All rights reserved.
    00005
    00006    Use of this software is subject to the terms of the Autodesk license agreement
    00007    provided at the time of installation or download, or which otherwise accompanies
    00008    this software in either electronic or hard copy form.
    00009
    00010 ****************************************************************************************/
    00011
    00041 #ifndef _FBXSDK_CORE_ARCH_ARCH_H_
    00042 #define _FBXSDK_CORE_ARCH_ARCH_H_
    00043
    00044 #if defined(_WIN32) || defined(_WIN64) //Microsoft Windows ------------------------------
    00045
    00046     #define FBXSDK_ENV_WIN 1
    00047
    00048     #if defined(WINAPI_FAMILY)
    00049         #if WINAPI_FAMILY_ONE_PARTITION(WINAPI_FAMILY, WINAPI_PARTITION_APP)
    00050             #define FBXSDK_ENV_WINRT 1
    00051         #endif
    00052     #endif
    00053
    00054     #if defined(_M_X64)
    00055         #define FBXSDK_ARCH_AMD64 1
    00056         #define FBXSDK_CPU_64 1
    00057     #elif defined(_M_IX86)
    00058         #define FBXSDK_ARCH_IX86 1
    00059         #define FBXSDK_CPU_32 1
    00060     #elif defined(_M_ARM)
    00061         #define FBXSDK_ARCH_ARM 1
    00062         #define FBXSDK_CPU_32 1
    00063     #else
    00064         #error Unsupported architecture!
    00065     #endif
    00066
    00067     #if defined(_MSC_VER)
    00068         #define FBXSDK_COMPILER_MSC 1
    00069     #elif defined(__GNUC__)
    00070         #define FBXSDK_COMPILER_GNU 1
    00071     #elif defined(__ICL)
    00072         #define FBXSDK_COMPILER_INTEL 1
    00073     #else
    00074         #error Unsupported compiler!
    00075     #endif
    00076
    00077 #elif defined(__APPLE__) || defined(__MACH__) //Apple MacOS/X ---------------------------
    00078
    00079     #define FBXSDK_ENV_MAC 1
    00080
    00081     #if defined(__i386__)
    00082         #define FBXSDK_ARCH_IX86 1
    00083         #define FBXSDK_CPU_32 1
    00084     #elif defined(__x86_64__) || defined(__x86_64)
    00085         #define FBXSDK_ARCH_AMD64 1
    00086         #define FBXSDK_CPU_64 1
    00087     #elif defined(__arm__)
    00088         #define FBXSDK_ARCH_ARM 1
    00089         #define FBXSDK_CPU_32 1
    00090     #else
    00091         #error Unsupported architecture!
    00092     #endif
    00093
    00094     #define FBXSDK_COMPILER_GNU 1
    00095
    00096 #elif defined(__linux__) || defined(__CYGWIN__) //Linux ---------------------------------
    00097
    00098     #define FBXSDK_ENV_LINUX 1
    00099
    00100     #if defined(__i386__)
    00101         #define FBXSDK_ARCH_IX86 1
    00102         #define FBXSDK_CPU_32 1
    00103     #elif defined(__x86_64__) || defined(__x86_64)
    00104         #define FBXSDK_ARCH_AMD64 1
    00105         #define FBXSDK_CPU_64 1
    00106     #elif defined(__arm__)
    00107         #define FBXSDK_ARCH_ARM 1
    00108         #define FBXSDK_CPU_32 1
    00109     #else
    00110         #error Unsupported architecture!
    00111     #endif
    00112
    00113     #define FBXSDK_COMPILER_GNU 1
    00114
    00115 #else
    00116     #error Unsupported platform!
    00117 #endif
    00118
    00119 //---------------------------------------------------------------------------------------
    00120 //Compiler Specifics
    00121 #if defined(FBXSDK_SHARED)
    00122     #if defined(FBXSDK_COMPILER_MSC) || defined(FBXSDK_COMPILER_INTEL)
    00123         #define FBXSDK_DLLIMPORT __declspec(dllimport)
    00124         #define FBXSDK_DLLEXPORT __declspec(dllexport)
    00125     #elif defined(FBXSDK_COMPILER_GNU) && (__GNUC__ >= 4)
    00126         #define FBXSDK_DLLIMPORT __attribute__((visibility("default")))
    00127         #define FBXSDK_DLLEXPORT __attribute__((visibility("default")))
    00128     #else
    00129         #define FBXSDK_DLLIMPORT
    00130         #define FBXSDK_DLLEXPORT
    00131     #endif
    00132 #else
    00133     #define FBXSDK_DLLIMPORT
    00134     #define FBXSDK_DLLEXPORT
    00135 #endif
    00136
    00137 #ifndef FBXSDK_DLL
    00138     #define FBXSDK_DLL FBXSDK_DLLIMPORT
    00139 #endif
    00140
    00141 #if defined(FBXSDK_COMPILER_MSC)
    00142     #pragma warning(disable : 4251) //'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2'
    00143     #if _MSC_VER >= 1300 // 7.1
    00144         #define FBX_DEPRECATED __declspec(deprecated)
    00145     #else
    00146         #define FBX_DEPRECATED
    00147     #endif
    00148 #elif defined(FBXSDK_COMPILER_GNU)
    00149     #define FBX_DEPRECATED __attribute__((deprecated))
    00150 #elif defined(FBXSDK_COMPILER_INTEL)
    00151     #if __INTEL_COMPILER >= 810
    00152         #define FBX_DEPRECATED __declspec(deprecated)
    00153     #else
    00154         #define FBX_DEPRECATED
    00155     #endif
    00156 #else
    00157     #error Unsupported compiler!
    00158 #endif
    00159
    00160 //---------------------------------------------------------------------------------------
    00161 //Platform Standardization
    00162 #ifndef NULL
    00163     #if defined(__GNUG__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8))
    00164         #define NULL (__null)
    00165     #else
    00166         #if defined(__cplusplus)
    00167             #define NULL 0
    00168         #else
    00169             #define NULL ((void*)0)
    00170         #endif
    00171     #endif
    00172 #endif
    00173
    00174 #if !defined(_MAX_PATH)
    00175     #define _MAX_PATH 260
    00176 #endif
    00177
    00178 #if defined(FBXSDK_ENV_WIN)
    00179     #define snprintf _snprintf //for stdio.h platform compatibility
    00180 #endif
    00181
    00182 #if !defined(FBXSDK_COMPILER_MSC)
    00183     #ifndef strcmpi
    00184         #define strcmpi strcasecmp
    00185     #endif
    00186     #ifndef stricmp
    00187         #define stricmp strcasecmp
    00188     #endif
    00189     #ifndef strncmpi
    00190         #define strncmpi strncasecmp
    00191     #endif
    00192     #ifndef strnicmp
    00193         #define strnicmp strncasecmp
    00194     #endif
    00195 #endif
    00196
    00197 #endif /* _FBXSDK_CORE_ARCH_ARCH_H_ */