Changeset 3194 for trunk/src/kmk/output.c
- Timestamp:
- Mar 27, 2018, 4:05:17 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/output.c
r3193 r3194 94 94 void *sem = acquire_semaphore (); 95 95 96 # ifndef KMK /* this drives me bananas. */ 96 97 /* Log the working directory for this dump. */ 97 98 if (print_directory_flag && output_sync != OUTPUT_SYNC_RECURSE) 98 99 traced = log_working_directory (1); 100 # endif 99 101 100 102 /* Work the out and err sequences in parallel. */ … … 124 126 fflush(prevdst); 125 127 prevdst = dst; 126 # ifdef KBUILD_OS_WINDOWS128 # ifdef KBUILD_OS_WINDOWS 127 129 maybe_con_fwrite (src, len, 1, dst); 128 # else130 # else 129 131 fwrite (src, len, 1, dst); 130 # endif132 # endif 131 133 } 132 134 if (prevdst) 133 135 fflush (prevdst); 134 136 137 # ifndef KMK /* this drives me bananas. */ 135 138 if (traced) 136 139 log_working_directory (0); 140 # endif 137 141 138 142 /* Exit the critical section. */ … … 599 603 600 604 #ifdef WINDOWS32 605 # ifdef CONFIG_NEW_WIN_CHILDREN 606 if (STREAM_OK (stdout)) 607 { 608 if (STREAM_OK (stderr)) 609 { 610 char mtxname[256]; 611 sync_handle = create_mutex (mtxname, sizeof (mtxname)); 612 if (sync_handle != -1) 613 { 614 prepare_mutex_handle_string (mtxname); 615 return same_stream (stdout, stderr); 616 } 617 perror_with_name ("output-sync suppressed: ", "create_mutex"); 618 } 619 else 620 perror_with_name ("output-sync suppressed: ", "stderr"); 621 } 622 else 623 perror_with_name ("output-sync suppressed: ", "stdout"); 624 output_sync = OUTPUT_SYNC_NONE; 625 626 # else /* !CONFIG_NEW_WIN_CHILDREN */ 601 627 if ((!STREAM_OK (stdout) && !STREAM_OK (stderr)) 602 628 || (sync_handle = create_mutex ()) == -1) … … 610 636 prepare_mutex_handle_string (sync_handle); 611 637 } 638 # endif /* !CONFIG_NEW_WIN_CHILDREN */ 612 639 613 640 #else … … 1032 1059 #endif 1033 1060 1061 #ifndef KMK 1034 1062 /* If we're not syncing this output per-line or per-target, make sure we emit 1035 1063 the "Entering..." message where appropriate. */ 1036 1064 if (output_sync == OUTPUT_SYNC_NONE || output_sync == OUTPUT_SYNC_RECURSE) 1065 #else 1066 /* Indiscriminately output "Entering..." and "Leaving..." message for each 1067 command line or target is plain annoying! And when there is no recursion 1068 it's actually inappropriate. Haven't got a simple way of detecting that, 1069 so back to the old behavior for now. [bird] */ 1070 #endif 1037 1071 if (! stdio_traced && print_directory_flag) 1038 1072 stdio_traced = log_working_directory (1);
Note:
See TracChangeset
for help on using the changeset viewer.