3 ms·
That's moving from one VAX-like 32-bit register machine to another, and the target is bi-endian. Migrate to a different word size, or a different endianness, a
by chaganated 6y ago
That's moving from one VAX-like 32-bit register machine to another, and the target is bi-endian. Migrate to a different word size, or a different endianness, and things get very ugly.
- icedchai 6y agoAs usual, it depends. I've ported code between i386 (32-bit, Linux) and POWER (64-bit, big endian, AIX) and it wasn't "very ugly." Yeah, we had some longs that should've been int32_t's but it was hardly rocket science. We missed a few conversions to network byte order, but again, not difficult to fix.
- chaganated 6y agoHaving to manually find these things is always "very ugly" in my book. If I resolve a few of these problems, and the program seems to work, I will still have nagging doubts about "What did I miss?"
- icedchai 6y agoThis is true. If I recall, when we worked on the port, we had some "checker" utilities that dumped out the struct name and size of all structures (sizeof(struct...)) on both platforms. The system was heavily based on memory mapped structs and serialization of those structs, so if a length didn't match, it was a bad sign. Fun times.