summaryrefslogtreecommitdiff
path: root/include/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'include/ruby')
-rw-r--r--include/ruby/ruby.h9
-rw-r--r--include/ruby/win32.h2
2 files changed, 10 insertions, 1 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index 8947549f55..b6039fb366 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -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);
diff --git a/include/ruby/win32.h b/include/ruby/win32.h
index 9f5ccf8889..02021f19d9 100644
--- a/include/ruby/win32.h
+++ b/include/ruby/win32.h
@@ -204,7 +204,7 @@ struct timezone {
#undef isascii
#define isascii __isascii
#endif
-extern void NtInitialize(int *, char ***);
+#define NtInitialize ruby_sysinit
extern int rb_w32_cmdvector(const char *, char ***);
extern rb_pid_t rb_w32_pipe_exec(const char *, const char *, int, int *);
extern int flock(int fd, int oper);