summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-08-07 05:44:43 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-08-07 05:44:43 +0000
commit50ef220b5a60260dd44d994a99f2baee9f8582f4 (patch)
tree8e4142851ee757d55dbd32b751f45d5ce28ad2bf
parent275f12623df02daf3ee121da50997b224cfa593a (diff)
* configure.in, common.mk: AIX link issue. a patch from Yutaka
Kanemoto <kinpoco at gmail.com>. [ruby-dev:29190] * ext/socket/socket.c: AIX socket support. [ruby-dev:29190] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog10
-rw-r--r--common.mk10
-rw-r--r--configure.in30
-rw-r--r--ext/socket/socket.c6
4 files changed, 38 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog
index 2b813f399b3..06b4001dbb1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,14 @@
+Mon Aug 7 14:37:48 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * configure.in, common.mk: AIX link issue. a patch from Yutaka
+ Kanemoto <kinpoco at gmail.com>. [ruby-dev:29190]
+
+ * ext/socket/socket.c: AIX socket support. [ruby-dev:29190]
+
Mon Aug 7 12:05:28 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
- * dln.c, eval.c, gc.c, ruby.h: shut up AIX alloca warning.
+ * dln.c, eval.c, gc.c, ruby.h: shut up AIX alloca warning.
+ a patch from Yutaka Kanemoto <kinpoco at gmail.com>.
[ruby-dev:29191]
Sun Aug 6 20:34:24 2006 Tadayoshi Funaba <tadf@dotrb.org>
diff --git a/common.mk b/common.mk
index b191c2e2b53..2c4602dd556 100644
--- a/common.mk
+++ b/common.mk
@@ -75,16 +75,16 @@ miniruby$(EXEEXT): config.status $(LIBRUBY_A) $(MAINOBJ) $(MINIOBJS) $(OBJS) $(D
$(PROGRAM): $(LIBRUBY) $(MAINOBJ) $(OBJS) $(EXTOBJS) $(SETUP) $(PREP)
-$(LIBRUBY_A): $(OBJS) $(DMYEXT)
+$(LIBRUBY_A): $(OBJS) $(DMYEXT) $(ARCHFILE)
-$(LIBRUBY_SO): $(OBJS) $(DLDOBJS) $(LIBRUBY_A) $(PREP) $(ARCHFILE)
+$(LIBRUBY_SO): $(OBJS) $(DLDOBJS) $(LIBRUBY_A) $(PREP)
$(STATIC_RUBY)$(EXEEXT): $(MAINOBJ) $(DLDOBJS) $(EXTOBJS) $(LIBRUBY_A)
@$(RM) $@
$(PURIFY) $(CC) $(MAINOBJ) $(DLDOBJS) $(EXTOBJS) $(LIBRUBY_A) $(MAINLIBS) $(EXTLIBS) $(LIBS) $(OUTFLAG)$@ $(LDFLAGS) $(XLDFLAGS)
-ruby.imp: $(LIBRUBY_A)
- @$(NM) -Pgp $(LIBRUBY_A) | awk 'BEGIN{print "#!"}; $$2~/^[BD]$$/{print $$1}' | sort -u -o $@
+ruby.imp: $(OBJS)
+ @$(NM) -Pgp $(OBJS) | awk 'BEGIN{print "#!"}; $$2~/^[BD]$$/{print $$1}' | sort -u -o $@
install: install-nodoc $(RDOCTARGET)
install-all: install-nodoc install-doc
@@ -121,6 +121,8 @@ do-install-doc: $(PROGRAM)
pre-install: pre-install-local pre-install-ext
pre-install-local:: PHONY
+ $(RM) $(prefix)/lib/$(LIBRUBY)
+ $(RM) -r $(prefix)/lib/ruby/$(MAJOR).$(MINOR)/$(arch)
pre-install-ext:: PHONY
pre-install-doc:: PHONY
diff --git a/configure.in b/configure.in
index 02c33e2c818..0feaa29ab81 100644
--- a/configure.in
+++ b/configure.in
@@ -973,16 +973,20 @@ if test "$with_dln_a_out" != yes; then
: ${LDFLAGS=""}
: ${LIBPATHENV=DYLD_LIBRARY_PATH}
rb_cv_dlopen=yes ;;
- aix*) : ${LDSHARED='/usr/ccs/bin/ld'}
- XLDFLAGS="$XLDFLAGS -Wl,-bE:ruby.imp"
- DLDFLAGS='-brtl -eInit_$(TARGET) -bI:$(topdir)/ruby.imp -bM:SRE -T512 -H512 '"$DLDFLAGS"
- LDFLAGS="-brtl $LDFLAGS"
- : ${ARCHFILE="ruby.imp"}
- TRY_LINK='$(CC) $(LDFLAGS) -oconftest $(INCFLAGS) -I$(hdrdir) $(CPPFLAGS) $(CFLAGS)'
- TRY_LINK="$TRY_LINK"' $(src) $(LIBPATH) $(LOCAL_LIBS) $(LIBS)'
- : ${LIBPATHENV=SHLIB_PATH}
- rb_cv_dlopen=yes ;;
-
+ aix*) if test "$GCC" = yes; then
+ : ${LDSHARED='gcc -shared'}
+ DLDFLAGS='-Wl,-G -eInit_$(TARGET)'
+ LDFLAGS='-Wl,-brtl -Wl,-bE:ruby.imp'
+ else
+ : ${LDSHARED='/usr/ccs/bin/ld'}
+ DLDFLAGS='-G -eInit_$(TARGET)'
+ LDFLAGS="-brtl -bE:ruby.imp"
+ fi
+ : ${ARCHFILE="ruby.imp"}
+ TRY_LINK='$(CC) $(LDFLAGS) -oconftest $(INCFLAGS) -I$(hdrdir) $(CPPFLAGS)'
+ TRY_LINK="$TRY_LINK"' $(CFLAGS) $(src) $(LIBPATH) $(LOCAL_LIBS) $(LIBS)'
+ : ${LIBPATHENV=SHLIB_PATH}
+ rb_cv_dlopen=yes ;;
human*) : ${DLDFLAGS=''}
: ${LDSHARED=''}
: ${LDFLAGS=''}
@@ -1299,12 +1303,12 @@ if test "$enable_shared" = 'yes'; then
aix*)
if test "$GCC" = yes; then
LIBRUBY_LDSHARED='$(CC) -shared'
- LIBRUBY_DLDFLAGS='-Wl,-bE:ruby.imp'
+ LIBRUBY_DLDFLAGS='-Wl,-G -Wl,-bE:ruby.imp -Wl,-bnoentry'
else
LIBRUBY_LDSHARED='/usr/ccs/bin/ld'
- LIBRUBY_DLDFLAGS='-bE:ruby.imp -bM:SRE -bnoentry'
+ LIBRUBY_DLDFLAGS='-G -bE:ruby.imp -bnoentry'
fi
- LIBRUBYARG_SHARED='-L${libdir} -Wl,lib$(RUBY_SO_NAME).so'
+ LIBRUBYARG_SHARED='-L${libdir} -lruby'
SOLIBS='-lm -lc'
;;
beos*)
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index 113b60c0cd8..2badf1b27c6 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -185,6 +185,12 @@ ruby_getaddrinfo__aix(char *nodename, char *servname,
}
#undef getaddrinfo
#define getaddrinfo(node,serv,hints,res) ruby_getaddrinfo__aix((node),(serv),(hints),(res))
+#ifndef CMSG_SPACE
+# define CMSG_SPACE(len) (_CMSG_ALIGN(sizeof(struct cmsghdr)) + _CMSG_ALIGN(len))
+#endif
+#ifndef CMSG_LEN
+# define CMSG_LEN(len) (_CMSG_ALIGN(sizeof(struct cmsghdr)) + (len))
+#endif
#endif
#ifdef __BEOS__