[haiku-commits] BRANCH mmadia-github.separate-build-environment - headers/build/posix_target

  • From: mmadia-github.separate-build-environment <community@xxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 7 Aug 2012 01:49:16 +0200 (CEST)

added 1 changeset to branch 
'refs/remotes/mmadia-github/separate-build-environment'
old head: 5246df2692d891624926752599feae95c76da612
new head: aa72e386e1a326cd0743d76a20c514519889588e

----------------------------------------------------------------------------

aa72e38: Added target_alloca.h, target_div_t.h, target_wchar_t.h

                                        [ Matt Madia <mattmadia@xxxxxxxxx> ]

----------------------------------------------------------------------------

Commit:      aa72e386e1a326cd0743d76a20c514519889588e

Author:      Matt Madia <mattmadia@xxxxxxxxx>
Date:        Mon Aug  6 19:45:23 2012 UTC

----------------------------------------------------------------------------

3 files changed, 71 insertions(+)
headers/build/posix_target/target_alloca.h  |   38 +++++++++++++++++++++++
headers/build/posix_target/target_div_t.h   |   24 ++++++++++++++
headers/build/posix_target/target_wchar_t.h |    9 ++++++

----------------------------------------------------------------------------

diff --git a/headers/build/posix_target/target_alloca.h 
b/headers/build/posix_target/target_alloca.h
new file mode 100644
index 0000000..0bcacd3
--- /dev/null
+++ b/headers/build/posix_target/target_alloca.h
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2003-2012 Haiku, Inc. All Rights Reserved.
+ * Distributed under the terms of the MIT License.
+ */
+#ifndef        _ALLOCA_H
+#define        _ALLOCA_H
+
+
+#include <sys/target_types.h>
+
+
+#undef __alloca
+#undef alloca
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// NOTE: #8730 -- uncertain if these functions need to have the same names as
+//             the macro definitions.
+_HAIKU_BUILD_DECLARE_FUNCTION(void*, __alloca,
+       (_HAIKU_BUILD_FEATURE___SIZE_TYPE__ __size))
+_HAIKU_BUILD_DECLARE_FUNCTION(void*, alloca,
+       (_HAIKU_BUILD_FEATURE___SIZE_TYPE__ __size))
+
+#ifdef __cplusplus
+}
+#endif
+
+#define        _haiku_build___alloca(size)     __builtin_alloca (size)
+#define _haiku_build_alloca(size)      _haiku_build___alloca (size)
+
+#ifndef _HAIKU_BUILD_LIBROOT_FUNCTION_WRAPPER
+#      define __alloca(size)                   _haiku_build___alloca (size)
+#      define alloca(size)                             _haiku_build_alloca 
(size)
+#endif /* _HAIKU_BUILD_LIBROOT_FUNCTION_WRAPPER */
+
+#endif /* _ALLOCA_H */
diff --git a/headers/build/posix_target/target_div_t.h 
b/headers/build/posix_target/target_div_t.h
new file mode 100644
index 0000000..cc84c41
--- /dev/null
+++ b/headers/build/posix_target/target_div_t.h
@@ -0,0 +1,24 @@
+/*
+ * Copyright 2002-2012 Haiku, Inc. All Rights Reserved.
+ * Distributed under the terms of the MIT License.
+ */
+#ifndef _DIV_T_H_
+#define _DIV_T_H_
+
+
+typedef struct {
+       int     quot;
+       int     rem;
+} _HAIKU_BUILD_IDENTIFIER(div_t);
+
+typedef struct {
+       long quot;
+       long rem;
+} _HAIKU_BUILD_IDENTIFIER(ldiv_t);
+
+typedef struct {
+       long long quot;
+       long long rem;
+} _HAIKU_BUILD_IDENTIFIER(lldiv_t);
+
+#endif /* _DIV_T_H_ */
diff --git a/headers/build/posix_target/target_wchar_t.h 
b/headers/build/posix_target/target_wchar_t.h
new file mode 100644
index 0000000..83acab5
--- /dev/null
+++ b/headers/build/posix_target/target_wchar_t.h
@@ -0,0 +1,9 @@
+/*
+ * Copyright 2008-2012 Haiku, Inc. All Rights Reserved.
+ * Distributed under the terms of the MIT License.
+ */
+
+
+/* Include GCC's stddef.h. It defines wchar_t. */
+/* NOTE: Included by HaikuHostBuildConfig.h */
+//#include <stddef.h>


Other related posts: