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.
This commit is contained in:
Dan Nicholson 2013-03-26 15:33:01 +01:00
parent f6212f6b97
commit 5f9116931d

2
main.c
View file

@ -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;
}