I have been able to compile mgcv 1.5-6 *successfully* on the AIX box with gcc. I replaced all the TRUE/FALSE in magic.c and gdi.c with mgcvTRUE/mgcvFALSE. Thanks to William Dunlap for his help.