Re: Conditional compile if 64-bit cpu, in .xs ?
- From: Peter Billam <peter@xxxxxxxxxxxxxxxxxxxx>
- Date: 29 Aug 2006 10:56:59 +1100
On 2006-08-28, Ilya Zakharevich <nospam-abuse@xxxxxxxxx> wrote:
Peter Billam wrote:OK, I think I get it...
Greetings xs folk. Suppose I have a bug-fix in a .xs file looking like
v0 &= 0xffffffff;
which is only necessary on 64-bit architectures... For speed reasons
I'd like to not include that line on 32-bit machines. Is there some
convenient
#ifdef 64whatever
v0 &= 0xffffffff;
#endif
defined by the xs that I can use ?
Why? Just add -DMY_64bit_FIX_NEEDED in Makefile.PL
You mean in Makefile.PL have, if ($Config{use64bitint}) then
DEFINE => '-DMY_64bit_FIX_NEEDED',
and then put
#ifdef MY_64bit_FIX_NEEDED
v0 &= 0xffffffff;
#endif
in the .xs ?
after inspecting %Config *for the conditions you need*,Presumably in this case I'd be looking for $Config{use64bitint} ?
not some "random thing" being 64-bit...
Thanks for your help, Peter
--
AUS/TAS/DPIW/CIT/Servers hbt/lnd/l8 6233 3061 http://www.pjb.com.au
Pasaré, pasarémos dice el agua y canta la verdad contra la piedra
-- Pablo Neruda
.
- Follow-Ups:
- Re: Conditional compile if 64-bit cpu, in .xs ?
- From: Ilya Zakharevich
- Re: Conditional compile if 64-bit cpu, in .xs ?
- From: Sisyphus
- Re: Conditional compile if 64-bit cpu, in .xs ?
- References:
- Conditional compile if 64-bit cpu, in .xs ?
- From: Peter Billam
- Re: Conditional compile if 64-bit cpu, in .xs ?
- From: Ilya Zakharevich
- Conditional compile if 64-bit cpu, in .xs ?
- Prev by Date: Re: problem installing MATH::MATLAB module
- Next by Date: Re: explain code section please...
- Previous by thread: Re: Conditional compile if 64-bit cpu, in .xs ?
- Next by thread: Re: Conditional compile if 64-bit cpu, in .xs ?
- Index(es):
Relevant Pages
|