Permalink
Browse files

auto_zone.h should not be exported

git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@3191 23306eb0-4c56-4727-a40e-e92c0eb68959
  • Loading branch information...
1 parent 54a7b5d commit bb3089eb54f5773797cbf2ec289444f915984e06 @lrz lrz committed Jan 6, 2010
Showing with 18 additions and 7 deletions.
  1. 0 include/ruby/auto_zone.h → auto_zone_1060.h
  2. +7 −0 gc.c
  3. +8 −5 include/ruby/ruby.h
  4. +3 −2 rakelib/headers.rake
File renamed without changes.
View
7 gc.c
@@ -9,6 +9,13 @@
* Copyright (C) 2000 Information-technology Promotion Agency, Japan
*/
+#if HAVE_AUTO_ZONE_H
+# include <auto_zone.h>
+#else
+# include "auto_zone_1060.h"
+#endif
+#define AUTO_ZONE_INCLUDED 1
+
#include "ruby/ruby.h"
#include "ruby/signal.h"
#include "ruby/st.h"
View
@@ -84,11 +84,6 @@ extern "C" {
#include <assert.h>
#include <CoreFoundation/CoreFoundation.h>
-#if HAVE_AUTO_ZONE_H
-# include <auto_zone.h>
-#else
-# include "auto_zone.h"
-#endif
#if defined(HAVE_ALLOCA_H)
#include <alloca.h>
#else
@@ -1418,6 +1413,14 @@ rb_special_const_p(VALUE obj)
return Qfalse;
}
+#if !defined(__AUTO_ZONE__)
+# include <malloc/malloc.h>
+typedef void *auto_zone_t;
+boolean_t auto_zone_set_write_barrier(auto_zone_t *zone, const void *dest, const void *new_value);
+void auto_zone_add_root(auto_zone_t *zone, void *address_of_root_ptr, void *value);
+void auto_zone_retain(auto_zone_t *zone, void *ptr);
+unsigned int auto_zone_release(auto_zone_t *zone, void *ptr);
+#endif
extern auto_zone_t *__auto_zone;
#define GC_WB(dst, newval) \
View
@@ -6,7 +6,8 @@ task :config_h do
File.exist?(File.join(p, 'BridgeSupport.framework'))
end
new_config_h << "#define HAVE_BRIDGESUPPORT_FRAMEWORK #{flag ? 1 : 0}\n"
- flag = File.exist?('/usr/include/auto_zone.h')
+
+ flag = `sw_vers -productVersion`.strip.to_f <= 10.6 ? false : File.exist?('/usr/local/include/auto_zone.h')
new_config_h << "#define HAVE_AUTO_ZONE_H #{flag ? 1 : 0}\n"
new_config_h << "#define ENABLE_DEBUG_LOGGING 1\n" if ENABLE_DEBUG_LOGGING
new_config_h << "#define RUBY_PLATFORM \"#{NEW_RUBY_PLATFORM}\"\n"
@@ -76,4 +77,4 @@ task :revision_h do
f.print new_revision_h
end
end
-end
+end

0 comments on commit bb3089e

Please sign in to comment.