1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* main.c (main): use platform-independent per-process initialization.

[ruby-dev:31900]

* ruby.c (ruby_sysinit): new function for per-process initialization.

* include/ruby/ruby.h (RUBY_GLOBAL_SETUP): toplevel setup declaration.

* include/ruby/win32.h, win32/mkexports.rb: alias NtInitialize
  ruby_sysinit.

* win32/win32.c (rb_w32_sysinit): renamed from NtInitialize.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2007-09-29 08:45:24 +00:00
parent 43c4d80930
commit 400202f6a5
7 changed files with 65 additions and 25 deletions

View file

@ -958,6 +958,15 @@ rb_special_const_p(VALUE obj)
static char *dln_libs_to_be_linked[] = { EXTLIB, 0 };
#endif
#if (defined(__APPLE__) || defined(__NeXT__)) && defined(__MACH__)
/* to link startup code with ObjC support */
#define RUBY_GLOBAL_SETUP static void objcdummyfunction(void) {objc_msgSend();}
#else
#define RUBY_GLOBAL_SETUP
#endif
void ruby_sysinit(int *, char ***);
#define RUBY_VM 1 /* YARV */
#define HAVE_NATIVETHREAD
int is_ruby_native_thread(void);