summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-29 08:45:24 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-29 08:45:24 +0000
commit400202f6a5b5f833b13ecc1b9b9628de05ea27a8 (patch)
treecaf9e474c3c55bae35e661a59cb3d83f6f52dfb5 /main.c
parent43c4d8093074e4d7c2639a7fd81c889739599b4d (diff)
downloadruby-400202f6a5b5f833b13ecc1b9b9628de05ea27a8.tar.gz
* 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
Diffstat (limited to 'main.c')
-rw-r--r--main.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/main.c b/main.c
index b5c5bb3351..e9d1bada5f 100644
--- a/main.c
+++ b/main.c
@@ -13,18 +13,7 @@
#undef RUBY_EXPORT
#include "ruby/ruby.h"
-#if defined(__MACOS__) && defined(__MWERKS__)
-#include <console.h>
-#endif
-
-/* to link startup code with ObjC support */
-#if (defined(__APPLE__) || defined(__NeXT__)) && defined(__MACH__)
-static void
-objcdummyfunction(void)
-{
- objc_msgSend();
-}
-#endif
+RUBY_GLOBAL_SETUP
int
main(int argc, char **argv, char **envp)
@@ -33,13 +22,8 @@ main(int argc, char **argv, char **envp)
extern void ruby_set_debug_option(const char *);
ruby_set_debug_option(getenv("RUBY_DEBUG"));
#endif
-#ifdef _WIN32
- NtInitialize(&argc, &argv);
-#endif
-#if defined(__MACOS__) && defined(__MWERKS__)
- argc = ccommand(&argv);
-#endif
+ ruby_sysinit(&argc, &argv);
{
RUBY_INIT_STACK;
ruby_init();