summaryrefslogtreecommitdiff
path: root/indra/llcommon/stdtypes.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcommon/stdtypes.h')
-rw-r--r--indra/llcommon/stdtypes.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/indra/llcommon/stdtypes.h b/indra/llcommon/stdtypes.h
index 28e50b3d21..78d5e50e4b 100644
--- a/indra/llcommon/stdtypes.h
+++ b/indra/llcommon/stdtypes.h
@@ -29,6 +29,7 @@
#include <cassert>
#include <cfloat>
#include <climits>
+#include <cstddef>
#include <limits>
#include <type_traits>
@@ -71,7 +72,7 @@ typedef unsigned __int64 U64;
#else
typedef long long int S64;
typedef long long unsigned int U64;
-#if LL_DARWIN || LL_LINUX
+#if LL_DARWIN || LL_LINUX || __FreeBSD__
#define S64L(a) (a##LL)
#define U64L(a) (a##ULL)
#endif
@@ -113,6 +114,10 @@ typedef U32 TPACKETID;
#define FALSE (0)
#endif
+#if __FreeBSD__
+#undef NULL
+#endif
+
#ifndef NULL
#define NULL (0)
#endif
@@ -164,14 +169,14 @@ private:
FROM mValue;
public:
- narrow(FROM value): mValue(value) {}
+ constexpr narrow(FROM value): mValue(value) {}
/*---------------------- Narrowing unsigned to signed ----------------------*/
template <typename TO,
typename std::enable_if<std::is_unsigned<FROM>::value &&
std::is_signed<TO>::value,
bool>::type = true>
- inline
+ constexpr
operator TO() const
{
// The reason we skip the
@@ -189,7 +194,7 @@ public:
typename std::enable_if<! (std::is_unsigned<FROM>::value &&
std::is_signed<TO>::value),
bool>::type = true>
- inline
+ constexpr
operator TO() const
{
// two different assert()s so we can tell which condition failed