From d932d5f29b0bf671ab1689c9594b876b72c31f1d Mon Sep 17 00:00:00 2001 From: "hyunghwan.chung" Date: Sat, 3 Nov 2018 11:38:32 +0000 Subject: [PATCH] changed the way to include some header files in main.c --- moo/lib/main.c | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/moo/lib/main.c b/moo/lib/main.c index 89a80a9..13710a1 100644 --- a/moo/lib/main.c +++ b/moo/lib/main.c @@ -101,6 +101,21 @@ # include # include +# include +# include +# include +# include + + /* TODO: a lot to do */ + +#elif defined(vms) || defined(__vms) +# define __NEW_STARLET 1 +# include /* (SYS$...) */ +# include /* (SS$...) */ +# include /* (lib$...) */ + + /* TODO: a lot to do */ + #else # include # include @@ -1017,25 +1032,7 @@ static void assert_fail (moo_t* moo, const moo_bch_t* expr, const moo_bch_t* fil #else /* defined(MOO_BUILD_RELEASE) */ #if defined(MOO_ENABLE_LIBUNWIND) -# include -#elif defined(HAVE_EXECINFO_H) -# include -# include -#endif - -#if defined(vms) || defined(__vms) -# define __NEW_STARLET 1 -# include /* (SYS$...) */ -# include /* (SS$...) */ -# include /* (lib$...) */ -#elif defined(macintosh) -# include -# include -# include -# include -#endif - -#if defined(MOO_ENABLE_LIBUNWIND) +#include static void backtrace_stack_frames (moo_t* moo) { unw_cursor_t cursor; @@ -1065,6 +1062,7 @@ static void backtrace_stack_frames (moo_t* moo) } } #elif defined(HAVE_BACKTRACE) +#include static void backtrace_stack_frames (moo_t* moo) { void* btarray[128]; @@ -1090,7 +1088,7 @@ static void backtrace_stack_frames (moo_t* moo) { /* do nothing. not supported */ } -#endif +#endif /* defined(MOO_ENABLE_LIBUNWIND) */ static void assert_fail (moo_t* moo, const moo_bch_t* expr, const moo_bch_t* file, moo_oow_t line) {