diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2013-07-01 18:36:28 +0100 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2013-07-03 09:56:01 +1000 |
commit | a10f48d2dcd24fc4211d69b388f499398891c577 (patch) | |
tree | 92b33ecd02a2fc68959d20aadf9ab4a3b2febd70 | |
parent | 5dce5636d23f366d72f88c341ca1ff9da4427f66 (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.c | 2 | ||||
-rw-r--r-- | src/test_xi2.c | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -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) |