NVTT: Fixed OSX build.

This commit is contained in:
Branimir Karadžić 2015-12-21 09:35:42 -08:00
parent bbe9025c69
commit 1a96194429
4 changed files with 14 additions and 7 deletions

View file

@ -5,6 +5,10 @@
#include <stdint.h> // uint8_t, int8_t, ... uintptr_t
#include <stddef.h> // operator new, size_t, NULL
#ifndef __STDC_VERSION__
# define __STDC_VERSION__ 0
#endif // __STDC_VERSION__
// Function linkage
#define DLL_IMPORT
#if __GNUC__ >= 4

View file

@ -4,7 +4,7 @@
#define NV_CORE_MEMORY_H
#include "nvcore.h"
#include <malloc.h>
#include <stdlib.h>
namespace nv {

View file

@ -169,6 +169,13 @@
# define NV_CC_CLANG 1
# define NV_CC_GNUC 1 // Clang is compatible with GCC.
# define NV_CC_STRING "clang"
# pragma clang diagnostic ignored "-Wmissing-braces"
# pragma clang diagnostic ignored "-Wshadow"
# pragma clang diagnostic ignored "-Wunused-local-typedef"
# pragma clang diagnostic ignored "-Wunused-function"
# pragma clang diagnostic ignored "-Wunused-variable"
# pragma clang diagnostic ignored "-Wunused-parameter"
# pragma clang diagnostic ignored "-Wsometimes-uninitialized"
#elif defined POSH_COMPILER_GCC
# define NV_CC_GNUC 1
# define NV_CC_STRING "gcc"

View file

@ -3,7 +3,7 @@
#ifndef NV_MATH_H
#define NV_MATH_H
#include <math.h>
#include <cmath>
#include <float.h> // finite, isnan
#include "nvcore/utils.h" // max, clamp
@ -35,11 +35,7 @@ namespace nv
inline bool isFinite(const float f)
{
#if NV_CC_MSVC
return _finite(f) != 0;
#elif NV_CC_GNUC
return finitef(f);
#endif //
return std::isfinite(f);
}
// Eliminates negative zeros from a float array.