- changed status to open
- removed comment
Add CCTK_POINTER_SIZE make variable
It is sometimes necessary to know in a thorn's configuration script whether 32 bit or 64 bit code is to be generated. See the discussion in ticket #339.
The attached patch adds a CCTK_POINTER_SIZE make variable to make.config.defn which is accessible as a shell variable to configuration scripts. This will be 4 when compiling for 32 bit, and 8 when compiling for 64 bit.
I am not very expert in autoconf, so the patch might have to be modified. It seems to work, however.
I have not included the generated configure script - this should be generated by the person who commits the final patch.
Keyword: flesh
Comments (5)
-
reporter -
- removed comment
Cactus's autoconf already defines SIZEOF_CHAR_P, which is e.g. used to define the type CCTK_POINTER in Fortran. You can use this instead of defining a new constant.
-
- removed comment
Can this ticket be closed?
-
reporter - changed status to resolved
- removed comment
Yes.
-
reporter - removed comment
This patch arranges that a shell variable CCTK_POINTER_SIZE is accessible to configuration scripts. This is given its value from SIZEOF_CHAR_P. I don't know another way to get the value of SIZEOF_CHAR_P from a configuration script. If this patch is not the right way to do this, what do you suggest?
- Log in to comment