curl-library
curlbuild.h: non-configure GCC fallback looks fishy
From: Christian Weisgerber <naddy_at_mips.inka.de>
Date: Fri, 1 Jan 2016 23:30:38 +0100
Date: Fri, 1 Jan 2016 23:30:38 +0100
In curlbuild.h, the non-configure generic GCC fallback is dubious:
# if defined(__ILP32__) || \
defined(__i386__) || defined(__ppc__) || defined(__arm__) || \
defined(__sparc__) || defined(__mips__) || defined(__sh__)
...
# elif defined(__LP64__) || \
defined(__x86_64__) || defined(__ppc64__) || defined(__sparc64__)
...
On sparc64, gcc defines both __sparc64__ and __sparc__, so the code
above will pick the wrong definitions. Same for __mips64__ and
__mips__ on mips64 platforms. I don't know about ppc64.
An easy fix would be to exchange the order, i.e., check for __LP64__
first.
(I don't use this non-configure code in any way, I just happened to
notice.)
-- Christian "naddy" Weisgerber naddy_at_mips.inka.de ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2016-01-01