diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/aix_ld.rb | 26 | ||||
-rw-r--r-- | ext/extmk.rb.in | 12 | ||||
-rw-r--r-- | ext/socket/socket.c | 4 |
3 files changed, 13 insertions, 29 deletions
diff --git a/ext/aix_ld.rb b/ext/aix_ld.rb index 42b2087a46..7dd5dbbb69 100644 --- a/ext/aix_ld.rb +++ b/ext/aix_ld.rb @@ -38,14 +38,15 @@ def extract(nm, out) data = nm.readlines.collect{|line| line = line.split case line[1] - when "B", "D", "T" - line[2] + when "B", "D" + line[0] else next end }.compact!.sort! uniq(data) exp = open(out, "w") + exp.printf "#!\n" for line in data exp.printf "%s\n", line end @@ -53,21 +54,14 @@ def extract(nm, out) nm.close end if older("../ruby.imp", "../../miniruby") -# nm = open("|/usr/ccs/bin/nm -Bex ../../*.o") -# nm = open("|/usr/ccs/bin/nm -Bex ../../*.o") - nm = open("|nm ../../*.o") + nm = open("|/usr/ccs/bin/nm -p ../../*.o") extract(nm, "../ruby.imp") end -objs = Dir["*.o"].join(" ") -#nm = open("|/usr/ccs/bin/nm -Bex #{objs}") -nm = open("|nm #{objs}") -extract(nm, "#{base}.exp") +#objs = Dir["*.o"].join(" ") +#nm = open("|/usr/ccs/bin/nm -p #{objs}") +#extract(nm, "#{base}.exp") -#system format("/usr/ccs/bin/ld %s %s ",ldargs,ARGV.join(' ')) -#system "/bin/rm -f #{base}.exp" -#system "chmod o-rwx ${base}.so" - -p format("/usr/ccs/bin/ld %s %s ",ldargs,ARGV.join(' ')) -p "/bin/rm -f #{base}.exp" -p "chmod o-rwx ${base}.so" +cmd = format("/usr/ccs/bin/ld %s %s ", ldargs, ARGV.join(' ')) +printf "\t%s\n", cmd +system cmd diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in index 7f4087472f..3d77dd3b03 100644 --- a/ext/extmk.rb.in +++ b/ext/extmk.rb.in @@ -24,18 +24,12 @@ $hdr_cache = {} $top_srcdir = "@top_srcdir@" if $top_srcdir !~ "^/" # get absolute path - save = Dir.pwd - Dir.chdir $top_srcdir - $top_srcdir = Dir.pwd - Dir.chdir save + $top_srcdir = File.expand_path($top_srcdir) end $topdir = ".." if $topdir !~ "^/" # get absolute path - save = Dir.pwd - Dir.chdir $topdir - $topdir = Dir.pwd - Dir.chdir save + $topdir = File.expand_path($topdir) end ## drive letter @@ -78,7 +72,7 @@ CFLAGS = "@CFLAGS@".gsub(/-c..-stack=[0-9]+ */, '') else CFLAGS = "@CFLAGS@" end -LINK = "@CC@ -o conftest -I#$topdir -I#$top_srcdir -I@includedir@ #{CFLAGS} %s @LDFLAGS@ %s conftest.c @LIBS@ %s" +LINK = "@CC@ -o conftest -I#$topdir -I#$top_srcdir -I@includedir@ #{CFLAGS} %s %s conftest.c @LIBS@ %s" CPP = "@CPP@ @CPPFLAGS@ -I#$topdir -I#$top_srcdir -I@includedir@ #{CFLAGS} %s conftest.c" if /cygwin|mswin32|djgpp|mingw32|m68k-human|i386-os2_emx/i =~ PLATFORM diff --git a/ext/socket/socket.c b/ext/socket/socket.c index 197c8e79e8..07b9b2b411 100644 --- a/ext/socket/socket.c +++ b/ext/socket/socket.c @@ -64,10 +64,6 @@ void SOCKSinit(); int Rconnect(); #endif -#ifndef HAVE_STRDUP -char *strdup(); -#endif - #define INET_CLIENT 0 #define INET_SERVER 1 #define INET_SOCKS 2 |