1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

better AIX support

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 1999-04-27 02:56:30 +00:00
parent e67e5adf4e
commit e975828471
11 changed files with 1260 additions and 15 deletions

View file

@ -1,5 +1,11 @@
Mon Apr 26 16:46:59 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
* ext/extmk.rb.in: AIX shared library support modified.
* ext/aix_mksym.rb: ditto.
* configure.in: ditto.
* sprintf.c (rb_f_sprintf): should allocate proper sized buffer
for float numbers.

View file

@ -13,8 +13,7 @@ AUTOCONF = autoconf
prefix = @prefix@
CFLAGS = @CFLAGS@ -I. -I@srcdir@ -I@includedir@
LDFLAGS = @STATIC@ $(CFLAGS) @LDFLAGS@
XLDFLAGS = @XLDFLAGS@
LDFLAGS = @STATIC@ $(CFLAGS) @LDFLAGS@ @XLDFLAGS@
EXTLIBS =
LIBS = @LIBS@ $(EXTLIBS)
MISSING = @LIBOBJS@ @ALLOCA@
@ -86,7 +85,7 @@ all: miniruby$(binsuffix) rbconfig.rb
miniruby$(binsuffix): config.status $(LIBRUBY_A) $(MAINOBJ) dmyext.o
@rm -f $@
$(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ) dmyext.o $(LIBRUBY_A) $(LIBS) -o $@
$(PURIFY) $(CC) $(LDFLAGS) $(MAINOBJ) dmyext.o $(LIBRUBY_A) $(LIBS) -o $@
$(PROGRAM): $(LIBRUBY) $(MAINOBJ) $(EXTOBJS)
@rm -f $@
@ -112,10 +111,11 @@ clean:; @rm -f $(OBJS) $(LIBRUBY_A) $(LIBRUBY_SO) $(LIBRUBY_ALIASES) $(MAINOBJ)
distclean: clean
@rm -f Makefile ext/extmk.rb config.h
@rm -f ext/config.cache config.cache config.log config.status
@rm -f parse.c *~ core *.core gmon.out y.tab.c y.output
@rm -f *~ core *.core gmon.out y.tab.c y.output ruby.imp
@rm -f $(PROGRAM) miniruby$(binsuffix)
realclean: distclean
@rm -f parse.c
@rm -f lex.c
test: miniruby$(binsuffix)

4
configure vendored
View file

@ -4008,8 +4008,8 @@ echo "configure:3935: checking whether OS depend dynamic link works" >&5
DLDFLAGS="$ARCH_FLAG"
rb_cv_dlopen=yes ;;
aix*) LDSHARED='/usr/ccs/bin/ld'
XLDFLAGS="-Wl,-bE:ruby.imp"
DLDFLAGS="-eInit_$(TARGET) -bI:$(ruby_inc)/ruby.imp -bM:SRE -T512 -H512 -lc"
XLDFLAGS='-Wl,-bE:ruby.imp'
DLDFLAGS='-eInit_$(TARGET) -bI:$(ruby_inc)/ruby.imp -bM:SRE -T512 -H512 -lc'
rb_cv_dlopen=yes ;;
human*) DLDFLAGS=''

View file

@ -449,8 +449,8 @@ if test "$with_dln_a_out" != yes; then
DLDFLAGS="$ARCH_FLAG"
rb_cv_dlopen=yes ;;
aix*) LDSHARED='/usr/ccs/bin/ld'
XLDFLAGS="-Wl,-bE:ruby.imp"
DLDFLAGS="-eInit_$(TARGET) -bI:$(ruby_inc)/ruby.imp -bM:SRE -T512 -H512 -lc"
XLDFLAGS='-Wl,-bE:ruby.imp'
DLDFLAGS='-eInit_$(TARGET) -bI:$(ruby_inc)/ruby.imp -bM:SRE -T512 -H512 -lc'
rb_cv_dlopen=yes ;;
human*) DLDFLAGS=''

View file

@ -30,6 +30,4 @@ def extract(nm, out)
exp.close
nm.close
end
if older("../ruby.imp", "../miniruby")
extract(open("|/usr/ccs/bin/nm -p ../*.o"), "../ruby.imp")
end
extract(open("|/usr/ccs/bin/nm -p ../*.o"), "../ruby.imp")

View file

@ -30,9 +30,9 @@ if $topdir !~ "^/"
# get absolute path
$topdir = File.expand_path($topdir)
end
$ruby_inc = "@top_srcdir@"
$ruby_inc = $top_srcdir
load '@top_srcdir@/lib/find.rb'
load "#{$top_srcdir}/lib/find.rb"
## drive letter
if PLATFORM == "i386-os2_emx" then
@ -497,8 +497,8 @@ for d in Dir["#{$top_srcdir}/ext/*"]
print "cleaning ", d, "\n"
else
print "compiling ", d, "\n"
if PLATFORM =~ /ibm-aix/
load './aix_mksym.rb'
if PLATFORM =~ /-aix/ and older("../ruby.imp", "../miniruby")
load "#{$top_srcdir}/ext/aix_mksym.rb"
end
end
extmake(d)

6
missing/finite.c Normal file
View file

@ -0,0 +1,6 @@
int
finite(n)
double n;
{
return !isnan(n) && !isinf(n);
}

18
missing/isinf.c Normal file
View file

@ -0,0 +1,18 @@
static double zero() { return 0.0; }
static double one() { return 1.0; }
static double inf() { return one() / zero(); }
int
isinf(n)
double n;
{
static double pinf = 0.0;
static double ninf = 0.0;
if (pinf == 0.0) {
pinf = inf();
ninf = -pinf;
}
return memcmp(&n, &pinf, sizeof n) == 0
|| memcmp(&n, &ninf, sizeof n) == 0;
}

18
missing/isnan.c Normal file
View file

@ -0,0 +1,18 @@
static int double_ne();
int
isnan(n)
double n;
{
return double_ne(n, n);
}
static
int
double_ne(n1, n2)
double n1, n2;
{
return n1 != n2;
}

1197
missing/snprintf.c Normal file

File diff suppressed because it is too large Load diff

View file

@ -28,6 +28,8 @@ File.foreach "config.status" do |$_|
if /^s%@program_transform_name@%s,(.*)%g$/
ptn = $1.sub(/\$\$/, '$').split(/,/) #'
v_fast << " CONFIG[\"ruby_install_name\"] = \"" + "ruby".sub(ptn[0],ptn[1]) + "\"\n"
elsif /^s%@DLDFLAGS@%(.*)%g$/
v_fast << " CONFIG[\"DLDFLAGS\"] = \"" + $1 + "\"\n"
elsif /^s%@(\w+)@%(.*)%g/
name = $1
val = $2 || ""