|
# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
|
|
#
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
|
# Please add additional copyright information _after_ the line containing
|
|
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
|
|
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
|
|
#
|
|
# ROCK Linux: rock-src/package/base/sed/no-in-place-wo-file.patch
|
|
# ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
|
|
#
|
|
# This patch file is dual-licensed. It is available under the license the
|
|
# patched project is licensed under, as long as it is an OpenSource license
|
|
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
|
|
# of the GNU General Public License as published by the Free Software
|
|
# Foundation; either version 2 of the License, or (at your option) any later
|
|
# version.
|
|
#
|
|
# --- ROCK-COPYRIGHT-NOTE-END ---
|
|
|
|
--- sed-4.1/sed/execute.c 2004-03-13 10:30:39.000000000 +0100
|
|
+++ sed-4.1-jsaw/sed/execute.c 2004-06-24 13:35:57.497606648 +0200
|
|
@@ -654,7 +654,7 @@
|
|
|
|
input->read_fn = read_file_line;
|
|
|
|
- if (in_place_extension)
|
|
+ if (in_place_extension && !(name[0] == '-' && name[1] == '\0'))
|
|
{
|
|
int output_fd;
|
|
char *tmpdir = ck_strdup(name), *p;
|
|
@@ -701,7 +701,7 @@
|
|
if (input->fp != stdin) /* stdin can be reused on tty and tape devices */
|
|
ck_fclose(input->fp);
|
|
|
|
- if (in_place_extension && output_file.fp != NULL)
|
|
+ if (in_place_extension && output_file.fp != NULL && output_file.fp != stdout)
|
|
{
|
|
ck_fclose (output_file.fp);
|
|
if (strcmp(in_place_extension, "*") != 0)
|