Advertisement
Guest User

Untitled

a guest
Mar 27th, 2017
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.78 KB | None | 0 0
  1. diff --git a/nativelib/src/main/resources/unwind.c b/nativelib/src/main/resources/unwind.c
  2. index b87e730..f66f836 100644
  3. --- a/nativelib/src/main/resources/unwind.c
  4. +++ b/nativelib/src/main/resources/unwind.c
  5. @@ -1,19 +1,20 @@
  6. -#include <libunwind.h>
  7. +//#include <libunwind.h>
  8. +#include <stddef.h>
  9.  
  10. int scalanative_unwind_get_context(void *context) {
  11. - return unw_getcontext((unw_context_t*) context);
  12. + return 0;//unw_getcontext((unw_context_t*) context);
  13. }
  14.  
  15. int scalanative_unwind_init_local(void *cursor, void *context) {
  16. - return unw_init_local((unw_cursor_t*) cursor, (unw_context_t*) context);
  17. + return 0;//unw_init_local((unw_cursor_t*) cursor, (unw_context_t*) context);
  18. }
  19.  
  20. int scalanative_unwind_step(void *cursor) {
  21. - return unw_step((unw_cursor_t*) cursor);
  22. + return 0;//unw_step((unw_cursor_t*) cursor);
  23. }
  24.  
  25. int scalanative_unwind_get_proc_name(void *cursor, char *buffer,
  26. size_t length, void *offset) {
  27. - return unw_get_proc_name((unw_cursor_t*) cursor, buffer, length,
  28. - (unw_word_t*) offset);
  29. + return 0;//unw_get_proc_name((unw_cursor_t*) cursor, buffer, length,
  30. + //(unw_word_t*) offset);
  31. }
  32. diff --git a/nativelib/src/main/resources/wrap.c b/nativelib/src/main/resources/wrap.c
  33. index 0dbe813..2ac98d8 100644
  34. --- a/nativelib/src/main/resources/wrap.c
  35. +++ b/nativelib/src/main/resources/wrap.c
  36. @@ -4,6 +4,13 @@
  37. #include <math.h>
  38. #include <errno.h>
  39.  
  40. +# define MATH_ERRNO 1 /* errno set by math functions. */
  41. +# define MATH_ERREXCEPT 2 /* Exceptions raised by math functions. */
  42. +
  43. +# ifndef __FAST_MATH__
  44. +# define math_errhandling (MATH_ERRNO | MATH_ERREXCEPT)
  45. +# endif
  46. +
  47. // This file contains functions that wrap libc
  48. // built-in macros. We need this because Scala Native
  49. // can not expand C macros, and that's the easiest way to
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement