summaryrefslogtreecommitdiff
path: root/common/pieceinf.cpp
diff options
context:
space:
mode:
authorleo2000-09-19 13:49:16 +0000
committerleo2000-09-19 13:49:16 +0000
commit4d909d872c6e9032182feafd4d86accb133d0270 (patch)
tree11e96aa91483001dfc6aff387ec785752f8d4422 /common/pieceinf.cpp
parenta431fae169bee32cfe0e8f57faace726a81ba48a (diff)
More endianess fixes
git-svn-id: http://svn.leocad.org/trunk@132 c7d43263-9d01-0410-8a33-9dba5d9f93d6
Diffstat (limited to 'common/pieceinf.cpp')
-rw-r--r--common/pieceinf.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/common/pieceinf.cpp b/common/pieceinf.cpp
index 8512078..51dc441 100644
--- a/common/pieceinf.cpp
+++ b/common/pieceinf.cpp
@@ -324,14 +324,14 @@ void PieceInfo::LoadInformation()
// hacks to get things working on big endian machines
#ifdef LC_BIG_ENDIAN
-#define GUINT16(val) ((guint16) ( \
- (((guint16) (val) & (guint16) 0x00ffU) << 8) | \
- (((guint16) (val) & (guint16) 0xff00U) >> 8)))
-#define GUINT32(val) ((guint32) ( \
- (((guint32) (val) & (guint32) 0x000000ffU) << 24) | \
- (((guint32) (val) & (guint32) 0x0000ff00U) << 8) | \
- (((guint32) (val) & (guint32) 0x00ff0000U) >> 8) | \
- (((guint32) (val) & (guint32) 0xff000000U) >> 24)))
+#define GUINT16(val) ((unsigned short) ( \
+ (((unsigned short) (val) & (unsigned short) 0x00ffU) << 8) | \
+ (((unsigned short) (val) & (unsigned short) 0xff00U) >> 8)))
+#define GUINT32(val) ((unsigned long) ( \
+ (((unsigned long) (val) & (unsigned long) 0x000000ffU) << 24) | \
+ (((unsigned long) (val) & (unsigned long) 0x0000ff00U) << 8) | \
+ (((unsigned long) (val) & (unsigned long) 0x00ff0000U) >> 8) | \
+ (((unsigned long) (val) & (unsigned long) 0xff000000U) >> 24)))
#define GINT16(val) ((gint16)GUINT16(val))
#define GINT32(val) ((gint32)GUINT32(val))
#else