Happy to in principle, but might it not be better to put in util.cpp right after #include <ftw.h> or something like that: #ifndef FTW_STOP #define FTW_STOP 1 #endif etc for: ... #define FTW_CONTINUE 0 ... #define FTW_ACTIONRETVAL 16