/*---------------------------------------------------------------------------* Project: NintendoWare File: compiler.h Copyright (C)2009-2011 Nintendo/HAL Laboratory, Inc. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo and/or its licensed developers and are protected by national and international copyright laws. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. The content herein is highly confidential and should be handled accordingly. $Revision: 31311 $ *---------------------------------------------------------------------------*/ #ifndef NW_CONFIG_COMPILER_H_ #define NW_CONFIG_COMPILER_H_ #if defined( __CC_ARM ) || defined( __ARMCC_VERSION ) // ARM RealView Compiler. #define NW_COMPILER_RVCT #include #define NW_DEPRECATED_FUNCTION_MSG(MFunc, msg) MFunc __attribute__ ((deprecated)) #define NW_CHECKED_ARRAY_ITERATOR(MIte, MNum) MIte #define NW_CHAR_TRAITS_COPY(MType, MDest, MDestSize, MFrom, MCount) std::char_traits::copy(MDest, MFrom, MCount) #define NW_WEAK_SYMBOL __weak #elif defined( __CWCC__ ) || defined( __MWERKS__ ) // Freescale CodeWarrior #define NW_COMPILER_CWCC #define NW_COMPILER_MWERKS // 互換性のため(非推奨) #include #define NW_DEPRECATED_FUNCTION_MSG(MFunc, msg) MFunc #define NW_CHECKED_ARRAY_ITERATOR(MIte, MNum) MIte #define NW_CHAR_TRAITS_COPY(MType, MDest, MDestSize, MFrom, MCount) std::char_traits::copy(MDest, MFrom, MCount) #define NW_WEAK_SYMBOL #elif defined( __GNUC__ ) // GNU C++ #define NW_COMPILER_GCC #include #define NW_DEPRECATED_FUNCTION_MSG(MFunc, msg) MFunc __attribute__ ((deprecated)) #define NW_CHECKED_ARRAY_ITERATOR(MIte, MNum) MIte #define NW_CHAR_TRAITS_COPY(MType, MDest, MDestSize, MFrom, MCount) std::char_traits::copy(MDest, MFrom, MCount) #define NW_WEAK_SYMBOL #elif defined( _MSC_VER ) // Miscrosoft Visual C++ #define NW_COMPILER_MSVC #include #define NW_DEPRECATED_FUNCTION_MSG(MFunc, msg) __declspec(deprecated(msg)) MFunc #define NW_CHECKED_ARRAY_ITERATOR(MIte, MNum) stdext::make_checked_array_iterator(MIte, MNum) #define NW_CHAR_TRAITS_COPY(MType, MDest, MDestSize, MFrom, MCount) std::char_traits::_Copy_s(MDest, MDestSize, MFrom, MCount) #define NW_WEAK_SYMBOL #else #error "Unknown compiler" #endif #if !defined(NW_DEPRECATED_FUNCTION) #if defined(NW_IGNORE_DEPRECATED) #define NW_DEPRECATED_FUNCTION(MFunc) MFunc #else #define NW_DEPRECATED_FUNCTION(MFunc) NW_DEPRECATED_FUNCTION_MSG(MFunc, "## Deprecated function ##") #endif #endif #ifndef NW_NO_THROW #define NW_NO_THROW #endif /* NW_CONFIG_COMPILER_H_ */ #endif