summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-04-20 08:21:41 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-04-20 08:21:41 +0000
commit8852d54df49dd08207748ea537f23710add98c97 (patch)
treeb5b47d883790531624ab8e898673af038c7a40e4 /ext
parent4b3d078462f3d9306e56649bd818e0f54c214f18 (diff)
to open CVS
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/aix_ld.rb26
-rw-r--r--ext/extmk.rb.in12
-rw-r--r--ext/socket/socket.c4
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