summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2013-04-03 03:11:53 +0000
committerguenther <guenther@openbsd.org>2013-04-03 03:11:53 +0000
commit41a2a03b953831c1fcf92429a54dbbd396465eb2 (patch)
tree1077106616d5dafcf67958a2751d64859d7fbbe0 /lib/libc/stdio
parentHandle big time_t (diff)
downloadwireguard-openbsd-41a2a03b953831c1fcf92429a54dbbd396465eb2.tar.xz
wireguard-openbsd-41a2a03b953831c1fcf92429a54dbbd396465eb2.zip
Set the stream orientation in open_{,w}memstream().
Check it in the regress test ok mpi@
Diffstat (limited to 'lib/libc/stdio')
-rw-r--r--lib/libc/stdio/open_memstream.c3
-rw-r--r--lib/libc/stdio/open_wmemstream.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/libc/stdio/open_memstream.c b/lib/libc/stdio/open_memstream.c
index bd96874e959..46105358d33 100644
--- a/lib/libc/stdio/open_memstream.c
+++ b/lib/libc/stdio/open_memstream.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: open_memstream.c,v 1.2 2013/03/27 15:06:25 mpi Exp $ */
+/* $OpenBSD: open_memstream.c,v 1.3 2013/04/03 03:11:53 guenther Exp $ */
/*
* Copyright (c) 2011 Martin Pieuchot <mpi@openbsd.org>
@@ -152,6 +152,7 @@ open_memstream(char **pbuf, size_t *psize)
fp->_write = memstream_write;
fp->_seek = memstream_seek;
fp->_close = memstream_close;
+ _SET_ORIENTATION(fp, -1);
return (fp);
}
diff --git a/lib/libc/stdio/open_wmemstream.c b/lib/libc/stdio/open_wmemstream.c
index 2b8677c3b6a..4ba4cfdc1b5 100644
--- a/lib/libc/stdio/open_wmemstream.c
+++ b/lib/libc/stdio/open_wmemstream.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: open_wmemstream.c,v 1.1 2013/03/27 15:06:25 mpi Exp $ */
+/* $OpenBSD: open_wmemstream.c,v 1.2 2013/04/03 03:11:53 guenther Exp $ */
/*
* Copyright (c) 2011 Martin Pieuchot <mpi@openbsd.org>
@@ -163,6 +163,7 @@ open_wmemstream(wchar_t **pbuf, size_t *psize)
fp->_write = wmemstream_write;
fp->_seek = wmemstream_seek;
fp->_close = wmemstream_close;
+ _SET_ORIENTATION(fp, 1);
return (fp);
}