summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 27f095e..5d6e4ba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,15 @@
+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, regex.c, ruby.h: shut up AIX alloca
- warning. [ruby-dev:29191]
+ warning. a patch from Yutaka Kanemoto <kinpoco at gmail.com>.
+ [ruby-dev:29191]
Sun Aug 6 20:40:41 2006 Tadayoshi Funaba <tadf@dotrb.org>
diff --git a/common.mk b/common.mk
index d055923..dfc0e98 100644
--- a/common.mk
+++ b/common.mk
@@ -66,16 +66,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
@@ -112,6 +112,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 00cbaf7..7fc0a03 100644
--- a/configure.in
+++ b/configure.in
@@ -993,16 +993,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=''}
@@ -1305,12 +1309,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 1a7c6ab..b4f44c9 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -195,6 +195,12 @@ ruby_getaddrinfo__aix(nodename, servname, hints, res)
}
#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 HAVE_CLOSESOCKET