Joel E. Denny <jdenny <at> clemson.edu> writes:

> Because Sbitset__index is a size_t, wouldn't the following patch be 
> better?
> 
> -  fprintf (file, "nbits = %d, set = {", nbits);
> +  fprintf (file,
> +           "nbits = %" SBITSET__INDEX__CONVERSION_SPEC ", set = {",
> +           nbits);
> 
>  typedef char *Sbitset;
>  typedef size_t Sbitset__Index;
> +#define SBITSET__INDEX__CONVERSION_SPEC "zu"

For this to work on all platforms, you need the gnulib module fprintf-posix 
(sadly, %zu is not completely portable yet).

-- 
Eric Blake





Reply via email to