Skip to content

Commit

Permalink
auto_zone.h should not be exported
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@3191 23306eb0-4c56-4727-a40e-e92c0eb68959
  • Loading branch information
lrz committed Jan 6, 2010
1 parent 54a7b5d commit bb3089e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
File renamed without changes.
7 changes: 7 additions & 0 deletions gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
13 changes: 8 additions & 5 deletions include/ruby/ruby.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) \
Expand Down
5 changes: 3 additions & 2 deletions rakelib/headers.rake
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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.