rem: close_stdout_status (default_exit_status);
add: bool prev_fail = ferror (stdout); bool none_pending = (0 == __fpending (stdout)); bool fclose_fail = fclose (stdout);  if (prev_fail || fclose_fail) { int e = fclose_fail ? errno : 0; char const *write_error;   if (e == EBADF && !prev_fail && none_pending) return;  write_error = _("write error"); if (file_name) error (exit_failure, e, "%s: %s", quotearg_colon (file_name), write_error); else error (exit_failure, e, "%s", write_error); }
context: close_stdout (void){  close_stdout_status (default_exit_status);}