linux does not like setbuf on mem stream

This commit is contained in:
Vitor Santos Costa 2016-08-02 18:23:42 -05:00
parent 9ef2f87165
commit 2dbf860a58

View File

@ -213,7 +213,7 @@ int Yap_open_buf_write_stream(encoding_t enc, memBufSource src) {
#if MAY_WRITE #if MAY_WRITE
#if HAVE_OPEN_MEMSTREAM #if HAVE_OPEN_MEMSTREAM
st->file = open_memstream(&st->nbuf, &st->nsize); st->file = open_memstream(&st->nbuf, &st->nsize);
setbuf(st->file, NULL); // setbuf(st->file, NULL);
st->status |= Seekable_Stream_f; st->status |= Seekable_Stream_f;
#else #else
st->file = fmemopen((void *)buf, nchars, "w"); st->file = fmemopen((void *)buf, nchars, "w");