[tlbuild] mendexk test failure on Cygwin

Marc Baudoin babafou at babafou.eu.org
Fri Jan 9 09:44:28 CET 2015


Ken Brown <kbrow1i at gmail.com> écrit :
> 
> The following patch fixes the problem for me, but I don't know why it should be platform-specific:
> 
> --- fwrite.c~   2015-01-01 21:53:19.000000000 -0500
> +++ fwrite.c    2015-01-08 13:08:36.096739900 -0500
> @@ -22,9 +22,9 @@
>  #ifdef HAVE___VA_ARGS__
>  /* Use C99 variadic macros if they are supported.  */
>  #define SPRINTF(buf, ...) \
> -    snprintf(buf, sizeof(buf), __VA_ARGS__)
> +    snprintf(buf, BUFFERLEN, __VA_ARGS__)
>  #define SAPPENDF(buf, ...) \
> -    snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), __VA_ARGS__)
> +    snprintf(buf + strlen(buf), BUFFERLEN - strlen(buf), __VA_ARGS__)
>  #else
>  /* Alternatively use static inline functions (all buffers have size BUFFERLEN).  */
>  static inline int SPRINTF(char *buf, const char *format, ...)

Works for me too.


More information about the tlbuild mailing list