[compiler-rt] r196292 - For libkern and libsa on NetBSD, the normal system headers can't be

Joerg Sonnenberger joerg at bec.de
Tue Dec 3 08:19:15 PST 2013


Author: joerg
Date: Tue Dec  3 10:19:14 2013
New Revision: 196292

URL: http://llvm.org/viewvc/llvm-project?rev=196292&view=rev
Log:
For libkern and libsa on NetBSD, the normal system headers can't be
used. Adjust.

Modified:
    compiler-rt/trunk/lib/int_lib.h

Modified: compiler-rt/trunk/lib/int_lib.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/int_lib.h?rev=196292&r1=196291&r2=196292&view=diff
==============================================================================
--- compiler-rt/trunk/lib/int_lib.h (original)
+++ compiler-rt/trunk/lib/int_lib.h Tue Dec  3 10:19:14 2013
@@ -31,11 +31,21 @@
 # define COMPILER_RT_ABI
 #endif
 
+#if defined(__NetBSD__) && (defined(_KERNEL) || defined(_STANDALONE))
+/*
+ * Kernel and boot environment can't use normal headers,
+ * so use the equivalent system headers.
+ */
+#  include <machine/limits.h>
+#  include <sys/stdint.h>
+#  include <sys/types.h>
+#else
 /* Include the standard compiler builtin headers we use functionality from. */
-#include <limits.h>
-#include <stdint.h>
-#include <stdbool.h>
-#include <float.h>
+#  include <limits.h>
+#  include <stdint.h>
+#  include <stdbool.h>
+#  include <float.h>
+#endif
 
 /* Include the commonly used internal type definitions. */
 #include "int_types.h"





More information about the llvm-commits mailing list