Add NV_DEPRECATE definition.
This commit is contained in:
parent
a0d750702a
commit
301f09e1d4
@ -8,7 +8,7 @@
|
||||
// Function linkage
|
||||
#define DLL_IMPORT
|
||||
#if __GNUC__ >= 4
|
||||
# define DLL_EXPORT __attribute__((visibility("default")))
|
||||
# define DLL_EXPORT __attribute__((visibility("default")))
|
||||
# define DLL_EXPORT_CLASS DLL_EXPORT
|
||||
#else
|
||||
# define DLL_EXPORT
|
||||
@ -26,10 +26,11 @@
|
||||
|
||||
#define NV_FASTCALL __attribute__((fastcall))
|
||||
#define NV_FORCEINLINE __attribute__((always_inline))
|
||||
#define NV_DEPRECATED __attribute__((deprecated))
|
||||
|
||||
#if __GNUC__ > 2
|
||||
#define NV_PURE __attribute__((pure))
|
||||
#define NV_CONST __attribute__((const))
|
||||
#define NV_PURE __attribute__((pure))
|
||||
#define NV_CONST __attribute__((const))
|
||||
#else
|
||||
#define NV_PURE
|
||||
#define NV_CONST
|
||||
@ -46,21 +47,21 @@
|
||||
# define __FUNC__ __PRETTY_FUNCTION__
|
||||
#endif
|
||||
|
||||
#define restrict __restrict__
|
||||
#define restrict __restrict__
|
||||
|
||||
|
||||
// Type definitions
|
||||
typedef uint8_t uint8;
|
||||
typedef int8_t int8;
|
||||
typedef uint8_t uint8;
|
||||
typedef int8_t int8;
|
||||
|
||||
typedef uint16_t uint16;
|
||||
typedef int16_t int16;
|
||||
typedef uint16_t uint16;
|
||||
typedef int16_t int16;
|
||||
|
||||
typedef uint32_t uint32;
|
||||
typedef int32_t int32;
|
||||
typedef uint32_t uint32;
|
||||
typedef int32_t int32;
|
||||
|
||||
typedef uint64_t uint64;
|
||||
typedef int64_t int64;
|
||||
typedef uint64_t uint64;
|
||||
typedef int64_t int64;
|
||||
|
||||
// Aliases
|
||||
typedef uint32 uint;
|
||||
typedef uint32 uint;
|
||||
|
@ -5,7 +5,7 @@
|
||||
// Function linkage
|
||||
#define DLL_IMPORT
|
||||
#if __GNUC__ >= 4
|
||||
# define DLL_EXPORT __attribute__((visibility("default")))
|
||||
# define DLL_EXPORT __attribute__((visibility("default")))
|
||||
# define DLL_EXPORT_CLASS DLL_EXPORT
|
||||
#else
|
||||
# define DLL_EXPORT
|
||||
@ -14,19 +14,21 @@
|
||||
|
||||
// Function calling modes
|
||||
#if NV_CPU_X86
|
||||
# define NV_CDECL __attribute__((cdecl))
|
||||
# define NV_STDCALL __attribute__((stdcall))
|
||||
# define NV_CDECL __attribute__((cdecl))
|
||||
# define NV_STDCALL __attribute__((stdcall))
|
||||
#else
|
||||
# define NV_CDECL
|
||||
# define NV_STDCALL
|
||||
#endif
|
||||
|
||||
#define NV_FASTCALL __attribute__((fastcall))
|
||||
#define NV_FORCEINLINE __attribute__((always_inline))
|
||||
#define NV_FASTCALL __attribute__((fastcall))
|
||||
#define NV_FORCEINLINE __attribute__((always_inline))
|
||||
#define NV_DEPRECATED __attribute__((deprecated))
|
||||
|
||||
|
||||
#if __GNUC__ > 2
|
||||
#define NV_PURE __attribute__((pure))
|
||||
#define NV_CONST __attribute__((const))
|
||||
#define NV_PURE __attribute__((pure))
|
||||
#define NV_CONST __attribute__((const))
|
||||
#else
|
||||
#define NV_PURE
|
||||
#define NV_CONST
|
||||
@ -43,21 +45,21 @@
|
||||
# define __FUNC__ __PRETTY_FUNCTION__
|
||||
#endif
|
||||
|
||||
#define restrict __restrict__
|
||||
#define restrict __restrict__
|
||||
|
||||
|
||||
// Type definitions
|
||||
typedef unsigned char uint8;
|
||||
typedef signed char int8;
|
||||
typedef unsigned char uint8;
|
||||
typedef signed char int8;
|
||||
|
||||
typedef unsigned short uint16;
|
||||
typedef signed short int16;
|
||||
typedef unsigned short uint16;
|
||||
typedef signed short int16;
|
||||
|
||||
typedef unsigned int uint32;
|
||||
typedef signed int int32;
|
||||
typedef unsigned int uint32;
|
||||
typedef signed int int32;
|
||||
|
||||
typedef unsigned long long uint64;
|
||||
typedef signed long long int64;
|
||||
typedef unsigned long long uint64;
|
||||
typedef signed long long int64;
|
||||
|
||||
// Aliases
|
||||
typedef uint32 uint;
|
||||
typedef uint32 uint;
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
#define NV_FASTCALL __attribute__((fastcall))
|
||||
#define NV_FORCEINLINE __attribute__((always_inline))
|
||||
#define NV_DEPRECATED __attribute__((deprecated))
|
||||
|
||||
#if __GNUC__ > 2
|
||||
#define NV_PURE __attribute__((pure))
|
||||
|
@ -3,15 +3,16 @@
|
||||
#endif
|
||||
|
||||
// Function linkage
|
||||
#define DLL_IMPORT __declspec(dllimport)
|
||||
#define DLL_EXPORT __declspec(dllexport)
|
||||
#define DLL_IMPORT __declspec(dllimport)
|
||||
#define DLL_EXPORT __declspec(dllexport)
|
||||
#define DLL_EXPORT_CLASS DLL_EXPORT
|
||||
|
||||
// Function calling modes
|
||||
#define NV_CDECL __cdecl
|
||||
#define NV_STDCALL __stdcall
|
||||
#define NV_FASTCALL __fastcall
|
||||
#define NV_FORCEINLINE __forceinline
|
||||
#define NV_CDECL __cdecl
|
||||
#define NV_STDCALL __stdcall
|
||||
#define NV_FASTCALL __fastcall
|
||||
#define NV_FORCEINLINE __forceinline
|
||||
#define NV_DEPRECATED __deprecated
|
||||
|
||||
#define NV_PURE
|
||||
#define NV_CONST
|
||||
@ -29,33 +30,33 @@
|
||||
#define restrict
|
||||
#endif
|
||||
|
||||
#if !defined __attribute__
|
||||
// Ignore gcc attributes.
|
||||
#define __attribute__(X)
|
||||
#endif
|
||||
|
||||
#if !defined __FUNC__
|
||||
#define __FUNC__ __FUNCTION__
|
||||
#define __FUNC__ __FUNCTION__
|
||||
#endif
|
||||
|
||||
|
||||
// Type definitions
|
||||
typedef unsigned char uint8;
|
||||
typedef signed char int8;
|
||||
typedef unsigned char uint8;
|
||||
typedef signed char int8;
|
||||
|
||||
typedef unsigned short uint16;
|
||||
typedef signed short int16;
|
||||
typedef unsigned short uint16;
|
||||
typedef signed short int16;
|
||||
|
||||
typedef unsigned int uint32;
|
||||
typedef signed int int32;
|
||||
typedef unsigned int uint32;
|
||||
typedef signed int int32;
|
||||
|
||||
typedef unsigned __int64 uint64;
|
||||
typedef signed __int64 int64;
|
||||
typedef unsigned __int64 uint64;
|
||||
typedef signed __int64 int64;
|
||||
|
||||
// Aliases
|
||||
typedef uint32 uint;
|
||||
typedef uint32 uint;
|
||||
|
||||
|
||||
// Unwanted VC++ warnings to disable.
|
||||
/*
|
||||
#pragma warning(disable : 4244) // conversion to float, possible loss of data
|
||||
#pragma warning(disable : 4245) // conversion from 'enum ' to 'unsigned long', signed/unsigned mismatch
|
||||
#pragma warning(disable : 4100) // unreferenced formal parameter
|
||||
@ -65,30 +66,13 @@ typedef uint32 uint;
|
||||
#pragma warning(disable : 4305) // truncation from 'const double' to 'float'
|
||||
#pragma warning(disable : 4505) // unreferenced local function has been removed
|
||||
|
||||
//#pragma warning(disable : 4699) // creating precompiled header
|
||||
//#pragma warning(disable : 4201) // nonstandard extension used : nameless struct/union
|
||||
#pragma warning(disable : 4702) // unreachable code in inline expanded function
|
||||
#pragma warning(disable : 4711) // function selected for automatic inlining
|
||||
#pragma warning(disable : 4725) // Pentium fdiv bug
|
||||
|
||||
//#pragma warning(disable : 4512) // assignment operator could not be generated
|
||||
//#pragma warning(disable : 4530) // C++ exception handler used, but unwind semantics are not enabled
|
||||
//#pragma warning(disable : 4238) // nonstandard extension used : class rvalue used as lvalue
|
||||
//#pragma warning(disable : 4251) // needs to have dll-interface to be used by clients of class 'ULinker'
|
||||
//#pragma warning(disable : 4275) // non dll-interface class used as base for dll-interface class
|
||||
|
||||
//#pragma warning(disable : 4511) // copy constructor could not be generated
|
||||
//#pragma warning(disable : 4284) // return type is not a UDT or reference to a UDT
|
||||
//#pragma warning(disable : 4355) // this used in base initializer list
|
||||
//#pragma warning(disable : 4097) // typedef-name '' used as synonym for class-name ''
|
||||
//#pragma warning(disable : 4291) // typedef-name '' used as synonym for class-name ''
|
||||
|
||||
#pragma warning(disable : 4345) // behavior change: an object of POD type constructed with an initializer of the form () will be default-initialized
|
||||
|
||||
#pragma warning(disable : 4786) // Identifier was truncated and cannot be debugged.
|
||||
|
||||
//#pragma warning(disable : 4996) // function was declared deprecated.
|
||||
//#pragma warning(disable : 4146) // unary minus operator applied to unsigned type, result still unsigned
|
||||
|
||||
#pragma warning(disable : 4675) // resolved overload was found by argument-dependent lookup
|
||||
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user