@@ -648,8 +648,6 @@ static rb_gc_function_map_t rb_gc_functions;
648
648
649
649
# define RUBY_GC_LIBRARY "RUBY_GC_LIBRARY"
650
650
651
- # define fatal (...) do {fprintf(stderr, "" __VA_ARGS__); return;} while (0)
652
-
653
651
static void
654
652
ruby_external_gc_init (void )
655
653
{
@@ -672,7 +670,8 @@ ruby_external_gc_init(void)
672
670
case '.' :
673
671
break ;
674
672
default :
675
- fatal ("Only alphanumeric, dash, underscore, and period is allowed in " RUBY_GC_LIBRARY "" );
673
+ fprintf (stderr , "Only alphanumeric, dash, underscore, and period is allowed in " RUBY_GC_LIBRARY "\n" );
674
+ exit (1 );
676
675
}
677
676
}
678
677
@@ -682,7 +681,8 @@ ruby_external_gc_init(void)
682
681
683
682
handle = dlopen (gc_so_path , RTLD_LAZY | RTLD_GLOBAL );
684
683
if (!handle ) {
685
- fatal ("ruby_external_gc_init: Shared library %s cannot be opened: %s" , gc_so_path , dlerror ());
684
+ fprintf (stderr , "ruby_external_gc_init: Shared library %s cannot be opened: %s\n" , gc_so_path , dlerror ());
685
+ exit (1 );
686
686
}
687
687
}
688
688
@@ -692,7 +692,8 @@ ruby_external_gc_init(void)
692
692
if (handle) { \
693
693
gc_functions.name = dlsym(handle, "rb_gc_impl_" #name); \
694
694
if (!gc_functions.name) { \
695
- fatal("ruby_external_gc_init: " #name " func not exported by library %s", gc_so_path); \
695
+ fprintf(stderr, "ruby_external_gc_init: " #name " func not exported by library %s\n", gc_so_path); \
696
+ exit(1); \
696
697
} \
697
698
} \
698
699
else { \
0 commit comments