From dcad53d3bc3e4e716abfd63a813cecb496723923 Mon Sep 17 00:00:00 2001 From: kanemoto Date: Thu, 12 Nov 2009 16:01:28 +0000 Subject: merges r24482, r25061, r25124, r25126, r25552 from trunk into ruby_1_9_1. These patches are for AIX compilation issues. This commit is allowed by branch master (yugui). Thanks! * ext/socket/extconf.rb : Compilation failure on AIX. ss_len (a member of struct sockaddr_storage) has preceding __, but ss_family does not have it from AIX 5.2. * Makefile.in (miniruby): suppress duplication warning on AIX. * common.mk (ruby.imp): add text section [Bug #2064]. * common.mk (ruby.imp): do not export Init_*. * dln.c (aix_loaderror): fixed typo. suppress warnings. * common.mk (ruby.imp): excluded prelude.o to get rid of circular dependency. [ruby-dev:39052] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@25740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 25 +++++++++++++++++++++++++ Makefile.in | 2 +- common.mk | 11 +++++++---- dln.c | 7 ++++--- ext/socket/extconf.rb | 4 +++- 5 files changed, 40 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6060ee5545..0f34765f81 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,28 @@ +Thu Oct 29 01:22:01 2009 Yutaka Kanemoto + + * ext/socket/extconf.rb : Compilation failure on AIX. + ss_len (a member of struct sockaddr_storage) has preceding __, + but ss_family does not have it from AIX 5.2. + +Mon Sep 28 01:28:17 2009 Yutaka Kanemoto + + * Makefile.in (miniruby): suppress duplication warning on AIX. + +Mon Sep 28 01:13:25 2009 Yutaka Kanemoto + + * common.mk (ruby.imp): add text section [Bug #2064]. + + * common.mk (ruby.imp): do not export Init_*. + +Thu Sep 24 01:14:18 2009 Yutaka Kanemoto + + * dln.c (aix_loaderror): fixed typo. suppress warnings. + +Sun Aug 9 16:36:51 2009 Nobuyoshi Nakada + + * common.mk (ruby.imp): excluded prelude.o to get rid of circular + dependency. [ruby-dev:39052] + Thu Sep 17 06:03:40 2009 Marc-Andre Lafortune * lib/matrix.rb (Matrix#rank): Two bug fixes. One made diff --git a/Makefile.in b/Makefile.in index 9f6bb7b290..c0a9fe55d3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -134,7 +134,7 @@ all: miniruby$(EXEEXT): @-if test -f $@; then mv -f $@ $@.old; $(RM) $@.old; fi - $(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINLIBS) $(MAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(DMYEXT) $(ARCHFILE) $(LIBS) $(OUTFLAG)$@ + $(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINLIBS) $(MAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(DMYEXT) $(LIBS) $(OUTFLAG)$@ $(PROGRAM): @$(RM) $@ diff --git a/common.mk b/common.mk index 0345274e10..5f3309cb1f 100644 --- a/common.mk +++ b/common.mk @@ -85,11 +85,12 @@ COMMONOBJS = array.$(OBJEXT) \ $(BUILTIN_TRANSOBJS) \ $(MISSING) -OBJS = dln.$(OBJEXT) \ +EXPORTOBJS = dln.$(OBJEXT) \ encoding.$(OBJEXT) \ - prelude.$(OBJEXT) \ $(COMMONOBJS) +OBJS = $(EXPORTOBJS) prelude.$(OBJEXT) + GOLFOBJS = goruby.$(OBJEXT) golf_prelude.$(OBJEXT) PRELUDE_SCRIPTS = $(srcdir)/prelude.rb $(srcdir)/enc/prelude.rb $(srcdir)/gem_prelude.rb @@ -160,8 +161,10 @@ $(STATIC_RUBY)$(EXEEXT): $(MAINOBJ) $(DLDOBJS) $(EXTOBJS) $(LIBRUBY_A) @$(RM) $@ $(PURIFY) $(CC) $(MAINOBJ) $(DLDOBJS) $(EXTOBJS) $(LIBRUBY_A) $(MAINLIBS) $(EXTLIBS) $(LIBS) $(OUTFLAG)$@ $(LDFLAGS) $(XLDFLAGS) -ruby.imp: $(OBJS) - @$(NM) -Pgp $(OBJS) | awk 'BEGIN{print "#!"}; $$2~/^[BD]$$/{print $$1}' | sort -u -o $@ +ruby.imp: $(EXPORTOBJS) + @$(NM) -Pgp $(EXPORTOBJS) | \ + awk 'BEGIN{print "#!"}; $$2~/^[BDT]$$/&&$$1!~/^(Init_|\.)/{print $$1}' | \ + sort -u -o $@ install: install-nodoc $(RDOCTARGET) install-all: install-nodoc install-doc diff --git a/dln.c b/dln.c index 1672838972..6849d28506 100644 --- a/dln.c +++ b/dln.c @@ -1100,6 +1100,7 @@ dln_sym(const char *name) #include #endif +#if ! defined _AIX static const char * dln_strerror(void) { @@ -1149,7 +1150,7 @@ dln_strerror(void) return message; #endif } - +#endif #if defined(_AIX) && ! defined(_IA64) static void @@ -1160,7 +1161,7 @@ aix_loaderror(const char *pathname) static const struct errtab { int errnum; - char *errstr; + const char * errstr; } load_errtab[] = { {L_ERROR_TOOMANY, "too many errors, rest skipped."}, {L_ERROR_NOLIB, "can't load library:"}, @@ -1182,7 +1183,7 @@ aix_loaderror(const char *pathname) snprintf(errbuf, sizeof(errbuf), "load failed - %s ", pathname); message[0] = NULL; - if (!loadquery(L_GETMESSAGE, &message[0], sizeof(message))) + if (!loadquery(L_GETMESSAGES, &message[0], sizeof(message))) ERRBUF_APPEND(strerror(errno)); for(i = 0; message[i] && *message[i]; i++) { int nerr = atoi(message[i]); diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb index 99deaf8793..2001a710e4 100644 --- a/ext/socket/extconf.rb +++ b/ext/socket/extconf.rb @@ -92,8 +92,10 @@ end # doug's fix, NOW add -Dss_family... only if required! doug = proc {have_struct_member("struct sockaddr_storage", "ss_family", headers)} if (doug[] or - with_cppflags($CPPFLAGS + " -Dss_family=__ss_family -Dss_len=__ss_len", &doug)) + with_cppflags($CPPFLAGS + " -Dss_family=__ss_family", &doug)) $defs[-1] = "-DHAVE_SOCKADDR_STORAGE" + doug = proc {have_struct_member("struct sockaddr_storage", "ss_len", headers)} + doug[] or with_cppflags($CPPFLAGS + " -Dss_len=__ss_len", &doug) end if have_struct_member("struct sockaddr", "sa_len", headers) -- cgit v1.2.3