summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-05-18 09:12:27 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-05-18 09:12:27 +0000
commitf9c63857f83cbd427b0b0e57f28c20b1322f78ae (patch)
tree26789ad88816aa387f774836b31222d0b40da4e4 /ext
parent41c6972dd515d42a321ce0dbd329b1aec5fe5185 (diff)
BeOS patches
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/extmk.rb.in4
-rw-r--r--ext/socket/extconf.rb5
-rw-r--r--ext/socket/socket.c6
3 files changed, 9 insertions, 6 deletions
diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in
index a788030eb2..fabfc4443b 100644
--- a/ext/extmk.rb.in
+++ b/ext/extmk.rb.in
@@ -355,7 +355,7 @@ def extmake(target)
return if $nodynamic and not $static
$objs = nil
- $libs = PLATFORM =~ /cygwin32/ ? nil : "-lc"
+ $libs = PLATFORM =~ /cygwin32|beos/ ? nil : "-lc"
$local_libs = nil # to be assigned in extconf.rb
$CFLAGS = nil
$LDFLAGS = nil
@@ -485,7 +485,7 @@ if $extlist.size > 0
end
$extobjs = "ext/extinit.o " + $extobjs
- if PLATFORM == "m68k-human"
+ if PLATFORM =~ /m68k-human|beos/
$extlibs.gsub!("-L/usr/local/lib", "") if $extlibs
end
system format('make ruby@binsuffix@ EXTOBJS="%s" EXTLIBS="%s"', $extobjs, $extlibs)
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb
index 80bd74338c..dbba2cacf3 100644
--- a/ext/socket/extconf.rb
+++ b/ext/socket/extconf.rb
@@ -1,11 +1,14 @@
require 'mkmf'
-$LDFLAGS = "-L/usr/local/lib"
+$LDFLAGS = "-L/usr/local/lib" if File.directory?("/usr/local/lib")
case PLATFORM
when /mswin32/
test_func = "WSACleanup"
have_library("wsock32", "WSACleanup")
when /cygwin32/
test_func = "socket"
+when /beos/
+ test_func = "socket"
+ have_library("net", "socket")
else
test_func = "socket"
have_library("socket", "socket")
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index 07de964188..39b4efa34e 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -1167,7 +1167,7 @@ static VALUE
sock_s_socketpair(class, domain, type, protocol)
VALUE class, domain, type, protocol;
{
-#if !defined(NT)
+#if !defined(NT) && !defined(__BEOS__)
int fd;
int d, t, sp[2];
@@ -1368,9 +1368,9 @@ sock_s_gethostbyaddr(argc, argv)
struct sockaddr_in *addr;
struct hostent *h;
- rb_scan_args(argc, argv, "11", &addr, &type);
+ rb_scan_args(argc, argv, "11", &addr, &vtype);
Check_Type(addr, T_STRING);
- if (!NIL_P(type)) {
+ if (!NIL_P(vtype)) {
type = NUM2INT(vtype);
}
else {