<p>In <a href="https://github.com/geany/geany/pull/1070#discussion_r71964681">ctags/main/mio.c</a>:</p>
<pre style='color:#555'>> +            int rv = -1;
> +          size_t n;
> +          size_t old_pos;
> +          size_t old_size;
> +          va_list ap_copy;
> +          char c;
> +
> +          old_pos = mio->impl.mem.pos;
> +          old_size = mio->impl.mem.size;
> +          va_copy (ap_copy, ap);
> +          /* compute the size we will need into the buffer */
> +          n = vsnprintf (&c, 1, format, ap_copy);
> +          va_end (ap_copy);
> +          if (mem_try_ensure_space (mio, n))
> +          {
> +                  unsigned char c;
</pre>
<blockquote>
<p>I believe users with systems without open_memstream() would find it useful.</p>
</blockquote>

<p>There's also <code>fmemopen</code> which is part of POSIX 2008 standard I believe.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/pull/1070/files/f95656cbe818d69bb4432d14b978ec83764872b2#r71964681">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ6If15BHUO1mnPiYhGmzBcimZLMzks5qYXD_gaJpZM4IzlZ-">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJz78g83T9RsD_zPVzhJsOxjcZdAsks5qYXD_gaJpZM4IzlZ-.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/pull/1070/files/f95656cbe818d69bb4432d14b978ec83764872b2#r71964681"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>