[Mesa-dev] [PATCH] perf: fix snprintf() problem on Windows for glsl-compile-time.c

Kenneth Graunke kenneth at whitecape.org
Thu Feb 25 07:58:25 UTC 2016


On Wednesday, February 24, 2016 4:45:42 PM PST Brian Paul wrote:
> Use the typical _snprintf work-around.
> ---
>  src/perf/glsl-compile-time.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/src/perf/glsl-compile-time.c b/src/perf/glsl-compile-time.c
> index 917073c..a8e774f 100644
> --- a/src/perf/glsl-compile-time.c
> +++ b/src/perf/glsl-compile-time.c
> @@ -20,6 +20,10 @@
>  #include "glut_wrap.h"
>  #include "shaderutil.h"
>  
> +#if defined(_MSC_VER)
> +#define snprintf _snprintf
> +#endif
> +
>  
>  #define MAX_PROGRAMS 10000
>  
> 

Not sure you really need review on a demo you wrote yourself last
month... :)  This looks reasonable to me, though.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160224/e1f6e2ad/attachment.sig>


More information about the mesa-dev mailing list