nvidia-texture-tools/src/nvcore/DefsGnucLinux.h

70 lines
1.4 KiB
C
Raw Normal View History

2007-04-17 08:49:19 +00:00
#ifndef NV_CORE_H
#error "Do not include this file directly."
#endif
#include <cstddef> // size_t, NULL
2007-04-17 08:49:19 +00:00
// Function linkage
#define DLL_IMPORT
#if __GNUC__ >= 4
2007-12-03 08:38:56 +00:00
# define DLL_EXPORT __attribute__((visibility("default")))
2007-04-17 08:49:19 +00:00
# define DLL_EXPORT_CLASS DLL_EXPORT
#else
# define DLL_EXPORT
# define DLL_EXPORT_CLASS
#endif
// Function calling modes
#if NV_CPU_X86
2007-12-03 08:38:56 +00:00
# define NV_CDECL __attribute__((cdecl))
# define NV_STDCALL __attribute__((stdcall))
2007-04-17 08:49:19 +00:00
#else
# define NV_CDECL
# define NV_STDCALL
#endif
2007-12-03 08:38:56 +00:00
#define NV_FASTCALL __attribute__((fastcall))
#define NV_FORCEINLINE __attribute__((always_inline))
#define NV_DEPRECATED __attribute__((deprecated))
2007-04-17 08:49:19 +00:00
#if __GNUC__ > 2
2007-12-03 08:38:56 +00:00
#define NV_PURE __attribute__((pure))
#define NV_CONST __attribute__((const))
2007-04-17 08:49:19 +00:00
#else
#define NV_PURE
#define NV_CONST
#endif
2010-07-13 23:28:31 +00:00
#define NV_NOINLINE __attribute__((noinline))
2007-04-17 08:49:19 +00:00
// Define __FUNC__ properly.
#if __STDC_VERSION__ < 199901L
# if __GNUC__ >= 2
# define __FUNC__ __PRETTY_FUNCTION__ // __FUNCTION__
# else
# define __FUNC__ "<unknown>"
# endif
#else
# define __FUNC__ __PRETTY_FUNCTION__
#endif
2007-12-03 08:38:56 +00:00
#define restrict __restrict__
2007-04-17 08:49:19 +00:00
// Type definitions
2007-12-03 08:38:56 +00:00
typedef unsigned char uint8;
typedef signed char int8;
2007-04-17 08:49:19 +00:00
2007-12-03 08:38:56 +00:00
typedef unsigned short uint16;
typedef signed short int16;
2007-04-17 08:49:19 +00:00
2007-12-03 08:38:56 +00:00
typedef unsigned int uint32;
typedef signed int int32;
2007-04-17 08:49:19 +00:00
2007-12-03 08:38:56 +00:00
typedef unsigned long long uint64;
typedef signed long long int64;
2007-04-17 08:49:19 +00:00
// Aliases
2007-12-03 08:38:56 +00:00
typedef uint32 uint;