Skip to content
Snippets Groups Projects
Commit 42d821cf authored by Ansgar Burchardt's avatar Ansgar Burchardt
Browse files

Merge branch 'bugfix/64bit-big-endian' into 'master'

Fix several bugs on 64-bit big endian architectures

See merge request !40
parents c5f80cf3 5c7a20f4
No related branches found
No related tags found
1 merge request!40Fix several bugs on 64-bit big endian architectures
Pipeline #
...@@ -1213,7 +1213,7 @@ void DDD_XferAddData (int cnt, DDD_TYPE typ) ...@@ -1213,7 +1213,7 @@ void DDD_XferAddData (int cnt, DDD_TYPE typ)
{ {
/* stream of bytes, since V1.2 */ /* stream of bytes, since V1.2 */
/* many streams, since V1.7.8 */ /* many streams, since V1.7.8 */
xa->addLen = cnt; xa->addLen = CEIL(cnt);
xa->addNPointers = 0; xa->addNPointers = 0;
} }
...@@ -1273,7 +1273,7 @@ void DDD_XferAddDataX (int cnt, DDD_TYPE typ, size_t *sizes) ...@@ -1273,7 +1273,7 @@ void DDD_XferAddDataX (int cnt, DDD_TYPE typ, size_t *sizes)
{ {
/* stream of bytes, since V1.2 */ /* stream of bytes, since V1.2 */
/* many streams, since V1.7.8 */ /* many streams, since V1.7.8 */
xa->addLen = cnt; xa->addLen = CEIL(cnt);
xa->addNPointers = 0; xa->addNPointers = 0;
} }
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
/* standard C library */ /* standard C library */
#include <config.h> #include <config.h>
#include <cinttypes>
#include <cstdlib> #include <cstdlib>
#include <cstdio> #include <cstdio>
#include <cstring> #include <cstring>
...@@ -392,7 +393,6 @@ static void XferPackSingleMsg (XFERMSG *msg) ...@@ -392,7 +393,6 @@ static void XferPackSingleMsg (XFERMSG *msg)
TEOldCpl *theOldCpl; TEOldCpl *theOldCpl;
char *theObjects, *currObj; char *theObjects, *currObj;
int i, actSym, actNewCpl, actOldCpl, actObj, recvProc; int i, actSym, actNewCpl, actOldCpl, actObj, recvProc;
INT mi;
/* recipient of this message */ /* recipient of this message */
...@@ -539,7 +539,7 @@ static void XferPackSingleMsg (XFERMSG *msg) ...@@ -539,7 +539,7 @@ static void XferPackSingleMsg (XFERMSG *msg)
/* substitute all pointers by index into SymTab */ /* substitute all pointers by index into SymTab */
for(mi=0; mi<actSym; mi++) for(std::uintptr_t mi=0; mi<actSym; mi++)
{ {
/* patch SymTab index into reference location inside message */ /* patch SymTab index into reference location inside message */
*(theSymTab[mi].adr.ref) = (DDD_OBJ)(mi+1); *(theSymTab[mi].adr.ref) = (DDD_OBJ)(mi+1);
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
/* standard C library */ /* standard C library */
#include <config.h> #include <config.h>
#include <cinttypes>
#include <cstdlib> #include <cstdlib>
#include <cstdio> #include <cstdio>
#include <cstring> #include <cstring>
...@@ -206,7 +207,7 @@ static void LocalizeObject (bool merge_mode, TYPE_DESC *desc, ...@@ -206,7 +207,7 @@ static void LocalizeObject (bool merge_mode, TYPE_DESC *desc,
/* reference had been replaced by SymTab-index */ /* reference had been replaced by SymTab-index */
stIdx = (*(INT *)(msgrefarray+l)) - 1; stIdx = (*(std::uintptr_t *)(msgrefarray+l)) - 1;
/* test for Localize execution in merge_mode */ /* test for Localize execution in merge_mode */
if (merge_mode && (*ref!=NULL)) if (merge_mode && (*ref!=NULL))
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment