Move __BYTE_ORDER__ definition for win32 to celutil/bytes.h

pull/209/head
Hleb Valoshka 2019-01-18 23:17:08 +03:00
parent 085bfd6762
commit f11a116de5
2 changed files with 10 additions and 9 deletions

View File

@ -15,6 +15,7 @@
#include "xyzvbinary.h"
#include <celengine/astro.h>
#include <celmath/mathlib.h>
#include <celutil/bytes.h>
#include <celutil/util.h> // intl.h
#include <cmath>
#include <string>
@ -822,15 +823,6 @@ template <typename T> SampledOrbitXYZV<T>* LoadSampledOrbitXYZV(const string& fi
/* Load a binary xyzv sampled trajectory file.
*/
#ifndef __BYTE_ORDER__
# ifdef WIN32
// FIXME: we assume that windows runs on LE hw only
# define __BYTE_ORDER__ 1234
# else
# error "Unknown system or compiler"
# endif
#endif
template <typename T> SampledOrbitXYZV<T>*
LoadSampledOrbitXYZVBinary(const string& filename, TrajectoryInterpolation interpolation, T /*unused*/)
{

View File

@ -16,6 +16,15 @@
#endif /* TARGET_OS_MAC */
#endif /* _WIN32 */
#ifndef __BYTE_ORDER__
# ifdef WIN32
// FIXME: we assume that windows runs on LE hw only
# define __BYTE_ORDER__ 1234
# else
# error "Unknown system or compiler"
# endif
#endif
/* Use the system byteswap.h definitions if we have them */
#ifdef HAVE_BYTESWAP_H
#include <byteswap.h>