make cxxabi.h self-contained (like on gnu libstdc++) #14

bugmen0t opened this Issue Sep 28, 2013 · 1 comment

2 participants


llvm build checks cxxabi.h presence with

check_include_file_cxx(cxxabi.h HAVE_CXXABI_H)

unlike AC_CHECK_HEADERS it doesn't stop with CPP but actually tries to compile. And so the check fails on freebsd:

/usr/include/c++/v1/cxxabi.h:234:22: error: unknown type name 'size_t'; did you mean
                     size_t* n,
/usr/include/x86/_types.h:104:20: note: '__size_t' declared here
typedef __uint64_t      __size_t;               /* sizeof() */
1 error generated.
diff --git a/src/cxxabi.h b/src/cxxabi.h
index 4b661b6..7c83360 100644
--- a/src/cxxabi.h
+++ b/src/cxxabi.h
@@ -22,6 +22,7 @@

 #ifndef __CXXABI_H_
 #define __CXXABI_H_
+#include <stddef.h>
 #include <stdint.h>
 #include "unwind.h"
 namespace std 

Pushed and thanks! Please feel free to open a pull request if you hit anything else

@cbergstrom cbergstrom closed this Sep 28, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment