前田です。

GNU Hurd 0.2上でrubyを動かしてみました。
ちょこちょこと修正して、一応ちゃんと動いているように見えますので、
パッチを付けておきます。

気になる点:

1.GNU Hurd用のマクロは__GNU__で良いのか?
  ちなみにCONFIG["host_os"]は"gnu0.2"で、__HURD__というマクロはな
  いようです。
  # でも__GNU__ってなんとなく__GNUC__とかと紛らわしいような...。

2.4/30のmkconfig.rbの36行目の変更

-      val.sub(/^\s*(.*)\s*$/, '"\1"').gsub(/\$[{(]?([^})]+)[})]?/) {
+      val.sub(/^\s*(.*)\s*$/, '"\1"').gsub(/\$\{?([^(){}]+)\}?/) {

  で()を外しているのはなぜでしょう。
  これだとrbconfig.rbが、

  CONFIG["LIBRUBY_A"] = "lib$(RUBY_INSTALL_NAME).a"

  のようになってしまいます。
  とりあえず、/\$[{(]?([^(){}]+)[})]?/にしておきました。

-- 
前田 修吾

=== cd /hurd/home/shugo/ruby/ === /usr/bin/cvs diff -u configure.in dir.c dln.c file.c io.c mkconfig.rb Index: configure.in =================================================================== RCS file: /home/cvs/ruby/configure.in,v retrieving revision 1.1.1.2.2.17 diff -u -r1.1.1.2.2.17 configure.in --- configure.in 1999/04/30 07:55:45 1.1.1.2.2.17 +++ configure.in 1999/05/06 01:05:31 @@ -359,6 +359,10 @@ else LDFLAGS="-rdynamic" fi;; + + gnu*) + LDFLAGS="-rdynamic" + ;; esac AC_SUBST(DLDFLAGS)dnl @@ -456,6 +460,8 @@ human*) DLDFLAGS='' LDSHARED='' LDFLAGS='' + rb_cv_dlopen=yes ;; + gnu*) LDSHARED="gcc -shared" rb_cv_dlopen=yes ;; beos*) case "$host_cpu" in powerpc*) Index: dir.c =================================================================== RCS file: /home/cvs/ruby/dir.c,v retrieving revision 1.1.1.3.2.2 diff -u -r1.1.1.3.2.2 dir.c --- dir.c 1999/04/09 17:57:37 1.1.1.3.2.2 +++ dir.c 1999/05/06 01:05:31 @@ -15,7 +15,7 @@ #include <sys/types.h> #include <sys/stat.h> -#ifdef HAVE_SYS_PARAM_H +#if defined(HAVE_SYS_PARAM_H) && !defined(__GNU__) # include <sys/param.h> #else # define MAXPATHLEN 1024 Index: dln.c =================================================================== RCS file: /home/cvs/ruby/dln.c,v retrieving revision 1.1.1.3.2.7 diff -u -r1.1.1.3.2.7 dln.c --- dln.c 1999/04/30 07:55:46 1.1.1.3.2.7 +++ dln.c 1999/05/06 01:05:31 @@ -45,7 +45,7 @@ #include <sys/types.h> #include <sys/stat.h> -#ifdef HAVE_SYS_PARAM_H +#if defined(HAVE_SYS_PARAM_H) && !defined(__GNU__) # include <sys/param.h> #else # define MAXPATHLEN 1024 Index: file.c =================================================================== RCS file: /home/cvs/ruby/file.c,v retrieving revision 1.1.1.3.2.7 diff -u -r1.1.1.3.2.7 file.c --- file.c 1999/04/09 17:57:39 1.1.1.3.2.7 +++ file.c 1999/05/06 01:05:31 @@ -22,7 +22,7 @@ #include <unistd.h> #endif -#ifdef HAVE_SYS_PARAM_H +#if defined(HAVE_SYS_PARAM_H) && !defined(__GNU__) # include <sys/param.h> #else # define MAXPATHLEN 1024 Index: io.c =================================================================== RCS file: /home/cvs/ruby/io.c,v retrieving revision 1.1.1.3.2.13 diff -u -r1.1.1.3.2.13 io.c --- io.c 1999/04/26 09:42:31 1.1.1.3.2.13 +++ io.c 1999/05/06 01:05:31 @@ -41,7 +41,7 @@ #include <sys/stat.h> /* EMX has sys/parm.h, but.. */ -#if defined(HAVE_SYS_PARAM_H) && !defined(__EMX__) +#if defined(HAVE_SYS_PARAM_H) && !defined(__EMX__) && !defined(__GNU__) # include <sys/param.h> #else # define NOFILE 64 @@ -101,6 +101,8 @@ # endif #elif defined(FILE_COUNT) # define READ_DATA_PENDING(fp) ((fp)->FILE_COUNT > 0) +#elif defined(__GNU__) +# define READ_DATA_PENDING(fp) (fp->__eof == 0) #elif defined(__BEOS__) # define ReadDataPending(fp) (fp->_state._eof == 0) #elif defined(USE_CWGUSI) Index: mkconfig.rb =================================================================== RCS file: /home/cvs/ruby/mkconfig.rb,v retrieving revision 1.1.1.2.2.4 diff -u -r1.1.1.2.2.4 mkconfig.rb --- mkconfig.rb 1999/04/30 07:55:46 1.1.1.2.2.4 +++ mkconfig.rb 1999/05/06 01:05:31 @@ -33,7 +33,7 @@ val = $2 || "" next if name =~ /^(INSTALL|DEFS|configure_input|srcdir|top_srcdir)$/ v = " CONFIG[\"" + name + "\"] = " + - val.sub(/^\s*(.*)\s*$/, '"\1"').gsub(/\$\{?([^(){}]+)\}?/) { + val.sub(/^\s*(.*)\s*$/, '"\1"').gsub(/\$[{(]?([^(){}]+)[})]?/) { "\#{CONFIG[\\\"#{$1}\\\"]}" } + "\n" if fast[name] === Exit status: 1 === cd /hurd/home/shugo/ruby/ext/socket/ === /usr/bin/cvs diff -u getaddrinfo.c sockport.h Index: getaddrinfo.c =================================================================== RCS file: /home/cvs/ruby/ext/socket/Attic/getaddrinfo.c,v retrieving revision 1.1.2.2 diff -u -r1.1.2.2 getaddrinfo.c --- getaddrinfo.c 1999/04/30 15:16:44 1.1.2.2 +++ getaddrinfo.c 1999/05/06 01:05:33 @@ -40,7 +40,9 @@ #include <sys/types.h> #include <sys/param.h> +#ifndef __GNU__ #include <sys/sysctl.h> +#endif #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> Index: sockport.h =================================================================== RCS file: /home/cvs/ruby/ext/socket/Attic/sockport.h,v retrieving revision 1.1.2.1 diff -u -r1.1.2.1 sockport.h --- sockport.h 1999/04/30 15:16:45 1.1.2.1 +++ sockport.h 1999/05/06 01:05:33 @@ -12,7 +12,7 @@ #define SOCKCOMM_H #ifndef SA_LEN -# ifdef HAVE_SA_LEN +# if defined(HAVE_SA_LEN) && !defined(__GNU__) # define SA_LEN(sa) (sa)->sin_len # else # ifdef INET6 @@ -26,7 +26,7 @@ # endif #endif -#ifdef HAVE_SA_LEN +#if defined(HAVE_SA_LEN) && !defined(__GNU__) # define SET_SA_LEN(sa, len) (sa)->sin_len = (len) #else # define SET_SA_LEN(sa, len) (len) === Exit status: 1