define for 32/64 bitness?

Does boost provide an preprocessor define telling if the boost lib is build for 32 or 64 bit? I need this info for the second parameter of posix_memalign(). regards, Oliver

-------- Original-Nachricht --------
Datum: Tue, 16 Feb 2010 22:34:05 +0000 Von: Mathias Gaunard <mathias.gaunard@ens-lyon.org> An: boost@lists.boost.org Betreff: Re: [boost] define for 32/64 bitness?
Oliver Kowalke a écrit :
Does boost provide an preprocessor define telling if the boost lib is build for 32 or 64 bit? I need this info for the second parameter of posix_memalign().
Use boost::alignment_of<T>::value for the type you're interested in.
Seams no tow work for me because I've to provide an aligned stack - the address of the memory must be a multiple of eight (or sixteen on 64-bit systems). regards, Oliver -- GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT! Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01

Oliver Kowalke wrote:
Seams no tow work for me because I've to provide an aligned stack - the address of the memory must be a multiple of eight (or sixteen on 64-bit systems).
So you want to know the alignment of the stack. That's a whole other thing altogether, platform-dependent and not necessarily directly correlated to 32/64 bitness (if that even means anything).

Does boost provide an preprocessor define telling if the boost lib is build for 32 or 64 bit? I need this info for the second parameter of posix_memalign().
Although it's not boost, the following might be helpful: http://predef.sourceforge.net/prearch.html#sec3

Where I work we use the define __LP64 to distinguish between 32 and 64 bit mode. #ifdef __LP64 is 64 bit mode. 2010/2/17 Alex Miller <alex55miller@gmail.com>
Does boost provide an preprocessor define telling if the boost lib is
build
for 32 or 64 bit? I need this info for the second parameter of posix_memalign().
Although it's not boost, the following might be helpful: http://predef.sourceforge.net/prearch.html#sec3
-- “Dubito ergo cogito; cogito ergo sum. (I doubt, therefore I think; I think therefore I am)” René Descartes
participants (5)
-
Alex Miller
-
Joel Falcou
-
Mathias Gaunard
-
Oliver Kowalke
-
Rene Eng