Commit 1721ab04 by Patrick Steinhardt

unix: posix: avoid use of variadic macro `p_snprintf`

The macro `p_snprintf` is implemented as a variadic macro that
calls `snprintf` directly with `__VA_ARGS__`. In C89, variadic
macros are not allowed, but as the arguments of `p_snprintf` and
`snprintf` are matching 1:1, we can fix this by simply removing
the parameter list from `p_snprintf`.
parent 63d8cd18
...@@ -59,7 +59,7 @@ GIT_INLINE(int) p_fsync(int fd) ...@@ -59,7 +59,7 @@ GIT_INLINE(int) p_fsync(int fd)
#define p_strcasecmp(s1, s2) strcasecmp(s1, s2) #define p_strcasecmp(s1, s2) strcasecmp(s1, s2)
#define p_strncasecmp(s1, s2, c) strncasecmp(s1, s2, c) #define p_strncasecmp(s1, s2, c) strncasecmp(s1, s2, c)
#define p_vsnprintf(b, c, f, a) vsnprintf(b, c, f, a) #define p_vsnprintf(b, c, f, a) vsnprintf(b, c, f, a)
#define p_snprintf(b, c, ...) snprintf(b, c, __VA_ARGS__) #define p_snprintf snprintf
#define p_mkstemp(p) mkstemp(p) #define p_mkstemp(p) mkstemp(p)
#define p_chdir(p) chdir(p) #define p_chdir(p) chdir(p)
#define p_chmod(p,m) chmod(p, m) #define p_chmod(p,m) chmod(p, m)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment