
On Tue, Jul 08, 2008 at 07:43:07PM +0200, Jim Meyering wrote:
+#ifndef _PORTABLEXDR_BYTESWAP_H +#define _PORTABLEXDR_BYTESWAP_H 1
A different name file name might be nice, so this file is not confused (by people) with the system-provided <byteswap.h>. Maybe byteswap-pxdr.h or something similar.
...
+#if BYTE_ORDER == BIG_ENDIAN + return x; +#elif BYTE_ORDER == LITTLE_ENDIAN + return __bswap_32 (x); +#else +# error "What kind of system is this?" +#endif
Where is BYTE_ORDER defined? normally in endian.h. More curiosity than anything, since I'm sure it works everywhere you built it. I sort of expected to see an "#include <endian.h>" somewhere.
Ugh, yes, excessive copy and paste. I think a better approach is to contribute these as a module for Gnulib anyway. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones Read my OCaml programming blog: http://camltastic.blogspot.com/ Fedora now supports 59 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora