diff --git "a/C:\\Users\\JOHNE~1\\AppData\\Local\\Temp\\gteA977.tmp\\gtestutils-HEAD-left.c" "b/F:\\+GTK-SOURCES\\gnu-windows\\src\\MB3Glib\\glib\\gtestutils.c" index 149bd53..7d9f5d0 100644 --- "a/C:\\Users\\JOHNE~1\\AppData\\Local\\Temp\\gteA977.tmp\\gtestutils-HEAD-left.c" +++ "b/F:\\+GTK-SOURCES\\gnu-windows\\src\\MB3Glib\\glib\\gtestutils.c" @@ -2236,7 +2236,7 @@ child_read (GIOChannel *io, GIOCondition cond, gpointer user_data) GIOStatus status; gsize nread, nwrote, total; gchar buf[4096]; - int echo_fd = -1; + FILE *echo_message = 0; status = g_io_channel_read_chars (io, buf, sizeof (buf), &nread, NULL); if (status == G_IO_STATUS_ERROR || status == G_IO_STATUS_EOF) @@ -2257,21 +2257,21 @@ child_read (GIOChannel *io, GIOCondition cond, gpointer user_data) { g_string_append_len (data->stdout_str, buf, nread); if (data->echo_stdout) - echo_fd = STDOUT_FILENO; + echo_message = stdout; } else { g_string_append_len (data->stderr_str, buf, nread); if (data->echo_stderr) - echo_fd = STDERR_FILENO; + echo_message = stderr; } - if (echo_fd != -1) + if (echo_message) { for (total = 0; total < nread; total += nwrote) { do - nwrote = write (echo_fd, buf + total, nread - total); + nwrote = write (fileno(echo_message), buf + total, nread - total); while (nwrote == -1 && errno == EINTR); if (nwrote == -1) g_error ("write failed: %s", g_strerror (errno));