diff --git a/pkgs/ruby/ext/default/extconf.rb b/pkgs/ruby/ext/default/extconf.rb index cfb3400..6da3d37 100644 --- a/pkgs/ruby/ext/default/extconf.rb +++ b/pkgs/ruby/ext/default/extconf.rb @@ -11,6 +11,10 @@ unless have_var 'kernaux_assert_cb', 'kernaux.h' raise 'kernaux_assert_cb not found' end +# Package "cmdline" +have_func 'kernaux_cmdline' + +# Package "ntoa" have_func 'kernaux_utoa' have_func 'kernaux_itoa' have_func 'kernaux_utoa2' @@ -22,14 +26,14 @@ have_func 'kernaux_itoa10' have_func 'kernaux_utoa16' have_func 'kernaux_itoa16' +# Package "printf" have_func 'kernaux_snprintf' +# Package "printf-fmt" # TODO: do something if not found? have_func 'KernAux_PrintfFmt_Spec_create' have_func 'KernAux_PrintfFmt_Spec_parse' have_func 'KernAux_PrintfFmt_Spec_set_width' have_func 'KernAux_PrintfFmt_Spec_set_precision' -have_func 'kernaux_cmdline' - raise 'can\'t create Makefile' unless create_makefile 'kernaux/default' diff --git a/pkgs/ruby/ext/default/main.c b/pkgs/ruby/ext/default/main.c index 422115f..d9f405e 100644 --- a/pkgs/ruby/ext/default/main.c +++ b/pkgs/ruby/ext/default/main.c @@ -8,21 +8,21 @@ void init_assert(); void init_ntoa(); -#ifdef HAVE_KERNAUX_SNPRINTF -void init_printf(); -#endif // HAVE_KERNAUX_SNPRINTF #ifdef HAVE_KERNAUX_CMDLINE void init_cmdline(); #endif // HAVE_KERNAUX_CMDLINE +#ifdef HAVE_KERNAUX_SNPRINTF +void init_printf(); +#endif // HAVE_KERNAUX_SNPRINTF void Init_default() { init_assert(); init_ntoa(); -#ifdef HAVE_KERNAUX_SNPRINTF - init_printf(); -#endif // HAVE_KERNAUX_SNPRINTF #ifdef HAVE_KERNAUX_CMDLINE init_cmdline(); #endif // HAVE_KERNAUX_CMDLINE +#ifdef HAVE_KERNAUX_SNPRINTF + init_printf(); +#endif // HAVE_KERNAUX_SNPRINTF }