mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-24 11:58:10 +01:00
1e7dbf7abc
It turns out that our use of GMimeStreamPipe has only succeeded because gmime has been ignoring some seek failures; this will no longer be the case in gmime 3.0, so we use a GMimeStreamPipe, which does not assume seekability, wrapped in a buffering stream.
20 lines
492 B
C
20 lines
492 B
C
#include "gmime-extra.h"
|
|
|
|
GMimeStream *
|
|
g_mime_stream_stdout_new()
|
|
{
|
|
GMimeStream *stream_stdout = NULL;
|
|
GMimeStream *stream_buffered = NULL;
|
|
|
|
stream_stdout = g_mime_stream_pipe_new (STDOUT_FILENO);
|
|
if (!stream_stdout)
|
|
return NULL;
|
|
|
|
g_mime_stream_pipe_set_owner (GMIME_STREAM_PIPE (stream_stdout), FALSE);
|
|
|
|
stream_buffered = g_mime_stream_buffer_new (stream_stdout, GMIME_STREAM_BUFFER_BLOCK_WRITE);
|
|
|
|
g_object_unref (stream_stdout);
|
|
|
|
return stream_buffered;
|
|
}
|