Compare commits

...

4 Commits
rawhide ... f12

Author SHA1 Message Date
Fedora Release Engineering 6e59954045 dist-git conversion 2010-07-28 15:04:01 +00:00
Jan Zeleny db927d1670 fixed precision recognition when using utf-8 encoding (#513234) 2010-04-01 14:24:57 +00:00
Bill Nottingham 4da8eb5a9b Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-26 01:53:20 +00:00
Jesse Keating 6811f91122 Initialize branch F-12 for gawk 2009-09-29 04:53:54 +00:00
5 changed files with 68 additions and 22 deletions

View File

View File

@ -1,21 +0,0 @@
# Makefile for source rpm: gawk
# $Id: Makefile,v 1.1 2004/09/09 04:57:13 cvsdist Exp $
NAME := gawk
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attempt a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

View File

@ -0,0 +1,23 @@
--- gawk-3.1.7/builtin.c.orig 2010-04-01 15:52:45.000000000 +0200
+++ gawk-3.1.7/builtin.c 2010-04-01 15:57:17.000000000 +0200
@@ -1218,9 +1218,18 @@ check_pos:
if (fw == 0 && ! have_prec)
;
else if (gawk_mb_cur_max > 1 && (cs1 == 's' || cs1 == 'c')) {
+ int nchars_needed = 0;
+
assert(cp == arg->stptr || cp == cpbuf);
- copy_count = mbc_byte_count(arg->stptr,
- cs1 == 's' ? arg->stlen : 1);
+
+ if (cs1 == 'c')
+ nchars_needed = 1;
+ else if (have_prec)
+ nchars_needed = prec;
+ else
+ nchars_needed = arg->stlen;
+
+ copy_count = mbc_byte_count(arg->stptr, nchars_needed);
}
bchunk(cp, copy_count);
while (fw > prec) {

View 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)

View File

@ -1,11 +1,14 @@
Summary: The GNU version of the awk text processing utility
Name: gawk
Version: 3.1.7
Release: 1%{?dist}
Release: 3%{?dist}
License: GPLv3+
Group: Applications/Text
URL: http://www.gnu.org/software/gawk/gawk.html
Source0: http://ftp.gnu.org/gnu/gawk/gawk-%{version}.tar.xz
# Patch from Arnold, the upstream maintainer:
Patch0: gawk-posix-mode-argv0.patch
Patch1: gawk-3.1.7-prec-utf8.patch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
Requires(post): /sbin/install-info
@ -21,6 +24,8 @@ considered to be a standard Linux tool for processing text.
%prep
%setup -q
%patch0
%patch1 -p1 -b .prec-utf8
%build
%configure --bindir=/bin --disable-libsigsegv
@ -69,6 +74,12 @@ fi
%{_datadir}/awk
%changelog
* Thu Apr 01 2010 Jan Zeleny <jzeleny@redhat.com> - 3.1.7-3
- fix issue with utf8 precision recognition (#513234)
* 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
- new upstream version
- disable libsigsegv