summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2013-03-26 15:33:01 +0100
committerDan Nicholson <dbn.lists@gmail.com>2013-04-09 05:41:38 -0700
commit5f9116931d807a6942385244ca097b58bd53ab03 (patch)
tree595a92d18be5d780d6e2274171931706c1f342b7 /main.c
parentf6212f6b974cc926ff66fad9eecd1f28d38cd46e (diff)
downloadpkg-config-5f9116931d807a6942385244ca097b58bd53ab03.tar.gz
Flush stderr when not immediately exiting
When printing warnings on stderr that don't immediately exit pkg-config, flush it so that the messages appear in order with stdout. This is mostly to keep the test suite passing on Windows where output may appear differently than on Linux.
Diffstat (limited to 'main.c')
-rw-r--r--main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/main.c b/main.c
index b61ca34..c937efc 100644
--- a/main.c
+++ b/main.c
@@ -190,6 +190,7 @@ output_opt_cb (const char *opt, const char *arg, gpointer data,
{
fprintf (stderr, "Ignoring incompatible output option \"%s\"\n",
opt);
+ fflush (stderr);
return TRUE;
}
}
@@ -322,6 +323,7 @@ process_package_args (const char *cmdline, GList **packages, FILE *log)
if (reqs == NULL)
{
fprintf (stderr, "Must specify package names on the command line\n");
+ fflush (stderr);
return FALSE;
}