Created
March 27, 2017 15:43
-
-
Save ttldtor/b986f5f2ad0632640d56761cf1e74089 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/nativelib/src/main/resources/unwind.c b/nativelib/src/main/resources/unwind.c | |
index b87e730..f66f836 100644 | |
--- a/nativelib/src/main/resources/unwind.c | |
+++ b/nativelib/src/main/resources/unwind.c | |
@@ -1,19 +1,20 @@ | |
-#include <libunwind.h> | |
+//#include <libunwind.h> | |
+#include <stddef.h> | |
int scalanative_unwind_get_context(void *context) { | |
- return unw_getcontext((unw_context_t*) context); | |
+ return 0;//unw_getcontext((unw_context_t*) context); | |
} | |
int scalanative_unwind_init_local(void *cursor, void *context) { | |
- return unw_init_local((unw_cursor_t*) cursor, (unw_context_t*) context); | |
+ return 0;//unw_init_local((unw_cursor_t*) cursor, (unw_context_t*) context); | |
} | |
int scalanative_unwind_step(void *cursor) { | |
- return unw_step((unw_cursor_t*) cursor); | |
+ return 0;//unw_step((unw_cursor_t*) cursor); | |
} | |
int scalanative_unwind_get_proc_name(void *cursor, char *buffer, | |
size_t length, void *offset) { | |
- return unw_get_proc_name((unw_cursor_t*) cursor, buffer, length, | |
- (unw_word_t*) offset); | |
+ return 0;//unw_get_proc_name((unw_cursor_t*) cursor, buffer, length, | |
+ //(unw_word_t*) offset); | |
} | |
diff --git a/nativelib/src/main/resources/wrap.c b/nativelib/src/main/resources/wrap.c | |
index 0dbe813..2ac98d8 100644 | |
--- a/nativelib/src/main/resources/wrap.c | |
+++ b/nativelib/src/main/resources/wrap.c | |
@@ -4,6 +4,13 @@ | |
#include <math.h> | |
#include <errno.h> | |
+# define MATH_ERRNO 1 /* errno set by math functions. */ | |
+# define MATH_ERREXCEPT 2 /* Exceptions raised by math functions. */ | |
+ | |
+# ifndef __FAST_MATH__ | |
+# define math_errhandling (MATH_ERRNO | MATH_ERREXCEPT) | |
+# endif | |
+ | |
// This file contains functions that wrap libc | |
// built-in macros. We need this because Scala Native | |
// can not expand C macros, and that's the easiest way to |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment