summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2012-04-07 06:59:28 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2012-04-07 06:59:28 +0000
commit3be55cdbb5fda326dc55eb01c92d6645a2304309 (patch)
tree7b0f025625cf92cfa90d0219a8e14cb29a72b420 /tools
parentb9abd87283ac6e929b7e12a577663bc99e61d020 (diff)
[Cygwin] Work around to flush stdout in a thread, or stdout in threads won't be flushed at exit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154254 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/c-arcmt-test/c-arcmt-test.c3
-rw-r--r--tools/c-index-test/c-index-test.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/tools/c-arcmt-test/c-arcmt-test.c b/tools/c-arcmt-test/c-arcmt-test.c
index b91d3e1b98..56a4132dba 100644
--- a/tools/c-arcmt-test/c-arcmt-test.c
+++ b/tools/c-arcmt-test/c-arcmt-test.c
@@ -97,6 +97,9 @@ typedef struct thread_info {
void thread_runner(void *client_data_v) {
thread_info *client_data = client_data_v;
client_data->result = carcmttest_main(client_data->argc, client_data->argv);
+#ifdef __CYGWIN__
+ fflush(stdout); /* stdout is not flushed on Cygwin. */
+#endif
}
int main(int argc, const char **argv) {
diff --git a/tools/c-index-test/c-index-test.c b/tools/c-index-test/c-index-test.c
index b76661fac6..f82d2d2820 100644
--- a/tools/c-index-test/c-index-test.c
+++ b/tools/c-index-test/c-index-test.c
@@ -2781,6 +2781,9 @@ typedef struct thread_info {
void thread_runner(void *client_data_v) {
thread_info *client_data = client_data_v;
client_data->result = cindextest_main(client_data->argc, client_data->argv);
+#ifdef __CYGWIN__
+ fflush(stdout); /* stdout is not flushed on Cygwin. */
+#endif
}
int main(int argc, const char **argv) {