projects
/
parted.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
582c7ca
)
Fix for 64-bit check
master
author
Robert Pengelly
<robertapengelly@hotmail.com>
Mon, 26 Jan 2026 23:52:09 +0000
(23:52 +0000)
committer
Robert Pengelly
<robertapengelly@hotmail.com>
Mon, 26 Jan 2026 23:52:09 +0000
(23:52 +0000)
write7x.c
patch
|
blob
|
history
diff --git
a/write7x.c
b/write7x.c
index e1a0257a380a5683905907187e489db29a38107d..f642b4e4480aeb3a29ec8bdfceaedd6b852e5b47 100644
(file)
--- a/
write7x.c
+++ b/
write7x.c
@@
-50,7
+50,7
@@
void write781_to_byte_array (unsigned char *dest, unsigned long val, int little_
dest[2] = (val >> 16) & 0xFF;
dest[3] = (val >> 24) & 0xFF;
-#if
ULONG_MAX > 4294967295UL
+#if
((ULONG_MAX >> 16) >> 16) == 0xffffffff
dest[4] = (val >> 32) & 0xFF;
dest[5] = (val >> 40) & 0xFF;
@@
-73,7
+73,7
@@
void write781_to_byte_array (unsigned char *dest, unsigned long val, int little_
dest[5] = (val >> 16) & 0xFF;
dest[4] = (val >> 24) & 0xFF;
-#if
ULONG_MAX > 4294967295UL
+#if
((ULONG_MAX >> 16) >> 16) == 0xffffffff
dest[3] = (val >> 32) & 0xFF;
dest[2] = (val >> 40) & 0xFF;