diff --git a/hawk/lib/mod-sys.c b/hawk/lib/mod-sys.c index 7e64c38f..085f0dd6 100644 --- a/hawk/lib/mod-sys.c +++ b/hawk/lib/mod-sys.c @@ -3223,7 +3223,6 @@ static int fnc_utime (hawk_rtx_t* rtx, const hawk_fnc_info_t* fi) static int fnc_openmux (hawk_rtx_t* rtx, const hawk_fnc_info_t* fi) { -#if defined(USE_EPOLL) sys_list_t* sys_list; sys_node_t* sys_node = HAWK_NULL; hawk_int_t rx; @@ -3248,9 +3247,6 @@ static int fnc_openmux (hawk_rtx_t* rtx, const hawk_fnc_info_t* fi) } #endif } -#else - /* TODO: */ -#endif if (fd >= 0) { @@ -3269,19 +3265,17 @@ static int fnc_openmux (hawk_rtx_t* rtx, const hawk_fnc_info_t* fi) { rx = set_error_on_sys_list_with_errno(rtx, sys_list, HAWK_NULL); } +#else + rx = set_error_on_sys_list(rtx, sys_list, HAWK_ENOIMPL, HAWK_NULL); +#endif /*HAWK_ASSERT (HAWK_IN_QUICKINT_RANGE(rx));*/ hawk_rtx_setretval (rtx, hawk_rtx_makeintval(rtx, rx)); return 0; -#else - hawk_rtx_setretval (rtx, hawk_rtx_makeintval(rtx, ERRNUM_TO_RC(HAWK_ENOIMPL))); - return 0; -#endif } static int fnc_closemux (hawk_rtx_t* rtx, const hawk_fnc_info_t* fi) { -#if defined(USE_EPOLL) sys_list_t* sys_list; sys_node_t* sys_node; hawk_int_t rx = ERRNUM_TO_RC(HAWK_ENOERR); @@ -3293,10 +3287,6 @@ static int fnc_closemux (hawk_rtx_t* rtx, const hawk_fnc_info_t* fi) hawk_rtx_setretval (rtx, hawk_rtx_makeintval(rtx, rx)); return 0; -#else - hawk_rtx_setretval (rtx, hawk_rtx_makeintval(rtx, ERRNUM_TO_RC(HAWK_ENOIMPL))); - return 0; -#endif } #if defined(USE_EPOLL) diff --git a/hawk/lib/run.c b/hawk/lib/run.c index 41e66d36..8d5d35e7 100644 --- a/hawk/lib/run.c +++ b/hawk/lib/run.c @@ -1680,7 +1680,7 @@ hawk_val_t* hawk_rtx_execwithucstrarr (hawk_rtx_t* rtx, const hawk_uch_t* args[] #if defined(HAWK_ENABLE_GC) /* i assume this function is a usual hawk program starter. * call garbage collection after a whole program finishes */ - //hawk_rtx_gc (rtx); + hawk_rtx_gc (rtx); #endif return v; @@ -1697,7 +1697,7 @@ hawk_val_t* hawk_rtx_execwithbcstrarr (hawk_rtx_t* rtx, const hawk_bch_t* args[] #if defined(HAWK_ENABLE_GC) /* i assume this function is a usual hawk program starter. * call garbage collection after a whole program finishes */ - //hawk_rtx_gc (rtx); + hawk_rtx_gc (rtx); #endif return v; diff --git a/hawk/scripts/generrcode.awk b/hawk/scripts/generrcode.hawk similarity index 90% rename from hawk/scripts/generrcode.awk rename to hawk/scripts/generrcode.hawk index 2c672971..1ec1ead4 100644 --- a/hawk/scripts/generrcode.awk +++ b/hawk/scripts/generrcode.hawk @@ -1,7 +1,7 @@ # -# generrcode.awk +# generrcode.hawk # -# hawk -f generrcode.awk hawk-cmn.h +# hawk -f generrcode.hawk hawk-cmn.h # BEGIN { diff --git a/hawk/scripts/genoptcode.awk b/hawk/scripts/genoptcode.hawk similarity index 90% rename from hawk/scripts/genoptcode.awk rename to hawk/scripts/genoptcode.hawk index a460c4d4..463ca73e 100644 --- a/hawk/scripts/genoptcode.awk +++ b/hawk/scripts/genoptcode.hawk @@ -1,7 +1,7 @@ # -# genoptcode.awk +# genoptcode.hawk # -# hawk -f genoptcode.awk hawk.h +# hawk -f genoptcode.hawk hawk.h # BEGIN { diff --git a/hawk/scripts/tcp-proxy.awk b/hawk/scripts/tcp-proxy.hawk similarity index 100% rename from hawk/scripts/tcp-proxy.awk rename to hawk/scripts/tcp-proxy.hawk