A kludgy solution that will work with many pre-ANSI compilers is to indent any ANSI preprocessor directives so that the old compiler will ignore them. This works with Greenhill C on BSD: #if 0 #pragma x #endif