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
This commit is contained in:
kanemoto 2009-11-12 16:01:28 +00:00
parent 9ca073576c
commit dcad53d3bc
5 changed files with 40 additions and 9 deletions

View file

@ -1,3 +1,28 @@
Thu Oct 29 01:22:01 2009 Yutaka Kanemoto <kanemoto@ruby-lang.org>
* 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 <kanemoto@ruby-lang.org>
* Makefile.in (miniruby): suppress duplication warning on AIX.
Mon Sep 28 01:13:25 2009 Yutaka Kanemoto <kanemoto@ruby-lang.org>
* 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 <kanemoto@ruby-lang.org>
* dln.c (aix_loaderror): fixed typo. suppress warnings.
Sun Aug 9 16:36:51 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* 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 <ruby-core@marc-andre.ca> Thu Sep 17 06:03:40 2009 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
* lib/matrix.rb (Matrix#rank): Two bug fixes. One made * lib/matrix.rb (Matrix#rank): Two bug fixes. One made

View file

@ -134,7 +134,7 @@ all:
miniruby$(EXEEXT): miniruby$(EXEEXT):
@-if test -f $@; then mv -f $@ $@.old; $(RM) $@.old; fi @-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): $(PROGRAM):
@$(RM) $@ @$(RM) $@

View file

@ -85,11 +85,12 @@ COMMONOBJS = array.$(OBJEXT) \
$(BUILTIN_TRANSOBJS) \ $(BUILTIN_TRANSOBJS) \
$(MISSING) $(MISSING)
OBJS = dln.$(OBJEXT) \ EXPORTOBJS = dln.$(OBJEXT) \
encoding.$(OBJEXT) \ encoding.$(OBJEXT) \
prelude.$(OBJEXT) \
$(COMMONOBJS) $(COMMONOBJS)
OBJS = $(EXPORTOBJS) prelude.$(OBJEXT)
GOLFOBJS = goruby.$(OBJEXT) golf_prelude.$(OBJEXT) GOLFOBJS = goruby.$(OBJEXT) golf_prelude.$(OBJEXT)
PRELUDE_SCRIPTS = $(srcdir)/prelude.rb $(srcdir)/enc/prelude.rb $(srcdir)/gem_prelude.rb 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) $@ @$(RM) $@
$(PURIFY) $(CC) $(MAINOBJ) $(DLDOBJS) $(EXTOBJS) $(LIBRUBY_A) $(MAINLIBS) $(EXTLIBS) $(LIBS) $(OUTFLAG)$@ $(LDFLAGS) $(XLDFLAGS) $(PURIFY) $(CC) $(MAINOBJ) $(DLDOBJS) $(EXTOBJS) $(LIBRUBY_A) $(MAINLIBS) $(EXTLIBS) $(LIBS) $(OUTFLAG)$@ $(LDFLAGS) $(XLDFLAGS)
ruby.imp: $(OBJS) ruby.imp: $(EXPORTOBJS)
@$(NM) -Pgp $(OBJS) | awk 'BEGIN{print "#!"}; $$2~/^[BD]$$/{print $$1}' | sort -u -o $@ @$(NM) -Pgp $(EXPORTOBJS) | \
awk 'BEGIN{print "#!"}; $$2~/^[BDT]$$/&&$$1!~/^(Init_|\.)/{print $$1}' | \
sort -u -o $@
install: install-nodoc $(RDOCTARGET) install: install-nodoc $(RDOCTARGET)
install-all: install-nodoc install-doc install-all: install-nodoc install-doc

7
dln.c
View file

@ -1100,6 +1100,7 @@ dln_sym(const char *name)
#include <windows.h> #include <windows.h>
#endif #endif
#if ! defined _AIX
static const char * static const char *
dln_strerror(void) dln_strerror(void)
{ {
@ -1149,7 +1150,7 @@ dln_strerror(void)
return message; return message;
#endif #endif
} }
#endif
#if defined(_AIX) && ! defined(_IA64) #if defined(_AIX) && ! defined(_IA64)
static void static void
@ -1160,7 +1161,7 @@ aix_loaderror(const char *pathname)
static const struct errtab { static const struct errtab {
int errnum; int errnum;
char *errstr; const char * errstr;
} load_errtab[] = { } load_errtab[] = {
{L_ERROR_TOOMANY, "too many errors, rest skipped."}, {L_ERROR_TOOMANY, "too many errors, rest skipped."},
{L_ERROR_NOLIB, "can't load library:"}, {L_ERROR_NOLIB, "can't load library:"},
@ -1182,7 +1183,7 @@ aix_loaderror(const char *pathname)
snprintf(errbuf, sizeof(errbuf), "load failed - %s ", pathname); snprintf(errbuf, sizeof(errbuf), "load failed - %s ", pathname);
message[0] = NULL; message[0] = NULL;
if (!loadquery(L_GETMESSAGE, &message[0], sizeof(message))) if (!loadquery(L_GETMESSAGES, &message[0], sizeof(message)))
ERRBUF_APPEND(strerror(errno)); ERRBUF_APPEND(strerror(errno));
for(i = 0; message[i] && *message[i]; i++) { for(i = 0; message[i] && *message[i]; i++) {
int nerr = atoi(message[i]); int nerr = atoi(message[i]);

View file

@ -92,8 +92,10 @@ end
# doug's fix, NOW add -Dss_family... only if required! # doug's fix, NOW add -Dss_family... only if required!
doug = proc {have_struct_member("struct sockaddr_storage", "ss_family", headers)} doug = proc {have_struct_member("struct sockaddr_storage", "ss_family", headers)}
if (doug[] or 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" $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 end
if have_struct_member("struct sockaddr", "sa_len", headers) if have_struct_member("struct sockaddr", "sa_len", headers)