Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.85k stars 527 forks source link

Re: Not OK: perl v5.6.1 +fools-gold on darwin 1.3 (UNINSTALLED) #3817

Closed p5pRT closed 20 years ago

p5pRT commented 23 years ago

Migrated from rt.perl.org#6741 (status was 'resolved')

Searchable as RT6741$

p5pRT commented 23 years ago

From @jhi

The one Devil goes to learn new tricks.

10? Some extra info in there...maybe we can just simply $^O eq 'darwin' and @​s == 10?

Yeah\, there are extra fields in the nidump output. struct passwd also has an extra field and some have changed meanings (oh\, blecch\, don't tell me that passwords expire...). A simple "|| ($^O eq 'darwin' && @​s == 10)" gets me into the if block and it works provided that the assign from @​s above is fixed. Here's a patch (to foolsperl)​:

Again\, I won't touch foolsperl at this point\, it's up to Sarathy\, but I'll apply this to bleadperl.

--- op/pwent.t- Thu Apr 5 13​:16​:18 2001 +++ op/pwent.t Thu Apr 5 13​:17​:01 2001 @​@​ -73\,7 +73\,12 @​@​ chomp; # LIMIT -1 so that users with empty shells don't fall off my @​s = split /​:/\, $_\, -1; - my ($name_s\, $passwd_s\, $uid_s\, $gid_s\, $gcos_s\, $home_s\, $shell_s) = @​s; + my ($name_s\, $passwd_s\, $uid_s\, $gid_s\, $gcos_s\, $home_s\, $shell_s); + if ($^O eq 'darwin') { + ($name_s\, $passwd_s\, $uid_s\, $gid_s\, $gcos_s\, $home_s\, $shell_s) = @​s[0\,1\,2\,3\,7\,8\,9]; + } else { + ($name_s\, $passwd_s\, $uid_s\, $gid_s\, $gcos_s\, $home_s\, $shell_s) = @​s; + } next if /^\+/; # ignore NIS includes if (@​s) { push @​{ $seen{$name_s} }\, $.; @​@​ -88\,7 +93\,7 @​@​ } # In principle we could whine if @​s != 7 but do we know enough # of passwd file formats everywhere? - if (@​s == 7) { + if (@​s == 7 || ($^O eq 'darwin' && @​s == 10)) { @​n = getpwuid($uid_s); # 'nobody' et al. next unless @​n;

grep db config.sh | egrep -v 'dbl|netdb'

macosx% grep db config.sh | egrep -v 'dbl|netdb' db_hashtype='u_int32_t' db_prefixtype='size_t' i_db='define' i_dbm='undef' i_gdbm='undef' i_ndbm='define' i_rpcsvcdbm='undef' libswanted='sfio socket bind inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun m c cposix posix ndir dir crypt sec ucb bsd BSD PW x iconv util'

Hmmm\, looks like it has all the reason to believe Berkeley db is just fine. There's a small test program in Configure\, which was apparently happy\, when it shouldn't have...