kinect_upload_fw: support architectures that are not little-endian
authorAntonio Ospite <ospite@studenti.unina.it>
Mon, 3 Oct 2011 14:22:36 +0000 (16:22 +0200)
committerAntonio Ospite <ospite@studenti.unina.it>
Mon, 3 Oct 2011 14:36:09 +0000 (16:36 +0200)
commitf9427c75a57d01f791770aa6bfc2a094c1eaf371
treebe02b7e3e4185aada83234ee6a7b4963a845c190
parent9fe8177cc165d2718664cd94f02f80587869b3e6
kinect_upload_fw: support architectures that are not little-endian

Add an endian.c program which will be used at compile time to generate
an endian.h file with the information about the endianness of the
architecture. This way we do not depend on any particular build system
to retrieve this information (libfreenect knows the endianness with the
help of Cmake, for instance).

This is inspired from the rdesktop project[1] and looks more portable
than relying on the system endian.h as its use is relatively new and not
standardized yet, even though there are proposals in that direction[2].

Finally fn_le32() implementation is ripped off from libfreenect.

[1] http://www.rdesktop.org/archive/2001/msg00722.html
[2] http://austingroupbugs.net/view.php?id=162
kinect_upload_fw/Makefile
kinect_upload_fw/endian.c [new file with mode: 0644]
kinect_upload_fw/kinect_upload_fw.c