Rick Peralta wrote:
Hi Jeff,
There is support for all sorts of byte swaping. And swapping bytes works in both directions, big to little or little to big is the same operation. ntohll is a 64 bit byte swap, but might not naturally work based on architecture. Check out be64_to_cpu and friends. They are in the tree and should work reliably, regardless of architecture.
ntohll does not appear to be part of glibc, but rather nspr. Adding a
dependency on nspr would duplicate existing functionality in existing
dependency GLib.
be64_to_cpu and friends come from /usr/include/linux, which is
Linux-specific. That doesn't work, because the project currently works
on FreeBSD and Solaris, in addition to Linux.
In both cases, GLib provides idioms that are more portable, without
adding additional dependencies to this project.
Certainly the underlying swap16/swap32/swap64 code is the same for big
or little endian, but the APIs you cite (ntohl, ntohll, etc.) will
compile to no-op on big endian, and swap on little endian, which gives
the opposite result of the stated design choice (fixed little endian to
match commodity hardware).
I've been dealing with issues that seem to be related to Fedora8. Fixing them one at a time seems counter productive, as some of the libraries are not exactly backward compatible. What OS/release and libraries do you use to build Hail?
Can you detail those issues?
Just like we support other OS's, I would like to either (a) support an
older Linux distro, or (b) have configure fail gracefully, giving a
helpful message about why configure did not like your system.
Jeff
--
To unsubscribe from this list: send the line "unsubscribe hail-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html