- in posix mode, make ARGV[0] = argv[0] (#525381)
This commit is contained in:
parent
3e8376caf8
commit
4b7ff3f82e
33
gawk-posix-mode-argv0.patch
Normal file
33
gawk-posix-mode-argv0.patch
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
Sun Oct 4 21:46:11 2009 Arnold D. Robbins <arnold@skeeve.com>
|
||||||
|
|
||||||
|
* main.c (main): Don't reset argv[0] to myname. In call
|
||||||
|
to `init_args', pass argv[0] if do_posix. Based on
|
||||||
|
Fedora bug report.
|
||||||
|
|
||||||
|
Index: main.c
|
||||||
|
===================================================================
|
||||||
|
RCS file: /d/mongo/cvsrep/gawk-stable/main.c,v
|
||||||
|
retrieving revision 1.24
|
||||||
|
diff -u -r1.24 main.c
|
||||||
|
--- main.c 9 Jul 2009 19:54:38 -0000 1.24
|
||||||
|
+++ main.c 4 Oct 2009 19:46:06 -0000
|
||||||
|
@@ -306,7 +306,6 @@
|
||||||
|
#undef STACK_SIZE
|
||||||
|
|
||||||
|
myname = gawk_name(argv[0]);
|
||||||
|
- argv[0] = (char *) myname;
|
||||||
|
os_arg_fixup(&argc, &argv); /* emulate redirection, expand wildcards */
|
||||||
|
|
||||||
|
/* remove sccs gunk */
|
||||||
|
@@ -586,7 +585,9 @@
|
||||||
|
optind++;
|
||||||
|
}
|
||||||
|
|
||||||
|
- init_args(optind, argc, myname, argv);
|
||||||
|
+ init_args(optind, argc,
|
||||||
|
+ do_posix ? argv[0] : myname,
|
||||||
|
+ argv);
|
||||||
|
(void) tokexpand();
|
||||||
|
|
||||||
|
#if defined(LC_NUMERIC)
|
||||||
|
|
@ -1,11 +1,13 @@
|
|||||||
Summary: The GNU version of the awk text processing utility
|
Summary: The GNU version of the awk text processing utility
|
||||||
Name: gawk
|
Name: gawk
|
||||||
Version: 3.1.7
|
Version: 3.1.7
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
Group: Applications/Text
|
Group: Applications/Text
|
||||||
URL: http://www.gnu.org/software/gawk/gawk.html
|
URL: http://www.gnu.org/software/gawk/gawk.html
|
||||||
Source0: http://ftp.gnu.org/gnu/gawk/gawk-%{version}.tar.xz
|
Source0: http://ftp.gnu.org/gnu/gawk/gawk-%{version}.tar.xz
|
||||||
|
# Patch from Arnold, the upstream maintainer:
|
||||||
|
Patch0: gawk-posix-mode-argv0.patch
|
||||||
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
||||||
|
|
||||||
Requires(post): /sbin/install-info
|
Requires(post): /sbin/install-info
|
||||||
@ -21,6 +23,7 @@ considered to be a standard Linux tool for processing text.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --bindir=/bin --disable-libsigsegv
|
%configure --bindir=/bin --disable-libsigsegv
|
||||||
@ -69,6 +72,9 @@ fi
|
|||||||
%{_datadir}/awk
|
%{_datadir}/awk
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Oct 8 2009 Stepan Kasal <skasal@redhat.com> - 3.1.7-2
|
||||||
|
- in posix mode, make ARGV[0] = argv[0] (#525381)
|
||||||
|
|
||||||
* Wed Sep 9 2009 Stepan Kasal <skasal@redhat.com> - 3.1.7-1
|
* Wed Sep 9 2009 Stepan Kasal <skasal@redhat.com> - 3.1.7-1
|
||||||
- new upstream version
|
- new upstream version
|
||||||
- disable libsigsegv
|
- disable libsigsegv
|
||||||
|
Loading…
Reference in New Issue
Block a user