changed the way to include some header files in main.c

This commit is contained in:
hyunghwan.chung 2018-11-03 11:38:32 +00:00
parent 8ddc835503
commit d932d5f29b

View File

@ -101,6 +101,21 @@
# include <OSUtils.h> # include <OSUtils.h>
# include <Timer.h> # include <Timer.h>
# include <MacErrors.h>
# include <Process.h>
# include <Dialogs.h>
# include <TextUtils.h>
/* TODO: a lot to do */
#elif defined(vms) || defined(__vms)
# define __NEW_STARLET 1
# include <starlet.h> /* (SYS$...) */
# include <ssdef.h> /* (SS$...) */
# include <lib$routines.h> /* (lib$...) */
/* TODO: a lot to do */
#else #else
# include <sys/types.h> # include <sys/types.h>
# include <unistd.h> # include <unistd.h>
@ -1018,24 +1033,6 @@ static void assert_fail (moo_t* moo, const moo_bch_t* expr, const moo_bch_t* fil
#if defined(MOO_ENABLE_LIBUNWIND) #if defined(MOO_ENABLE_LIBUNWIND)
#include <libunwind.h> #include <libunwind.h>
#elif defined(HAVE_EXECINFO_H)
# include <execinfo.h>
# include <stdlib.h>
#endif
#if defined(vms) || defined(__vms)
# define __NEW_STARLET 1
# include <starlet.h> /* (SYS$...) */
# include <ssdef.h> /* (SS$...) */
# include <lib$routines.h> /* (lib$...) */
#elif defined(macintosh)
# include <MacErrors.h>
# include <Process.h>
# include <Dialogs.h>
# include <TextUtils.h>
#endif
#if defined(MOO_ENABLE_LIBUNWIND)
static void backtrace_stack_frames (moo_t* moo) static void backtrace_stack_frames (moo_t* moo)
{ {
unw_cursor_t cursor; unw_cursor_t cursor;
@ -1065,6 +1062,7 @@ static void backtrace_stack_frames (moo_t* moo)
} }
} }
#elif defined(HAVE_BACKTRACE) #elif defined(HAVE_BACKTRACE)
#include <execinfo.h>
static void backtrace_stack_frames (moo_t* moo) static void backtrace_stack_frames (moo_t* moo)
{ {
void* btarray[128]; void* btarray[128];
@ -1090,7 +1088,7 @@ static void backtrace_stack_frames (moo_t* moo)
{ {
/* do nothing. not supported */ /* 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) static void assert_fail (moo_t* moo, const moo_bch_t* expr, const moo_bch_t* file, moo_oow_t line)
{ {