svn commit: trunk/uClibc/utils

vapier at uclibc.org vapier at uclibc.org
Sun Jan 28 06:55:57 UTC 2007


Author: vapier
Date: 2007-01-27 22:55:56 -0800 (Sat, 27 Jan 2007)
New Revision: 17580

Log:
fix typo as pointed out by Tony Wu and cleanup source

Modified:
   trunk/uClibc/utils/bswap.h


Changeset:
Modified: trunk/uClibc/utils/bswap.h
===================================================================
--- trunk/uClibc/utils/bswap.h	2007-01-28 06:46:31 UTC (rev 17579)
+++ trunk/uClibc/utils/bswap.h	2007-01-28 06:55:56 UTC (rev 17580)
@@ -1,3 +1,8 @@
+/*
+ * Lame bswap replacements as we can't assume the host is sane and provides
+ * working versions of these.
+ */
+
 #ifndef _BSWAP_H
 #define	_BSWAP_H 1
 
@@ -2,22 +7,22 @@
 #if !defined(__BYTE_ORDER) && defined(BYTE_ORDER)
-#  define __BYTE_ORDER = BYTE_ORDER
+# define __BYTE_ORDER BYTE_ORDER
 #endif
 
 #ifndef __BYTE_ORDER
-#ifdef __linux__
-#include <endian.h>
-#else
-#define	__LITTLE_ENDIAN	1234	/* least-significant byte first (vax, pc) */
-#define	__BIG_ENDIAN	4321	/* most-significant byte first (IBM, net) */
-#define	__PDP_ENDIAN	3412	/* LSB first in word, MSW first in long (pdp) */
+# ifdef __linux__
+#  include <endian.h>
+# else
+#  define __LITTLE_ENDIAN 1234	/* least-significant byte first (vax, pc) */
+#  define __BIG_ENDIAN    4321	/* most-significant byte first (IBM, net) */
+#  define __PDP_ENDIAN    3412	/* LSB first in word, MSW first in long (pdp) */
 
-#if defined(sun386) || defined(i386)
-#define	__BYTE_ORDER	__LITTLE_ENDIAN
-#endif
+#  if defined(sun386) || defined(i386)
+#   define __BYTE_ORDER __LITTLE_ENDIAN
+#  endif
 
-#if defined(sparc)
-#define	__BYTE_ORDER	__BIG_ENDIAN
-#endif
+#  if defined(sparc)
+#   define __BYTE_ORDER __BIG_ENDIAN
+#  endif
 
-#endif /* __linux__ */
+# endif /* __linux__ */
 #endif /* __BYTE_ORDER */
@@ -30,7 +35,7 @@
 #endif
 
 #ifdef __linux__
-#include <byteswap.h>
+# include <byteswap.h>
 #else
 
 static inline uint16_t bswap_16(uint16_t x)




More information about the uClibc-cvs mailing list