--- coreutils-6.11/man/tail.1.orig	2008-04-19 23:42:12.000000000 +0200
+++ coreutils-6.11/man/tail.1	2008-06-03 16:31:54.645465000 +0200
@@ -52,6 +52,9 @@
 with \fB\-f\fR, sleep for approximately S seconds
 (default 1.0) between iterations.
 .TP
+\fB\-u\fR, \fB\-\-unbuffered\fR
+never buffer output. Useful if stdout is not a terminal
+.TP
 \fB\-v\fR, \fB\-\-verbose\fR
 always output headers giving file names
 .TP
--- coreutils-6.11/doc/coreutils.info.orig	2008-04-19 23:42:08.000000000 +0200
+++ coreutils-6.11/doc/coreutils.info	2008-06-03 16:30:45.759426000 +0200
@@ -2168,6 +2168,10 @@
 `--silent'
      Never print file name headers.
 
+`-u'
+`--unbuffered'
+     Never buffer output. Useful when STDOUT is not a terminal.
+
 `-v'
 `--verbose'
      Always print file name headers.
--- coreutils-6.11/src/tail.c.orig	2008-04-19 23:34:23.000000000 +0200
+++ coreutils-6.11/src/tail.c	2008-06-03 16:26:26.942496000 +0200
@@ -141,6 +141,9 @@
 /* If true, count from start of file instead of end.  */
 static bool from_start;
 
+/* If true, call fflush after each frwite to stdout.  */
+static bool unbuffered;
+
 /* If true, print filename headers.  */
 static bool print_headers;
 
@@ -198,6 +201,7 @@
   {"retry", no_argument, NULL, RETRY_OPTION},
   {"silent", no_argument, NULL, 'q'},
   {"sleep-interval", required_argument, NULL, 's'},
+  {"unbuffered", no_argument, NULL, 'u'},
   {"verbose", no_argument, NULL, 'v'},
   {GETOPT_HELP_OPTION_DECL},
   {GETOPT_VERSION_OPTION_DECL},
@@ -256,7 +260,8 @@
       --pid=PID            with -f, terminate after process ID, PID dies\n\
   -q, --quiet, --silent    never output headers giving file names\n\
   -s, --sleep-interval=S   with -f, sleep for approximately S seconds\n\
-                           (default 1.0) between iterations.\n\
+                           (default 1.0) between iterations\n\
+  -u, --unbuffered         never buffer output\n\
   -v, --verbose            always output headers giving file names\n\
 "), stdout);
      fputs (HELP_OPTION_DESCRIPTION, stdout);
@@ -305,6 +310,7 @@
 {
   if (n_bytes > 0 && fwrite (buffer, 1, n_bytes, stdout) == 0)
     error (EXIT_FAILURE, errno, _("write error"));
+  if (unbuffered) fflush(stdout);
 }
 
 /* Record a file F with descriptor FD, size SIZE, status ST, and
@@ -1453,7 +1459,7 @@
 {
   int c;
 
-  while ((c = getopt_long (argc, argv, "c:n:fFqs:v0123456789",
+  while ((c = getopt_long (argc, argv, "c:n:fFqs:uv0123456789",
 			   long_options, NULL))
 	 != -1)
     {
@@ -1544,6 +1550,10 @@
 	  }
 	  break;
 
+	case 'u':
+	  unbuffered = true;
+	  break;
+
 	case 'v':
 	  *header_mode = always;
 	  break;
@@ -1606,7 +1616,7 @@
   have_read_stdin = false;
 
   count_lines = true;
-  forever = from_start = print_headers = false;
+  unbuffered = forever = from_start = print_headers = false;
   obsolete_option = parse_obsolete_option (argc, argv, &n_units);
   argc -= obsolete_option;
   argv += obsolete_option;
