mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
BeOS patches
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
41c6972dd5
commit
f9c63857f8
10 changed files with 52 additions and 11 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
Mon May 18 16:40:50 1998 MAEDA shugo <shugo@aianet.ne.jp>
|
||||
|
||||
* error.c (get_syserr): BeOS support.
|
||||
|
||||
* configure.in: modified for BeOS.
|
||||
|
||||
* string.c (str_dump): do not call isascii().
|
||||
|
||||
* sprintf.c (remove_sign_bits): forgot to initialize end pointer.
|
||||
|
||||
* glob.c: #include <alloca.h> added.
|
||||
|
||||
Mon May 18 14:52:21 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
|
||||
|
||||
* experimental release 1.1b9_21.
|
||||
|
|
2
configure
vendored
2
configure
vendored
|
@ -3481,7 +3481,7 @@ echo "configure:3435: checking whether OS depend dynamic link works" >&5
|
|||
LDSHARED=''
|
||||
LDFLAGS='' ;;
|
||||
beos*) LDSHARED="mwld -xms"
|
||||
DLDFLAGS="-f ruby.exp"
|
||||
DLDFLAGS=""
|
||||
rb_cv_dlopen=yes ;;
|
||||
*) LDSHARED='ld' ;;
|
||||
esac
|
||||
|
|
|
@ -359,7 +359,7 @@ if test "$with_dln_a_out" != yes; then
|
|||
LDSHARED=''
|
||||
LDFLAGS='' ;;
|
||||
beos*) LDSHARED="mwld -xms"
|
||||
DLDFLAGS="-f ruby.exp"
|
||||
DLDFLAGS=""
|
||||
rb_cv_dlopen=yes ;;
|
||||
*) LDSHARED='ld' ;;
|
||||
esac
|
||||
|
|
21
error.c
21
error.c
|
@ -507,6 +507,27 @@ syserr_errno(self)
|
|||
return rb_iv_get(self, "errno");
|
||||
}
|
||||
|
||||
#ifdef __BEOS__
|
||||
static VALUE
|
||||
get_syserr(int i)
|
||||
{
|
||||
VALUE *list;
|
||||
int ix, offset;
|
||||
|
||||
i -= B_GENERAL_ERROR_BASE;
|
||||
ix = (i >> 12) & 0xf;
|
||||
offset = (i >> 8) & 0xf;
|
||||
if (offset < syserr_index[ix].n) {
|
||||
ix = syserr_index[ix].ix;
|
||||
if ((i & 0xff) < syserr_list[ix + offset].n) {
|
||||
list = syserr_list[ix + offset].list;
|
||||
return list[i & 0xff];
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif /* __BEOS__ */
|
||||
|
||||
static void init_syserr _((void));
|
||||
|
||||
void
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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 {
|
||||
|
|
6
glob.c
6
glob.c
|
@ -25,6 +25,10 @@
|
|||
#pragma alloca
|
||||
#endif /* _AIX && RISC6000 && !__GNUC__ */
|
||||
|
||||
#if defined (HAVE_ALLOCA_H)
|
||||
# include <alloca.h>
|
||||
#endif
|
||||
|
||||
#if defined (HAVE_UNISTD_H)
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
@ -72,7 +76,7 @@
|
|||
# include <strings.h>
|
||||
#endif /* !HAVE_STRING_H */
|
||||
|
||||
#if !defined (HAVE_BCOPY)
|
||||
#if !defined (HAVE_BCOPY) && !defined (bcopy)
|
||||
# define bcopy(s, d, n) ((void) memcpy ((d), (s), (n)))
|
||||
#endif /* !HAVE_BCOPY */
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ remove_sign_bits(str, base)
|
|||
char *s, *t, *end;
|
||||
|
||||
s = t = str;
|
||||
end = str + strlen(str);
|
||||
|
||||
if (base == 16) {
|
||||
x_retry:
|
||||
|
|
2
string.c
2
string.c
|
@ -1512,7 +1512,7 @@ str_dump(str)
|
|||
*q++ = '\\';
|
||||
*q++ = c;
|
||||
}
|
||||
else if (isascii(c) && isprint(c)) {
|
||||
else if (ISPRINT(c)) {
|
||||
*q++ = c;
|
||||
}
|
||||
else if (c == '\n') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue