Hi Andrii, On 7 September 2018 at 13:15, <asimiklit.w...@gmail.com> wrote: > From: Andrii Simiklit <andrii.simik...@globallogic.com> > > The win '_vsnprintf' function incompatibility with C99 vsnprintf. > At least for case when the input buffer size less than the required size: > '_vsnprintf' returns -1 for this case. > 'vsnprintf' returns the required size. > > v5: remove _mesa_*snprintf functions and replace it by util_*snprintf > > So use cross platform implementation 'util_vsnprintf'. > > Reviewed-by: Emil Velikov <emil.veli...@collabora.com> > Fixes: 2353e96c320d "Coerce vsnprintf to _vsnprintf for windows" > Signed-off-by: Andrii Simiklit <andrii.simik...@globallogic.com> > A couple of trivial follow-up ideas. Just putting them out here - for anyone interested to take a stab.
> +#if defined(__IBMC__) || defined(__IBMCPP__) > +extern int vsnprintf(char *str, size_t count, const char *fmt, va_list arg); > +#endif > + This and the similar workaround for Cygwin could be dropped. The fact that we had them in only one place (of 10+) indicates that they are no longer needed. > #define util_vsnprintf vsnprintf > #define util_snprintf snprintf > #define util_vsprintf vsprintf Jose has bumped the MSVC requirement to 2015, which has proper implementation of some *printf functions. One could skim through the MSDN pages and drop the workarounds we no longer need. HTH Emil _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev