From: Jarkko Hietaniemi Date: Sun, 27 Jan 2008 20:44:46 +0000 (-0500) Subject: ext/IPC/SysV/SysV.xs [Re: [Fwd: Smoke [5.11.0] 33016 FAIL(XM) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=899488baa2eb2cdab6a5fbbfa925660c0b8ab246;p=p5sagit%2Fp5-mst-13.2.git ext/IPC/SysV/SysV.xs [Re: [Fwd: Smoke [5.11.0] 33016 FAIL(XM) Message-ID: <479D338E.9000402@iki.fi> p4raw-id: //depot/perl@33084 --- diff --git a/ext/IPC/SysV/SysV.xs b/ext/IPC/SysV/SysV.xs index fb1ec77..9222f7a 100644 --- a/ext/IPC/SysV/SysV.xs +++ b/ext/IPC/SysV/SysV.xs @@ -332,8 +332,16 @@ ftok(path, id = &PL_sv_undef) croak("invalid project id"); } } - - k = ftok(path, proj_id); +/* Including before makes Tru64 + * to see the obsolete prototype of ftok() first, grumble. */ +# ifdef __osf__ +# define Ftok_t char* +/* Configure TODO Ftok_t */ +# endif +# ifndef Ftok_t +# define Ftok_t const char* +# endif + k = ftok((Ftok_t)path, proj_id); ST(0) = k == (key_t) -1 ? &PL_sv_undef : sv_2mortal(newSViv(k)); XSRETURN(1); #else @@ -405,11 +413,7 @@ shmdt(addr) CODE: #ifdef HAS_SHM void *caddr = sv2addr(addr); -# ifdef __SUNPRO_CC - int rv = shmdt((char *)caddr); -# else - int rv = shmdt(caddr); -# endif + int rv = shmdt((Shmat_t)caddr); ST(0) = rv == -1 ? &PL_sv_undef : sv_2mortal(newSViv(rv)); XSRETURN(1); #else