I had a closer look at the MS and the POSIX doc. It appears that
there is confusion between the two related to how the arguments
are interpreted when the user buffer pointer is null. In the POSIX
doc it clearly states that the count only applies if the user pointer
isn't nill. In the MS doc it clearly states that the count is also the
size of the internally allocated buffer when the user pointer is nill.
It seems that a reasonable compromise will be to specify a buffer
size of BUFSIZ (defined by POSIX and fortunately also by windows).