I came across a similar problem that I'll have to solve this week for a client. He's got an old web site, circa 1998. It's got cgi-scripts running on Apache, now on an old redhat server. The cgi-scripts are written in C. And include a cgi-bin.h library of some sort. The cgi-scripts are very proprietary, people still pay by the month to access them, but there's no budget or desire to modernize them, as the original team has moved on.
Without realizing this I set up the new server with a 64bit ubuntu LTS install, and moved over the first web site which is just static content, and transferred email duties over to it, so now I've got a live server that I'm trying to migrate the old code to.
Are the binaries likely to work on a 32bit modern install of ubuntu? (I suppose this would be easy enough to test, but I didn't have one handy) I've got the original source, but no real clue how to go about finding the libraries on a modern system to get it to compile. Is there some compiler switch to make sure any 32bit logic works on the 64 bit machine? Should I just virtualize the current redhat machine and put it behind a (hopefully password protected) proxy?