On 07/11/14 14:21, jfons...@vmware.com wrote:
> From: José Fonseca <jfons...@vmware.com>
> 
> As the semantics of sprintf_s's arguments are quite different, so code
> that relies on it might misbehave.
Indeed sprintf_s has an additional argument (buffer_length) which might
cause a bit of an issue.

On a slightly related note, I've used _vsnprintf_s/_vscprintf in waffle
to implement snprintf, yet I'm not sure if it brings anything special
wrt _snprintf.

Any ideas ?

-Emil
> ---
>  tests/util/piglit-util.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/util/piglit-util.h b/tests/util/piglit-util.h
> index 0238b7f..84e2066 100755
> --- a/tests/util/piglit-util.h
> +++ b/tests/util/piglit-util.h
> @@ -58,7 +58,7 @@ extern "C" {
>  #define inline __inline
>  #endif
>  
> -#define snprintf sprintf_s
> +#define snprintf _snprintf
>  
>  #endif /* defined(_MSC_VER) */
>  
> 

_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to