Trying to redefine library #defines
My project use a series of libraries, some of which I need to tamper with their preprocessor constants.
PDcurses (a portable curses implementation), for instance, has a some keyboard #defines that I need to alter since not all of them match my system's. Another one is boost::filesystem which uses <errno> for its exception handling. Unfortunately MinGW implementation of errno.h falls short and many of its preprocessor constants don't match my system's error codes.
This is new grounds for me and I'm unsure how I should implement these changes in a portable way.
One possibility I'm thinking is to make my own headers, include these libraries and then use a trio of #ifdef, #undef and #define for those preprocessor constants that I need changed. My app then includes these headers instead of the original ones.
Is this desirable? Not? Or is there a better approach?