develooper Front page | perl.perl5.porters | Postings from August 2001

Re: [PATCH] HPUX + GCC

Thread Previous
From:
H . Merijn Brand
Date:
August 29, 2001 07:31
Subject:
Re: [PATCH] HPUX + GCC
Message ID:
20010829161842.DF68.H.M.BRAND@hccnet.nl
On Wed 29 Aug 2001 15:58, Arthur Bergman <arthur@contiller.se> wrote:
> 
> I propose the following patch, see if it works for you Merijn.

See below.

> ==== //depot/perl/ext/Socket/Socket.xs#37 -
> /home/artur/perl/p4/ext/Socket/Socket.xs ====
> --- /tmp/tmp.25047.0    Wed Aug 29 15:56:36 2001
> +++ /home/artur/perl/p4/ext/Socket/Socket.xs    Wed Aug 29 15:55:22 2001
> @@ -221,8 +221,13 @@
>      }
>  
>      Copy( ip_address, &addr, sizeof addr, char );
> +#if defined(__hpux) && defined(__ux_version) && __ux_version <= 1100 &&
> CC==gcc
> +        /* GCC on HP_UX breaks the call to inet_ntoa */
> +    addr_str = (char *) malloc(16);
> +    sprintf(addr_str, "%d.%d.%d.%d", (addr.s_addr & 0xFF) , ((addr.s_addr
> >> 8) & 0xFF), ((addr.s_addr >> 16) & 0xFF), ((addr.s_addr >> 24) & 0xFF));
> +#else
>      addr_str = inet_ntoa(addr);
> -
> +#endif
>      ST(0) = sv_2mortal(newSVpvn(addr_str, strlen(addr_str)));
>      }

l1:/pro/3gl/CPAN/perl-current 130 > ./perl -Ilib xx.pl
Undefined subroutine &main::inet_aton called at xx.pl line 1.
l1:/pro/3gl/CPAN/perl-current 131 > ./perl -Ilib -MSocket xx.pl
ok 10
not ok 11
ok 12
ok 13
l1:/pro/3gl/CPAN/perl-current 132 > cd t
l1:/pro/3gl/CPAN/perl-current/t 133 > ./perl TEST ../ext/Socket/Socket.t
../ext/Socket/Socket....FAILED at test 9
Failed 1 test script out of 1, 0.00% okay.
   ### Since not all tests were successful, you may want to run some
   ### of them individually and examine any diagnostic messages they
   ### produce.  See the INSTALL document's section on "make test".
   ### If you are testing the compiler, then ignore this message
   ### and run
   ###      ./perl harness
   ### in the directory ./t.
u=0.09  s=0.02  cu=0.11  cs=0.01  scripts=1  tests=13
l1:/pro/3gl/CPAN/perl-current/t 134 > ./perl -I../lib -MSocket ../ext/Socket/Socket.t
1..13
ok 1
ok 2
# Connected to 0.0.0.0
ok 3
ok 4
ok 5
# Connected to 0.0.0.0
ok 6
ok 7
ok 8
not ok 9
ok 10
not ok 11
ok 12
ok 13
l1:/pro/3gl/CPAN/perl-current/t 135 >

-- 
H.Merijn Brand    Amsterdam Perl Mongers (http://www.amsterdam.pm.org/)
using perl-5.6.1, 5.7.1 & 628 on HP-UX 10.20 & 11.00, AIX 4.2, AIX 4.3,
  WinNT 4, Win2K pro & WinCE 2.11.  Smoking perl CORE: smokers@perl.org
http://archives.develooper.com/daily-build@perl.org/   perl-qa@perl.org
send smoke reports to: smokers-reports@perl.org, QA: http://qa.perl.org


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About