summaryrefslogtreecommitdiff
path: root/indra/llcommon/llpreprocessor.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcommon/llpreprocessor.h')
-rw-r--r--indra/llcommon/llpreprocessor.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/indra/llcommon/llpreprocessor.h b/indra/llcommon/llpreprocessor.h
index b499a9ce10..268109e8b7 100644
--- a/indra/llcommon/llpreprocessor.h
+++ b/indra/llcommon/llpreprocessor.h
@@ -32,9 +32,11 @@
#ifdef LL_LINUX
#define __ENABLE_WSTRING
#include <endian.h>
+#elif defined(__FreeBSD__)
+#include <sys/endian.h>
#endif // LL_LINUX
-#if (defined(LL_WINDOWS) || (defined(LL_LINUX) && (__BYTE_ORDER == __LITTLE_ENDIAN)) || (defined(LL_DARWIN) && defined(__LITTLE_ENDIAN__)))
+#if (defined(LL_WINDOWS) || (defined(LL_LINUX) && (__BYTE_ORDER == __LITTLE_ENDIAN)) || (defined(LL_DARWIN) && defined(__LITTLE_ENDIAN__)) || (defined(__FreeBSD__) && (_BYTE_ORDER == _LITTLE_ENDIAN)))
#define LL_LITTLE_ENDIAN 1
#else
#define LL_BIG_ENDIAN 1
@@ -77,7 +79,7 @@
#endif
// Deal with minor differences on Unixy OSes.
-#if LL_DARWIN || LL_LINUX
+#if LL_DARWIN || LL_LINUX || __FreeBSD__
// Different name, same functionality.
#define stricmp strcasecmp
#define strnicmp strncasecmp
@@ -167,7 +169,11 @@
#define LL_TO_STRING_HELPER(x) #x
#define LL_TO_STRING(x) LL_TO_STRING_HELPER(x)
+#if _M_ARM64
+#define LL_TO_WSTRING_HELPER(x) L## #x
+#else
#define LL_TO_WSTRING_HELPER(x) L#x
+#endif
#define LL_TO_WSTRING(x) LL_TO_WSTRING_HELPER(x)
#define LL_FILE_LINENO_MSG(msg) __FILE__ "(" LL_TO_STRING(__LINE__) ") : " msg
#define LL_GLUE_IMPL(x, y) x##y