----Next_Part(Fri_Apr_22_10_23_40_2005_706)--
Content-Type: Multipart/Mixed;
 boundary-Next_Part(Fri_Apr_22_10_23_40_2005_706)--"

----Next_Part(Fri_Apr_22_10_23_40_2005_706)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi,

In <aea328ab0504200722376b8b94 / mail.gmail.com>
  "Win32: Ruby & APR; build problems for Ruby Subversion SWIG bindings" on Wed, 20 Apr 2005 23:23:14 +0900,
  Erik Huelsmann <ehuels / gmail.com> wrote:

> Having taken upon me the task to provide a Windows build for
> Subversion, I run into a problem with the Ruby SWIG bindings. The
> problem is with APR and Ruby Win32 header files though.
> 
> Windows does not define pid_t, gid_t or uid_t in any of the system
> headers. Both APR and Ruby *do* define these 3 types:

Does this patch solve the problem?

--
kou

----Next_Part(Fri_Apr_22_10_23_40_2005_706)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="svn-pid_t.diff"

Index: subversion/bindings/swig/core.i
--- subversion/bindings/swig/core.i	(revision 14394)
+++ subversion/bindings/swig/core.i	(working copy)
@@ -27,6 +27,11 @@
 %include typemaps.i
 
 %{
+#ifdef RUBY_WIN32_H
+#undef UIDTYPE
+#undef GIDTYPE
+#undef pid_t
+#endif
 #include <apr.h>
 #include <apr_general.h>
 
Index: subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h
--- subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h	(revision 14394)
+++ subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h	(working copy)
@@ -1,15 +1,15 @@
 #ifndef SVN_SWIG_SWIGUTIL_RB_H
 #define SVN_SWIG_SWIGUTIL_RB_H
 
-#include <ruby.h>
-#include <regex.h>
-
 #include <apr.h>
 #include <apr_pools.h>
 #include <apr_hash.h>
 #include <apr_portable.h>
 #include <apr_file_io.h>
 
+#include <ruby.h>
+#include <regex.h>
+
 #include "svn_types.h"
 #include "svn_string.h"
 #include "svn_delta.h"
Index: subversion/bindings/swig/svn_client.i
--- subversion/bindings/swig/svn_client.i	(revision 14394)
+++ subversion/bindings/swig/svn_client.i	(working copy)
@@ -312,6 +312,12 @@
 
 #ifdef SWIGRUBY
 %runtime %{
+  #ifdef RUBY_WIN32_H
+  #undef UIDTYPE
+  #undef GIDTYPE
+  #undef pid_t
+  #endif
+  
   #include <apr.h>
   #include <apr_pools.h>
 

----Next_Part(Fri_Apr_22_10_23_40_2005_706)----
----Next_Part(Fri_Apr_22_10_23_40_2005_706)----