summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2013-07-01 18:36:28 +0100
committerPeter Hutterer <peter.hutterer@who-t.net>2013-07-03 09:56:01 +1000
commita10f48d2dcd24fc4211d69b388f499398891c577 (patch)
tree92b33ecd02a2fc68959d20aadf9ab4a3b2febd70
parent5dce5636d23f366d72f88c341ca1ff9da4427f66 (diff)
Use setvbuf() instead of setlinebuf()
setlinebuf() added in commit bcfa9123b41da8048450ed27aaeffff17b8eee99 is not in SuS v3, use the exactly equivalent C89 setvbuf() invocation for portability Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/test.c2
-rw-r--r--src/test_xi2.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/test.c b/src/test.c
index 0c95501..efd268a 100644
--- a/src/test.c
+++ b/src/test.c
@@ -98,7 +98,7 @@ print_events(Display *dpy)
{
XEvent Event;
- setlinebuf(stdout);
+ setvbuf(stdout, NULL, _IOLBF, 0);
while(1) {
XNextEvent(dpy, &Event);
diff --git a/src/test_xi2.c b/src/test_xi2.c
index 04e1004..3139d72 100644
--- a/src/test_xi2.c
+++ b/src/test_xi2.c
@@ -326,7 +326,7 @@ test_xi2(Display *display,
int deviceid = -1;
int rc;
- setlinebuf(stdout);
+ setvbuf(stdout, NULL, _IOLBF, 0);
rc = list(display, argc, argv, name, desc);
if (rc != EXIT_SUCCESS)