in reply to Re^2: Defining an XS symbol in the Makefile.PL
in thread Defining an XS symbol in the Makefile.PL
And the XS file is rewritten to redefine the symbol to the appropriate value:.... if($Config{nvsize} == 8) { $nvtype = 'LU_NV_IS_64_BIT' } # double o +r 8-byte long double elsif(length(sqrt 2) > 25) { $nvtype = 'LU_NV_IS_128_BIT' } # IEEE lon +g double or __float128 else { $nvtype = 'LU_NV_IS_80_BIT' } # extended + precision long double $defines .= " -D$nvtype"; .... WriteMakefile ( .... DEFINE => $defines, .... );
It's working fine .... but I feel that I should be able to define MY_FORMAT directly within the Makefile.PL and avoid having to add that preprocessing to the XS file ??#if defined(LU_NV_IS_64_BIT) #define MY_FORMAT "%.17" #elif defined(LU_NV_IS_80_BIT) #define MY_FORMAT "%.21" #else #define MY_FORMAT "%.36" #endif
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Defining an XS symbol in the Makefile.PL
by jcb (Parson) on Aug 18, 2019 at 07:29 UTC | |
by syphilis (Archbishop) on Aug 18, 2019 at 09:40 UTC | |
by jcb (Parson) on Aug 18, 2019 at 22:35 UTC | |
by syphilis (Archbishop) on Aug 19, 2019 at 01:40 UTC | |
by jcb (Parson) on Aug 19, 2019 at 02:40 UTC | |
|