diff -rc coreutils-7.5.orig/src/cat.c coreutils-7.5/src/cat.c
*** coreutils-7.5.orig/src/cat.c	2009-08-15 15:25:32.000000000 +0000
--- coreutils-7.5/src/cat.c	2009-08-15 15:25:32.000000000 +0000
***************
*** 661,667 ****
      {
        file_open_mode |= O_BINARY;
        if (O_BINARY && ! isatty (STDOUT_FILENO))
! 	xfreopen (NULL, "wb", stdout);
      }
  
    /* Check if any of the input files are the same as the output file.  */
--- 661,668 ----
      {
        file_open_mode |= O_BINARY;
        if (O_BINARY && ! isatty (STDOUT_FILENO))
! 	xfreopen (NULL, fcntl (STDOUT_FILENO, F_GETFL) & O_APPEND ? "ab" : "wb",
! 		 stdout);
      }
  
    /* Check if any of the input files are the same as the output file.  */
diff -rc coreutils-7.5.orig/src/head.c coreutils-7.5/src/head.c
*** coreutils-7.5.orig/src/head.c	2009-08-15 15:25:32.000000000 +0000
--- coreutils-7.5/src/head.c	2009-08-15 15:25:32.000000000 +0000
***************
*** 1053,1059 ****
  	       : default_file_list);
  
    if (O_BINARY && ! isatty (STDOUT_FILENO))
!     xfreopen (NULL, "wb", stdout);
  
    for (i = 0; file_list[i]; ++i)
      ok &= head_file (file_list[i], n_units, count_lines, elide_from_end);
--- 1053,1060 ----
  	       : default_file_list);
  
    if (O_BINARY && ! isatty (STDOUT_FILENO))
!     xfreopen (NULL, fcntl (STDOUT_FILENO, F_GETFL) & O_APPEND ? "ab" : "wb",
! 	    stdout);
  
    for (i = 0; file_list[i]; ++i)
      ok &= head_file (file_list[i], n_units, count_lines, elide_from_end);
diff -rc coreutils-7.5.orig/src/tac.c coreutils-7.5/src/tac.c
*** coreutils-7.5.orig/src/tac.c	2009-08-15 15:25:32.000000000 +0000
--- coreutils-7.5/src/tac.c	2009-08-15 15:25:32.000000000 +0000
***************
*** 648,654 ****
  	  : default_file_list);
  
    if (O_BINARY && ! isatty (STDOUT_FILENO))
!     xfreopen (NULL, "wb", stdout);
  
    {
      size_t i;
--- 648,655 ----
  	  : default_file_list);
  
    if (O_BINARY && ! isatty (STDOUT_FILENO))
!     xfreopen (NULL, fcntl (STDOUT_FILENO, F_GETFL) & O_APPEND ? "ab" : "wb",
! 	     stdout);
  
    {
      size_t i;
diff -rc coreutils-7.5.orig/src/tail.c coreutils-7.5/src/tail.c
*** coreutils-7.5.orig/src/tail.c	2009-08-15 15:25:32.000000000 +0000
--- coreutils-7.5/src/tail.c	2009-08-15 15:25:32.000000000 +0000
***************
*** 1964,1970 ****
      print_headers = true;
  
    if (O_BINARY && ! isatty (STDOUT_FILENO))
!     xfreopen (NULL, "wb", stdout);
  
    for (i = 0; i < n_files; i++)
      ok &= tail_file (&F[i], n_units);
--- 1964,1971 ----
      print_headers = true;
  
    if (O_BINARY && ! isatty (STDOUT_FILENO))
!     xfreopen (NULL, fcntl (STDOUT_FILENO, F_GETFL) & O_APPEND ? "ab" : "wb",
! 	     stdout);
  
    for (i = 0; i < n_files; i++)
      ok &= tail_file (&F[i], n_units);
diff -rc coreutils-7.5.orig/src/tee.c coreutils-7.5/src/tee.c
*** coreutils-7.5.orig/src/tee.c	2009-08-15 15:25:32.000000000 +0000
--- coreutils-7.5/src/tee.c	2009-08-15 15:25:32.000000000 +0000
***************
*** 155,161 ****
    if (O_BINARY && ! isatty (STDIN_FILENO))
      xfreopen (NULL, "rb", stdin);
    if (O_BINARY && ! isatty (STDOUT_FILENO))
!     xfreopen (NULL, "wb", stdout);
  
    /* In the array of NFILES + 1 descriptors, make
       the first one correspond to standard output.   */
--- 155,162 ----
    if (O_BINARY && ! isatty (STDIN_FILENO))
      xfreopen (NULL, "rb", stdin);
    if (O_BINARY && ! isatty (STDOUT_FILENO))
!     xfreopen (NULL, fcntl (STDOUT_FILENO, F_GETFL) & O_APPEND ? "ab" : "wb",
! 	    stdout);
  
    /* In the array of NFILES + 1 descriptors, make
       the first one correspond to standard output.   */
diff -rc coreutils-7.5.orig/src/tr.c coreutils-7.5/src/tr.c
*** coreutils-7.5.orig/src/tr.c	2009-08-15 15:25:32.000000000 +0000
--- coreutils-7.5/src/tr.c	2009-08-15 15:25:32.000000000 +0000
***************
*** 1752,1758 ****
    if (O_BINARY && ! isatty (STDIN_FILENO))
      xfreopen (NULL, "rb", stdin);
    if (O_BINARY && ! isatty (STDOUT_FILENO))
!     xfreopen (NULL, "wb", stdout);
  
    if (squeeze_repeats && non_option_args == 1)
      {
--- 1752,1759 ----
    if (O_BINARY && ! isatty (STDIN_FILENO))
      xfreopen (NULL, "rb", stdin);
    if (O_BINARY && ! isatty (STDOUT_FILENO))
!     xfreopen (NULL, fcntl (STDOUT_FILENO, F_GETFL) & O_APPEND ? "ab" : "wb",
! 	     stdout);
  
    if (squeeze_repeats && non_option_args == 1)
      {
