This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix compiler warning when cuserid is absent and sizeof(int) != sizeof(pointer)
authorTim Jenness <t.jenness@jach.hawaii.edu>
Tue, 7 Jul 2009 21:49:11 +0000 (11:49 -1000)
committerH.Merijn Brand <h.m.brand@xs4all.nl>
Wed, 8 Jul 2009 06:37:06 +0000 (08:37 +0200)
commit56f4542c0225628c386228d839cd4db214424a79
tree2d669aa012fc08256b9d5611a8ec4a8bf7eac38d
parent718192e995474a85c48c3c717ba8acddedbe1a20
Fix compiler warning when cuserid is absent and sizeof(int) != sizeof(pointer)

The attached patch fixes a compilation warning from POSIX.xs when cuserid
is missing and ints and pointers have different size. eg on Mac OSX when
using 64-bit mode.

gcc-4.2 -c   -fno-common -DPERL_DARWIN -no-cpp-precomp -arch x86_64 -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include -I/opt/local/include -O3 -g   -DVERSION=\"1.17\"
-DXS_VERSION=\"1.17\"  "-I../.."   POSIX.c
POSIX.c: In function 'XS_POSIX_cuserid':
POSIX.c:4096: warning: cast to pointer from integer of different size
Running Mkbootstrap for POSIX ()
chmod 644 POSIX.bs
rm -f ../../lib/auto/POSIX/POSIX.bundle

Also relevant for 5.10.1.

Signed-off-by: H.Merijn Brand <h.m.brand@xs4all.nl>
ext/POSIX/POSIX.xs