changed configure.ac to reset DL_LIBS if it's set to 'none required'.

pushed down heap creation in hcl_init()
This commit is contained in:
hyunghwan.chung 2018-03-05 04:46:13 +00:00
parent f267374dea
commit 76a185aa66
3 changed files with 22 additions and 10 deletions

6
moo/configure vendored
View File

@ -19712,7 +19712,13 @@ $as_echo "$ac_cv_search_dlopen" >&6; }
ac_res=$ac_cv_search_dlopen ac_res=$ac_cv_search_dlopen
if test "$ac_res" != no; then : if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 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 fi
LIBS="$save_LIBS" LIBS="$save_LIBS"

View File

@ -177,7 +177,13 @@ AC_CHECK_FUNCS([accept4])
AC_CHECK_FUNCS([isatty]) AC_CHECK_FUNCS([isatty])
save_LIBS="$LIBS" 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" LIBS="$save_LIBS"
AC_SUBST(DL_LIBS) AC_SUBST(DL_LIBS)

View File

@ -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)); moo->log.ptr = moo_allocmem (moo, (moo->log.capa + 1) * MOO_SIZEOF(*moo->log.ptr));
if (!moo->log.ptr) goto oops; 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; if (moo_rbt_init (&moo->modtab, moo, MOO_SIZEOF(moo_ooch_t), 1) <= -1) goto oops;
modtab_inited = 1; modtab_inited = 1;
moo_rbt_setstyle (&moo->modtab, moo_getrbtstyle(MOO_RBT_STYLE_INLINE_COPIERS)); 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_first = -1;
moo->proc_map_free_last = -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; return 0;
oops: oops: