On 29 December 2015 at 08:08, Erik de Castro Lopo <mle+la at mega-nerd.com> wrote:> I would suggest: > > #if SIZEOF_VOIDP == 8I believe this is not portable. At least on my machine ("4.2.1 Compatible FreeBSD Clang 3.4.1 (tags/RELEASE_34/dot1-final 208032)") it's not defined. Probably this one comes closest: #define __SIZEOF_POINTER__ 8 Riggs
On 30.12.2015 13:57, Thomas Zander wrote:> On 29 December 2015 at 08:08, Erik de Castro Lopo wrote: > >> I would suggest: >> >> #if SIZEOF_VOIDP == 8 > > I believe this is not portable. At least on my machine ("4.2.1 > Compatible FreeBSD Clang 3.4.1 (tags/RELEASE_34/dot1-final 208032)") > it's not defined. Probably this one comes closest: > #define __SIZEOF_POINTER__ 8 >Guys, you do know that there are canned, portable autoconf macros for checking things like variable sizes at configuration/compilation time, right? -- O< ascii ribbon - stop html email! - www.asciiribbon.org -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 473 bytes Desc: OpenPGP digital signature Url : http://lists.xiph.org/pipermail/flac-dev/attachments/20151230/fa997fbf/attachment-0001.pgp
Thomas Zander wrote:> I believe this is not portable. At least on my machine ("4.2.1 > Compatible FreeBSD Clang 3.4.1 (tags/RELEASE_34/dot1-final 208032)")Its *is* detected and defined by autoconf at configure time. Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
LRN wrote:> Guys, you do know that there are canned, portable autoconf macros for > checking things like variable sizes at configuration/compilation time, right?Indeed! Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/