I believe this can be done, but it's tricky as it requires delving into hairy Win32 API calls. It will be much easier to simply recompile using a modern compiler -- is there any reason why this can't be done?
Here are links to two free, high quality C/C++ compilers that will have no trouble with long filenames: Microsoft Visual C++ Express Edition; MinGW.
j_random_hacker
2009-02-05 10:51:06