Legacy Technology · Migrations
Unix C and C++ code porting: endianness, 64-bit and compilers
Moving C and C++ from AIX, HP-UX or Solaris to Linux is rarely a recompile. Byte order, 64-bit sizes, alignment and compiler behaviour all change. We port the code and prove the outputs match.
- UK contract with Dreams Technologies Hub Private Limited (VAT registered)
- Engineers delivered from our own Coimbatore office, India
- Shortlist within 5 working days
- Building software since 2013
What changes when code moves to Linux
POWER, PA-RISC, Itanium under HP-UX, and SPARC all run big-endian. x86 Linux is little-endian. Any code that reads binary files, unpacks network messages by hand or uses unions to reinterpret bytes can produce wrong answers without crashing. Add vendor compiler extensions and 32-bit assumptions, and you have the real porting work.
What’s in scope
Every migration starts with a full inventory. On this kind of move, that means:
- Source code, headers and build system (make, imake, scripts).
- Binary file formats and network message layouts.
- Use of vendor compiler extensions and pragmas.
- System calls and libraries that differ between platforms.
- Threading, signals and IPC behaviour.
- Existing tests, or the outputs we can use as tests.
How we run the migration
- Inventory. Code, builds and platform-specific calls, scanned with tooling and reviewed by engineers.
- Characterise. Capture current behaviour as tests before changing anything.
- Build on Linux. GCC or Clang with strict warnings; fix what breaks.
- Fix portability. Byte order, sizes, alignment and API differences.
- Compare. Same inputs on old and new platforms; outputs must match.
- Hand over. Clean build, tests and notes your team can maintain.
Typical porting issues
| What goes wrong | How we handle it |
|---|---|
| Byte order: binary files and hand-packed messages read wrongly. | Every binary read and write found and given explicit byte-order handling. |
| Unions and bitfields reinterpret bytes. | Rewritten with explicit conversions and covered by tests. |
| Struct alignment and #pragma pack differ by compiler. | Layouts checked with compile-time assertions. |
| long and pointers change size in 64-bit builds. | Fixed-width types where size matters; warnings treated as errors. |
| Vendor compiler extensions don’t compile under GCC. | Replaced with standard equivalents. |
| Signals, threads and system calls behave slightly differently. | Reviewed and tested under load, not just in unit tests. |
What you receive
- Porting inventory and risk list.
- Code building cleanly on Linux with strict warnings.
- Characterisation tests and comparison results.
- Build files and notes for your team.
How it’s priced
We start with a fixed-fee assessment so the scope is clear. The migration itself is then quoted at a fixed price, with any optional work listed separately. If you prefer, we can supply specialists to work inside your own migration team instead.
Why teams come to us for scarce skills
Finding thin talent pools is our core skill
Large service firms rarely staff a single Pro*C or HP-UX role quickly. We keep a vetted network of engineers who have these skills and want this work.
Screened by people who have done the work
Our own senior engineers run the technical interview. Candidates are tested on the platform you run, not on general programming.
UK contract, India delivery
You contract with our UK company. The work is delivered from our own office in Coimbatore with working hours that overlap the UK day.
AI-assisted code understanding
Our team works with Claude Code to read, document and test old codebases faster. Every finding is checked by an engineer before it reaches you.
Continuity built in
Every engagement keeps a runbook and code notes from week one, and a second engineer is briefed on your system. Losing one person does not mean losing the knowledge.
We also run the migration
When you are ready to leave the platform, the same team that kept it running plans and delivers the move.
Tell us what you’re running
Send us the stack and the problem. We’ll reply within one working day and, if it’s a staffing request, send a shortlist within five.
FAQ
Frequently asked questions
Can AI port the code for us?
AI helps us read and scan code much faster, and suggests fixes. An engineer still makes and tests every change. That combination is why our porting estimates are shorter.
We have no tests. How do you know the port is right?
We create characterisation tests from the current system’s behaviour before changing any code, then compare outputs after the port.
Do you move to CMake or modern C++ at the same time?
Only if you want it, and usually after the port is proven. One change at a time keeps the risk low.
