msvc (compiler provided with Visual Studio) does not support __attribute__(format)
.
we can add something like
#if defined (__GNUC__)
#muon_format(_a, _b) __attribute__ ((format(printf, _a, _b)));
#else
#muon_format(_a, _b)
#endif
maybe it is time to add a config.h
file or something similar ?
after some discussion on IRC, a
compat.h
file containing#if !defined(_POSIX_C_SOURCE) && !defined(_WIN32) #define _POSIX_C_SOURCE 200809L #endif #ifndef MUON_FORMAT #ifdef (__GNUC__) #define MUON_FORMAT(_f1, _f2) __attribute__ ((format(printf, _f1, _f2))) #else #define MUON_FORMAT(_f1, _f2) #endif #endif
should be added. I would include it at the top of all source file.
This has been created