I am porting a win32 app to linux and instead of having bunch of #ifdefs around every _snprintf_s, I was wondering if there is a way to #define it to snprintf somehow.
So something like -
#define _snprintf_s(1,2,3,4,5) snprintf(1,2,4,5)
The third parameter, Maximum number of characters to store, or _TRUNCATE is not present for snprintf.
Is this approach right? Can I do such a #define? If so, can someone maybe point out how I should go about it?
I went through this question to know I have to be careful about such #defines.
Thanks!