diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2008-01-27 15:44:46 -0500 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2008-01-28 10:07:48 +0000 |
commit | 899488baa2eb2cdab6a5fbbfa925660c0b8ab246 (patch) | |
tree | 657255aa71cd9dd49b0624faa7b9b6273fefdb84 /ext/IPC | |
parent | c9289b7b6da6fbd0919642909a950203eda422ad (diff) | |
download | perl-899488baa2eb2cdab6a5fbbfa925660c0b8ab246.tar.gz |
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
Diffstat (limited to 'ext/IPC')
-rw-r--r-- | ext/IPC/SysV/SysV.xs | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/ext/IPC/SysV/SysV.xs b/ext/IPC/SysV/SysV.xs index fb1ec775ff..9222f7a17f 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 <sys/types.h> before <sys/ipc.h> 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 |