File: bigendian.diff

package info (click to toggle)
gogglesmm 1.2.5-6
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 16,812 kB
  • sloc: cpp: 231,960; ansic: 893; xml: 222; makefile: 33
file content (21 lines) | stat: -rw-r--r-- 817 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Description: Fix MSB_UINT on big endian
 Fix compiling on Big Endian Architectures.
Author: q66 <daniel@octaforge.org>
Origin: https://git.fern.garden/fern/void-packages/commit/18691bd7d2b7e3c8e67d9fbbc254a20cffb4b19d
Bug: https://github.com/gogglesmm/gogglesmm/issues/118
Last-Update: 2024-05-23
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/src/GMCover.cpp
+++ b/src/GMCover.cpp
@@ -26,8 +26,8 @@
 #define MSB_UINT(x) ((x)[3]) | ((x)[2]<<8) | ((x)[1]<<16) | ((x)[0]<<24)
 #define MSB_SHORT(x) ((x)[0]<<8) | ((x)[1])
 #else
-#define MSB_UINT(data) (data[0]) | (data[1]<<8) | (data[2]<<16) | (data[3]<<24)
-#define MSB_SHORT(data) (data[1]<<8) | (data[0])
+#define MSB_UINT(x) ((x)[0]) | ((x)[1]<<8) | ((x)[2]<<16) | ((x)[3]<<24)
+#define MSB_SHORT(x) ((x)[1]<<8) | ((x)[0])
 #endif