Regardign PRIxPTR, perhaps Matthew was suggesting something like #ifndef PRIxPTR #define PRIxPTR "x" #endif rather than #if (defined (__sun__)) #define PRIxPTR "x" #endif in which case it would make sense to be in cenv.h (assuming "x" is right for any platform).