Fix newlinew warning in floatundidf.c , Bulkout CMake system more, complete port to AuroraUX and Solaris.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@77958 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/int_lib.h b/lib/int_lib.h
index 7d09c85..e836550 100644
--- a/lib/int_lib.h
+++ b/lib/int_lib.h
@@ -20,6 +20,34 @@
#include <limits.h>
+// TODO: Improve this to minimal pre-processor hackish'ness.
+#if defined (__SVR4) && defined (__sun)
+// config.h build via CMake.
+//#include <config.h>
+
+// Solaris header for endian and byte swap
+//#if defined HAVE_SYS_BYTEORDER_H
+#include <sys/byteorder.h>
+
+// Solaris defines endian by setting _LITTLE_ENDIAN or _BIG_ENDIAN
+#ifdef _BIG_ENDIAN
+# define IS_BIG_ENDIAN
+#endif
+#ifdef _LITTLE_ENDIAN
+# define IS_LITTLE_ENDIAN
+#endif
+
+#ifdef IS_BIG_ENDIAN
+#define __BIG_ENDIAN__ 1
+#define __LITTLE_ENDIAN__ 0
+#endif
+#ifdef IS_LITTLE_ENDIAN
+#define __BIG_ENDIAN__ 0
+#define __LITTLE_ENDIAN__ 1
+#endif
+
+#endif //End of Solaris ifdef.
+
#ifdef __LITTLE_ENDIAN__
#if __LITTLE_ENDIAN__
#define _YUGA_LITTLE_ENDIAN 1