Migrate Win32 C/C++ Applications to Linux 393
An anonymous reader writes "This series of articles helps you migrate your Win32 C/C++ applications to Linux on POWER. Win32 C/C++ Apps to Linux Part-1 of this series covers the Win32 APIs mapping to Linux on POWER regarding the initialization and termination, process, thread, and shared memory services. Win32 C/C++ Apps to Linux Part-2 illustrates how to map Win32 to Linux with respect to mutex application program interfaces (APIs)."
The problem with migration is... (Score:5, Funny)
Re:Stupid question (Score:5, Funny)
Nope. It relates to porting Mac applications to run under Solaris. They just called it "Win32C/C++ Applications to Linux" to see if you'd ask a stupid question.
Worked brilliantly, too!
Re:"windows" (Score:5, Funny)
You'd think I was overgeneralizing, but I'm not. Absolutely every single time I see HN in use, I quickly end up learning that the programmer who wrote the code was an idiot. On at least two separate occasions, I've had to correct C code with HN that did not allocate space for the null terminator on any strings anywhere in the code. That's pretty much the level of programming talent you can expect when you see HN in use.
Conversely, I have never seen any code using HN which I looked at and thought to myself "Well that's a sweet way to solve that problem!" Not even once have I ever seen an elegant algorithm expressed in code written with HN. Not one single time.
Now I could propose several different reasons why I think this might be the case. It could be that HN actually causes brain damage in otherwise able individuals. It could be that it is a harbinger of doom, like some programmatic horseman of the apocalypse. More likely the programmers in question went through some community college somewhere and HN was the only thing they can remember from their beer-and-drug soaked college days. They've advertised that they know how to program and probably claim to have invented C, and they point to their strict adherence to programming convention, missing the fact that conventions without understanding is still stupidity. And it's not like managers typically know any better.
Which is why every trace of HN must be eradicated from any code which is ported, before it is allowed near our pristine and pure operating system. Well that, and the code will be more maintainable in the long run.
The best way to handle Win32 (Score:4, Funny)
Re:binary semaphore and mutex is not the same !!!! (Score:4, Funny)
Or what, did you really think we could run apps like Office and iTunes without such a basic sync primitive?
Re:Portable code (Score:4, Funny)
I'm not a polygamist, so obviously there is a lot that I don't know, but I imagine it's about as hard as dating two people at once. Once it goes into production, it's more like being married to two people. Not impossible, but surely you can imagine some of the difficulties. Unless you haven't dated, in which case you should have plenty of time to pick up programming.
How to migrate a Windows app: (Score:3, Funny)
$ cp /mnt/samba/xyzzy/programs/windows_app.exe . ./windows_app
$ objcopy -O elf32-i386 windows_app.exe windows_app
$