I gave it a try and I got all the code to compile but there are two linking issues remaing. For those who want to try the following might be useful:
my setup: G4 MP OSX 2E14 w. XTools, LessTiff, f2c and dlcompat
use standard fixes like -traditional-cpp, remove -lm etc.
most issues are with parts that deal with memory,
a number of #includes needs change/removal and there is a name conflict with the words 'and', 'or' & 'not' (rename them wisely;-)
Give it try, and beat me to it! (I'll be away from the computer for two weeks from now... )
/P