Fixed option handling rhbz#948598
This commit is contained in:
parent
6dd098d9d8
commit
a01d808e57
|
@ -0,0 +1,41 @@
|
|||
diff -upr sed-4.2.2/sed/sed.c sed-4.2.2_new/sed/sed.c
|
||||
--- sed-4.2.2/sed/sed.c 2013-05-03 13:15:23.841235793 +0200
|
||||
+++ sed-4.2.2_new/sed/sed.c 2013-05-03 13:15:23.842235796 +0200
|
||||
@@ -163,14 +163,21 @@ main(argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
{
|
||||
-#ifdef REG_PERL
|
||||
-#define SHORTOPTS "bcsnrzRuEe:f:l:i::V:"
|
||||
+#if defined(REG_PERL) && \
|
||||
+ (defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) || defined(MSDOS) || defined(__EMX__))
|
||||
+#define SHORTOPTS "bsnrzRuEe:f:l:i::V:"
|
||||
+#elif defined(REG_PERL)
|
||||
+#define SHORTOPTS "snrzRuEe:f:l:i::V:"
|
||||
+#elif defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) || defined(MSDOS) || defined(__EMX__)
|
||||
+#define SHORTOPTS "bsnrzuEe:f:l:i::V:"
|
||||
#else
|
||||
-#define SHORTOPTS "bcsnrzuEe:f:l:i::V:"
|
||||
+#define SHORTOPTS "snrzuEe:f:l:i::V:"
|
||||
#endif
|
||||
|
||||
static struct option longopts[] = {
|
||||
+#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) || defined(MSDOS) || defined(__EMX__)
|
||||
{"binary", 0, NULL, 'b'},
|
||||
+#endif
|
||||
{"regexp-extended", 0, NULL, 'r'},
|
||||
#ifdef REG_PERL
|
||||
{"regexp-perl", 0, NULL, 'R'},
|
||||
@@ -283,10 +290,12 @@ main(argc, argv)
|
||||
posixicity = POSIXLY_BASIC;
|
||||
break;
|
||||
|
||||
+#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) || defined(MSDOS) || defined(__EMX__)
|
||||
case 'b':
|
||||
read_mode = "rb";
|
||||
write_mode = "wb";
|
||||
break;
|
||||
+#endif
|
||||
|
||||
/* Undocumented, for compatibility with BSD sed. */
|
||||
case 'E':
|
7
sed.spec
7
sed.spec
|
@ -6,13 +6,14 @@
|
|||
Summary: A GNU stream text editor
|
||||
Name: sed
|
||||
Version: 4.2.2
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
License: GPLv3+
|
||||
Group: Applications/Text
|
||||
URL: http://sed.sourceforge.net/
|
||||
Source0: ftp://ftp.gnu.org/pub/gnu/sed/sed-%{version}.tar.bz2
|
||||
Source1: http://sed.sourceforge.net/sedfaq.txt
|
||||
Patch0: sed-4.2.2-copy.patch
|
||||
Patch1: sed-4.2.2-fixed-opts.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: glibc-devel, libselinux-devel
|
||||
Requires(post): /sbin/install-info
|
||||
|
@ -31,6 +32,7 @@ specified in a script file or from the command line.
|
|||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .copy
|
||||
%patch1 -p1 -b .fixed-opts
|
||||
|
||||
%build
|
||||
%configure --without-included-regex
|
||||
|
@ -71,6 +73,9 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||
%{_mandir}/man*/*
|
||||
|
||||
%changelog
|
||||
* Fri May 03 2013 Fridolin Pokorny <fpokorny@redhat.com> - 4.2.2-3
|
||||
- Fixed option handling rhbz#948598
|
||||
|
||||
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.2-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
||||
|
||||
|
|
Loading…
Reference in New Issue