defsgnucwin32.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #ifndef NV_CORE_H
  2. #error "Do not include this file directly."
  3. #endif
  4. //#include <cstddef> // size_t, NULL
  5. // Function linkage
  6. #define DLL_IMPORT __declspec(dllimport)
  7. #define DLL_EXPORT __declspec(dllexport)
  8. #define DLL_EXPORT_CLASS DLL_EXPORT
  9. // Function calling modes
  10. #if NV_CPU_X86
  11. # define NV_CDECL __attribute__((cdecl))
  12. # define NV_STDCALL __attribute__((stdcall))
  13. #else
  14. # define NV_CDECL
  15. # define NV_STDCALL
  16. #endif
  17. #define NV_FASTCALL __attribute__((fastcall))
  18. #define NV_FORCEINLINE inline
  19. #define NV_DEPRECATED __attribute__((deprecated))
  20. #if __GNUC__ > 2
  21. #define NV_PURE __attribute__((pure))
  22. #define NV_CONST __attribute__((const))
  23. #else
  24. #define NV_PURE
  25. #define NV_CONST
  26. #endif
  27. #define NV_NOINLINE __attribute__((noinline))
  28. // Define __FUNC__ properly.
  29. #if defined(__STDC_VERSION__) && __STDC_VERSION__ < 199901L
  30. # if __GNUC__ >= 2
  31. # define __FUNC__ __PRETTY_FUNCTION__ // __FUNCTION__
  32. # else
  33. # define __FUNC__ "<unknown>"
  34. # endif
  35. #else
  36. # define __FUNC__ __PRETTY_FUNCTION__
  37. #endif
  38. #define restrict __restrict__
  39. /*
  40. // Type definitions
  41. typedef unsigned char uint8;
  42. typedef signed char int8;
  43. typedef unsigned short uint16;
  44. typedef signed short int16;
  45. typedef unsigned int uint32;
  46. typedef signed int int32;
  47. typedef unsigned long long uint64;
  48. typedef signed long long int64;
  49. // Aliases
  50. typedef uint32 uint;
  51. */