From 76a185aa66eab55637f946354bf6b3992c73f7df Mon Sep 17 00:00:00 2001 From: "hyunghwan.chung" Date: Mon, 5 Mar 2018 04:46:13 +0000 Subject: [PATCH] changed configure.ac to reset DL_LIBS if it's set to 'none required'. pushed down heap creation in hcl_init() --- moo/configure | 8 +++++++- moo/configure.ac | 8 +++++++- moo/lib/moo.c | 16 ++++++++-------- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/moo/configure b/moo/configure index b4ccea9..42d4c9d 100755 --- a/moo/configure +++ b/moo/configure @@ -19712,7 +19712,13 @@ $as_echo "$ac_cv_search_dlopen" >&6; } ac_res=$ac_cv_search_dlopen if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - DL_LIBS="$ac_cv_search_dlopen" + + DL_LIBS="$ac_cv_search_dlopen" + if test "x${DL_LIBS}" = "xnone required" + then + DL_LIBS="" + fi + fi LIBS="$save_LIBS" diff --git a/moo/configure.ac b/moo/configure.ac index 47304b2..0cf2952 100644 --- a/moo/configure.ac +++ b/moo/configure.ac @@ -177,7 +177,13 @@ AC_CHECK_FUNCS([accept4]) AC_CHECK_FUNCS([isatty]) save_LIBS="$LIBS" -AC_SEARCH_LIBS([dlopen], [dl dld], [DL_LIBS="$ac_cv_search_dlopen"]) +AC_SEARCH_LIBS([dlopen], [dl dld], [ + DL_LIBS="$ac_cv_search_dlopen" + if test "x${DL_LIBS}" = "xnone required" + then + DL_LIBS="" + fi +]) LIBS="$save_LIBS" AC_SUBST(DL_LIBS) diff --git a/moo/lib/moo.c b/moo/lib/moo.c index d2e7f89..2bcc2c6 100644 --- a/moo/lib/moo.c +++ b/moo/lib/moo.c @@ -127,14 +127,6 @@ int moo_init (moo_t* moo, moo_mmgr_t* mmgr, moo_oow_t heapsz, const moo_vmprim_t moo->log.ptr = moo_allocmem (moo, (moo->log.capa + 1) * MOO_SIZEOF(*moo->log.ptr)); if (!moo->log.ptr) goto oops; -/* TODO: introduce a permanent heap */ - /*moo->permheap = moo_makeheap (moo, what is the best size???); - if (!moo->permheap) goto oops; */ - moo->curheap = moo_makeheap (moo, heapsz); - if (!moo->curheap) goto oops; - moo->newheap = moo_makeheap (moo, heapsz); - if (!moo->newheap) goto oops; - if (moo_rbt_init (&moo->modtab, moo, MOO_SIZEOF(moo_ooch_t), 1) <= -1) goto oops; modtab_inited = 1; moo_rbt_setstyle (&moo->modtab, moo_getrbtstyle(MOO_RBT_STYLE_INLINE_COPIERS)); @@ -149,6 +141,14 @@ int moo_init (moo_t* moo, moo_mmgr_t* mmgr, moo_oow_t heapsz, const moo_vmprim_t moo->proc_map_free_first = -1; moo->proc_map_free_last = -1; +/* TODO: introduce a permanent heap */ + /*moo->permheap = moo_makeheap (moo, what is the best size???); + if (!moo->permheap) goto oops; */ + moo->curheap = moo_makeheap (moo, heapsz); + if (!moo->curheap) goto oops; + moo->newheap = moo_makeheap (moo, heapsz); + if (!moo->newheap) goto oops; + return 0; oops: