opensubscriber
   Find in this group all groups
 
Unknown more information…

c : cyrus-devel@lists.andrew.cmu.edu 19 July 2012 • 1:57PM -0400

Re: Build failed in Jenkins: cyrus-imapd-master #717
by Greg Banks

REPLY TO AUTHOR
 
REPLY TO GROUP






On Thu, Jul 19, 2012, at 06:46 AM, Bron Gondwana wrote:
> On Thu, Jul 19, 2012, at 12:02 PM, Greg Banks wrote:
> >
> > /* http://stackoverflow.com/a/4410728/94253 */
> >  [...]
> >
> > That could do with some improvement.
>
> Looks like stackoverflow might indeed be full of it.  I guess we should
> really test for each of those in configure.in and then #define the right
> inline instruction.

I guess - except that it's hard in configure to tell the difference
between a slow and a fast ntohl() provided by libc.  Configure is really
good at telling you if something is available, not whether it's fast.
Perhaps you could test for the availability, in order, of

1.  __builtin_bswap32() from gcc, or

2.  ntohl() from libc, or

3.  be32toh() from libc

and then do the same sequence again for the 64b versions, but add

4.  fallback to Cyrus' own code

> > The <endian.h> on my desktop defines a be64toh().  The same header on
> > ci.cyrusimap.org doesn't.
>
> Yeah, damn.  Is it really ancient, or 32 bit, or something?

Ancient.  It doesn't have be32toh() either.

--
Greg.

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.