#ifndef _SIM_ENDIAN_C_
#define _SIM_ENDIAN_C_
-#ifndef STATIC_INLINE_ENDIAN
-#define STATIC_INLINE_ENDIAN STATIC_INLINE
-#endif
-
-
#include "config.h"
#include "basics.h"
#define _SWAP_1(SET,RAW) SET (RAW)
#endif
-#if !defined(_SWAP_2) && (WITH_HOST_BYTE_ORDER == LITTLE_ENDIAN) && WITH_NTOH
+#if !defined(_SWAP_2) && (WITH_HOST_BYTE_ORDER == LITTLE_ENDIAN) && defined(htons)
#define _SWAP_2(SET,RAW) SET htons (RAW)
#endif
#define _SWAP_2(SET,RAW) SET (((RAW) >> 8) | ((RAW) << 8))
#endif
-#if !defined(_SWAP_4) && (WITH_HOST_BYTE_ORDER == LITTLE_ENDIAN) && WITH_NTOH
+#if !defined(_SWAP_4) && (WITH_HOST_BYTE_ORDER == LITTLE_ENDIAN) && defined(htonl)
#define _SWAP_4(SET,RAW) SET htonl (RAW)
#endif
SET out.dword;
#endif
-#undef N
#define N 1
#include "sim-endian-n.h"
-
#undef N
+
#define N 2
#include "sim-endian-n.h"
-
#undef N
+
#define N 4
#include "sim-endian-n.h"
-
#undef N
+
#define N 8
#include "sim-endian-n.h"
+#undef N
#endif /* _SIM_ENDIAN_C_ */