[rt.cpan.org #64577] Won't compile on Strawberry Perl 64 bit

[email protected] ("Haiko Strotbek via RT")
Newsgroups perl.libwin32
Message-ID <[email protected]>
Fri Jan 07 10:27:15 2011: Request 64577 was acted upon.
Transaction: Ticket created by [email protected]
       Queue: Win32-Daemon
     Subject: Won't compile on Strawberry Perl 64 bit
   Broken in: (no value)
    Severity: (no value)
       Owner: Nobody
  Requestors: [email protected]
      Status: new
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=64577 >


Hi,

when I'm trying to compile Win32::Daemon on a 64 bit edition of
Strawberry Perl there are two errors preventing a successful installation:


Daemon.xs:1355: error: cast from 'void*' to 'DWORD' loses precision

Daemon.xs:2225: error: cast from 'SERVICE_STATUS_HANDLE__*' to 'DWORD'
loses precision


I was able to get around the problem by replacing

Daemon.xs:1355 by
RETVAL = PTR2IV(ghServiceThread);

and Daemon.xs:2225 by
RETVAL = PTR2IV(ghService);

It seems to work for me but I think the return type of functions should
also be changed to T_PTR or any other 64 bit capable type.


Regards

Haiko Strotbek
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.