<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/ruby/1.8/syslog.rb</filename>
    </added>
    <added>
      <filename>lib/ruby/site_ruby/1.8/ffi/platform/darwin/platform.conf</filename>
    </added>
    <added>
      <filename>lib/ruby/site_ruby/1.8/ffi/platform/darwin/types.conf</filename>
    </added>
    <added>
      <filename>lib/ruby/site_ruby/1.8/ffi/platform/syslog.rb</filename>
    </added>
    <added>
      <filename>lib/ruby/site_ruby/1.8/ffi/tools/Rakefile</filename>
    </added>
    <added>
      <filename>lib/ruby/site_ruby/1.8/ffi/tools/platform.rake</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -204,10 +204,44 @@ module JFFI
 
   # Use for a C struct with a char [] embedded inside.
   add_typedef(NativeType::CHAR_ARRAY, :char_array)
-  
+
+  # Load all the platform dependent types/consts/struct members
+  class Config
+    CONFIG = Hash.new
+    begin
+      File.open(File.join(Platform::CONF_DIR, 'platform.conf'), &quot;r&quot;) do |f|
+        typedef = &quot;rbx.platform.typedef.&quot;
+        f.each_line { |line|
+          if line.index(typedef) == 0
+            new_type, orig_type = line.chomp.slice(typedef.length..-1).split(/\s*=\s*/)
+            JFFI.add_typedef(orig_type.to_sym, new_type.to_sym)
+          else
+            key, value = line.chomp.split(/\s*=\s*/)
+            puts &quot;key=#{key} value=#{value}&quot;
+            CONFIG[key] = value
+          end
+        }
+      end
+    rescue Errno::ENOENT
+    end
+    def self.[](name)
+
+    end
+  end
   # Load all the platform dependent types
-  require &quot;ffi/platform/#{Config::CONFIG['host_os']}&quot;
-  PlatformTypes.each_pair { |k, v| add_typedef(v.to_sym, k.to_sym) }
+  begin
+    File.open(File.join(Platform::CONF_DIR, 'types.conf'), &quot;r&quot;) do |f|
+      prefix = &quot;rbx.platform.typedef.&quot;
+      f.each_line { |line|
+        if line.index(prefix) == 0
+          new_type, orig_type = line.chomp.slice(prefix.length..-1).split(/\s*=\s*/)
+#          puts &quot;new type=#{new_type} orig_type=#{orig_type}&quot;
+          add_typedef(orig_type.to_sym, new_type.to_sym)
+        end
+      }
+    end
+  rescue Errno::ENOENT
+  end
   
   TypeSizes = {
     1 =&gt; :char,
@@ -583,7 +617,7 @@ class FFI::Struct &lt; JFFI::BaseStruct
   end
 
   def self.config(base, *fields)
-    config = Config::CONFIG
+    config = JFFI::Config::CONFIG
     @size = config[&quot;#{base}.sizeof&quot;]
     
     builder = JFFI::StructLayoutBuilder.new</diff>
      <filename>lib/ruby/site_ruby/1.8/ffi/ffi.rb</filename>
    </modified>
    <modified>
      <diff>@@ -41,5 +41,13 @@ module JFFI
     IS_SOLARIS = OS_NAME_LC.index(SOLARIS) == 0
     IS_BSD = IS_MAC || IS_FREEBSD
     ARCH = java.lang.System.getProperty(&quot;os.arch&quot;)
+    NAME = if IS_WINDOWS
+      &quot;#{ARCH}-windows&quot;
+    elsif IS_MAC
+      &quot;darwin&quot;
+    elsif IS_FREEBSD
+      &quot;#{ARCH}-freebsd&quot;
+    end
+    CONF_DIR = File.join(File.dirname(__FILE__), &quot;platform&quot;, NAME)
   end
 end
\ No newline at end of file</diff>
      <filename>lib/ruby/site_ruby/1.8/ffi/platform.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>5745080d137e5a19f3a09ee82828725242240dad</id>
    </parent>
  </parents>
  <author>
    <name>wmeissner</name>
    <email>wmeissner@961051c9-f516-0410-bf72-c9f7e237a7b7</email>
  </author>
  <url>http://github.com/vvs/jruby/commit/f0be9bbac71daf73dee5b7ab235c745fa1b75759</url>
  <id>f0be9bbac71daf73dee5b7ab235c745fa1b75759</id>
  <committed-date>2008-07-23T05:02:45-07:00</committed-date>
  <authored-date>2008-07-23T05:02:45-07:00</authored-date>
  <message>Merge branch 'ffi'

git-svn-id: https://svn.codehaus.org/jruby/trunk/jruby@7271 961051c9-f516-0410-bf72-c9f7e237a7b7</message>
  <tree>ca42a9c23215d38fa581f073e38966ecc8bba9c9</tree>
  <committer>
    <name>wmeissner</name>
    <email>wmeissner@961051c9-f516-0410-bf72-c9f7e237a7b7</email>
  </committer>
</commit>
