Eric Blake c6f1060ca7 util: add virendian.h macros
We have several cases where we need to read endian-dependent
data regardless of host endianness; rather than open-coding
these call sites, it will be nicer to funnel things through
a macro.

The virendian.h file can be expanded to add writer functions,
and/or 16-bit access patterns, if needed.  Also, if we need
to turn things into a function to avoid multiple evaluations
of buf, that can be done later.  But for now, a macro worked.

* src/util/virendian.h: New file.
* src/Makefile.am (UTIL_SOURCES): Ship it.
* tests/virendiantest.c: New test.
* tests/Makefile.am (test_programs, virendiantest_SOURCES): Run
the test.
* .gitignore: Ignore built file.
2013-02-12 09:00:15 -07:00
..
2012-04-02 09:33:54 -06:00
2012-09-17 14:59:37 -04:00
2012-12-21 11:19:50 +00:00
2012-12-21 11:19:49 +00:00
2012-12-21 11:17:13 +00:00
2009-10-07 12:18:13 +02:00
2009-10-07 12:18:13 +02:00
2013-02-12 09:00:15 -07:00
2011-07-11 09:21:37 -06:00
2009-07-16 15:06:42 +02:00
2012-12-21 11:19:49 +00:00
2013-02-12 09:00:15 -07:00
2013-01-17 16:39:10 -07:00
2012-12-21 11:19:50 +00:00