summaryrefslogtreecommitdiffstats
path: root/cpukit/libnetworking
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2007-05-09 16:38:18 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2007-05-09 16:38:18 +0000
commitf5a22134c437fd73c2b385a30dcac50803dc0314 (patch)
tree067bb290b86b43c4d9592e9e2aa79c1a25cbde3a /cpukit/libnetworking
parent2007-05-09 Ralf Corsépius <ralf.corsepius@rtems.org> (diff)
downloadrtems-f5a22134c437fd73c2b385a30dcac50803dc0314.tar.bz2
Remove.
Diffstat (limited to 'cpukit/libnetworking')
-rw-r--r--cpukit/libnetworking/machine/endian.h92
1 files changed, 0 insertions, 92 deletions
diff --git a/cpukit/libnetworking/machine/endian.h b/cpukit/libnetworking/machine/endian.h
deleted file mode 100644
index 9dd6f89e11..0000000000
--- a/cpukit/libnetworking/machine/endian.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * $Id$
- */
-
-#ifndef _MACHINE_ENDIAN_H_
-#define _MACHINE_ENDIAN_H_
-
-#include <rtems.h>
-
-/*
- * BSD-style endian declaration
- */
-#define BIG_ENDIAN 4321
-#define LITTLE_ENDIAN 1234
-
-#ifndef BYTE_ORDER
-#if CPU_BIG_ENDIAN
-# define BYTE_ORDER BIG_ENDIAN
-#elif CPU_LITTLE_ENDIAN
-# define BYTE_ORDER LITTLE_ENDIAN
-#else
-# error "Can't decide which end is which!"
-#endif
-#endif
-
-#if ( CPU_BIG_ENDIAN == TRUE )
-
-/*
- * Very simply on big endian CPUs
- */
-
-static inline uint32_t ntohl( uint32_t _x )
-{
- return _x;
-}
-
-static inline uint16_t ntohs( uint16_t _x )
-{
- return _x;
-}
-
-static inline uint32_t htonl( uint32_t _x )
-{
- return _x;
-}
-
-static inline uint16_t htons( uint16_t _x )
-{
- return _x;
-}
-
-#define NTOHS(x)
-#define HTONS(x)
-#define NTOHL(x)
-#define HTONL(x)
-
-#elif ( CPU_LITTLE_ENDIAN == TRUE )
-
-/*
- * A little more complicated on little endian CPUs
- */
-
-static inline uint32_t ntohl( uint32_t _x )
-{
- return CPU_swap_u32(_x);
-}
-
-static inline uint16_t ntohs( uint16_t _x )
-{
- return CPU_swap_u16(_x);
-}
-
-static inline uint32_t htonl( uint32_t _x )
-{
- return CPU_swap_u32(_x);
-}
-
-static inline uint16_t htons( uint16_t _x )
-{
- return CPU_swap_u16(_x);
-}
-
-#define NTOHS(x) (x) = ntohs(x)
-#define HTONS(x) (x) = htons(x)
-#define NTOHL(x) (x) = ntohl(x)
-#define HTONL(x) (x) = htonl(x)
-
-#else
-#error "Unknown endian-ness for this cpu"
-#endif
-
-#endif /* _MACHINE_ENDIAN_H_ */