> Posix 2008 does have fmemopen(), but it's unsuitable, as it is buffer with specified size (which would need to be calculated, as in the MS case), rather than not worried about until a NUL byte is reached.
With fmemopen(), you only need to calculate the length once at the start, right? And then you can use the stream instead.
With fmemopen(), you only need to calculate the length once at the start, right? And then you can use the stream instead.