--- dash-0.5.4.orig/debian/copyright +++ dash-0.5.4/debian/copyright @@ -0,0 +1,46 @@ +This package was debianized by Mark W. Eichin eichin@kitten.gen.ma.us on +Mon, 24 Feb 1997 16:00:16 -0500. + +This package was re-ported from NetBSD and debianized by +Herbert Xu herbert@debian.org on Thu, 19 Jun 1997 19:29:16 +1000. + +This package was adopted by Gerrit Pape on +Fri, 28 May 2004 18:38:18 +0000. + +It was downloaded from http://gondor.apana.org.au/~herbert/dash/files/ + +Copyright: + +Copyright (c) 1989-1994 + The Regents of the University of California. All rights reserved. +Copyright (c) 1997 Christos Zoulas. All rights reserved. +Copyright (c) 1997-2005 + Herbert Xu . All rights reserved. + +This code is derived from software contributed to Berkeley by Kenneth Almquist. + +Please refer to /usr/share/common-licenses/BSD for details. + +mksignames.c: + +This file is not directly linked with dash. However, its output is. + +Copyright (C) 1992 Free Software Foundation, Inc. + +This file is part of GNU Bash, the Bourne Again SHell. + +Bash is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 2, or (at your option) any later +version. + +Bash is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License with +your Debian GNU/Linux system, in /usr/share/common-licenses/GPL, or with the +Debian GNU/Linux hello source package as the file COPYING. If not, +write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, +Boston, MA 02111 USA. --- dash-0.5.4.orig/debian/dash.config +++ dash-0.5.4/debian/dash.config @@ -0,0 +1,39 @@ +#!/bin/sh +# +# debconf script for the Debian GNU/Linux ash package +# +# $Id: dash.config,v 1.1 2002/09/14 06:17:50 herbert Exp $ + +set -e + +. /usr/share/debconf/confmodule + +db_version 2.0 + +if [ "$1" = configure ] && [ -z "$2" ]; then + set +e + db_fget ash/sh seen + err=$? + set -e + + case $err in + 0) + if [ "$RET" = true ]; then + db_fset dash/sh seen true + db_get ash/sh + db_set dash/sh "$RET" + exit + fi + ;; + 10) + # ash/sh does not exist + ;; + *) + echo "db_fget exited with $err" >&2 + exit $err + ;; + esac +fi + +db_input low dash/sh || true +db_go --- dash-0.5.4.orig/debian/changelog +++ dash-0.5.4/debian/changelog @@ -0,0 +1,1694 @@ +dash (0.5.4-12ubuntu1) jaunty; urgency=low + + * Merge from debian unstable, remaining changes: + - Make the package both "required" and "Essential" since this is our + default system shell. + - Add dependency on debianutils so /etc/shells exists before + we are configured + - If the dash/sh question has not been seen by the user, reset it to + the default which is now true. + - Add -l option (Eric Chan). LP: #102105. + + -- Scott James Remnant Wed, 05 Nov 2008 06:37:14 +0000 + +dash (0.5.4-12) unstable; urgency=low + + * debian/po/nl.po: [INTL:nl] Updated debconf templates translation + for Dutch (thx Thijs Kinkhorst, closes: #492069). + * debian/po/pt.po: [INTL:pt] Updated Portuguese translation for + debconf messages (thx Traduz - Portuguese Translation Team, + closes: #489805). + * debian/po/sv.po: [INTL:sv] po-debconf file for dash (thx Martin + Ågren, closes: #491532). + + -- Gerrit Pape Mon, 25 Aug 2008 19:47:04 +0000 + +dash (0.5.4-11) unstable; urgency=low + + * debian/diff/0045-Fix-null-pointer-dereference.diff, + debian/diff/0046-Fix-bitwise-AND-and-OR-operator-parsing.diff, + debian/diff/0047--MAN-add-missing-right-parenthesis...diff: remove; + applied upstream. + * debian/diff/0048--SHELL-add-l-option-to-force-login-shell.diff: + remove; fixed upstream. + * debian/diff/0044--*..0061--*: new; from upstream git. + * 0055--BUILTIN-Fixed-3-4-argument-cases-for-test-per-POSIX.diff: + [BUILTIN] Fixed 3,4-argument cases for test per POSIX (closes: + #455828). + * debian/diff/0044-run-aclocal-autoconf-autoheader-automake.diff: + redo as 0062-run-aclocal-autoconf-autoheader-automake.diff. + + -- Gerrit Pape Wed, 16 Jul 2008 19:24:54 +0000 + +dash (0.5.4-10) unstable; urgency=low + + * debian/po/it.po: [INTL:it] Italian debconf templates translation + (thx Luca Monducci, closes: #479361). + * debian/po/ru.po: [INTL:ru] Russian debconf templates translation + update (thx Yuri Kozlov, closes: #479592). + * debian/po/gl.po: [INTL:gl] Galician debconf template translation + for dash (thx Jacobo Tarrio, closes: #480978). + * debian/po/ja.po: [INTL:ja] updated Japanese debconf translation + (thx Kenshi Muto, closes: #483509). + * debian/control: Homepage: http://gondor.apana.org.au/~herbert/dash/ + (closes: #484665). + * debian/diff/0047--MAN-add-missing-right-parenthesis...diff: new; + [MAN] add missing right parenthesis in section Redirection (closes: + #481365). + * debian/diff/0048--SHELL-add-l-option-to-force-login...diff: new; + [SHELL] add -l option to force login shell (closes: #483287). + * debian/po/tr.po: new; [INTL:tr] Turkish debconf template translation + for dash (thx Mert Dirik, closes: #486571). + * debian/po/bg.po: new; [INTL:bg] Bulgarian debconf translation (thx + Damyan Ivanov, closes: #486800). + * debian/po/vi.po: [INTL:vi] Vietnamese debconf templates translation + update (thx Clytie Siddall, closes: #486801). + * debian/po/cs.po: [l10n] Updated Czech translation of dash debconf + messages (thx Miroslav Kure, closes: #487266). + * debian/po/pt.po: [INTL:pt] Updated Portuguese translation for + debconf messages (thx Ricardo Silva, closes: #487290). + * debian/po/ko.po: [INTL:ko] Korean dash debconf PO translation (thx + Sunjae Park, closes: #487897). + * debian/po/eu.po: new; [INTL:eu] dash debconf templates Basque + translation (thx xabier bilbao, closes: #488057). + * debian/po/pt_BR.po: [INTL:pt_BR] Brazilian Portuguese debconf + templates (thx Adriano Rafael Gomes, closes: #488390). + * debian/po/ro.po: new; [l10n:ro] dash: New Romanian translation of + po-debconf templates (thx Eddy Petrișor, closes: #488435). + * debian/control: Standards-Version: 3.8.0.1. + + -- Gerrit Pape Sun, 06 Jul 2008 15:59:18 +0000 + +dash (0.5.4-9ubuntu1) intrepid; urgency=low + + * Merge from debian unstable, remaining changes: + - Change default answer for "Install dash as /bin/sh?" question to true. + - debian/control: + + set Priority to "required" + + add dependency on debianutils so /etc/shells exists before + we are configured + + set Essential. + - debian/dash.postinst: + + If the dash/sh question has not been seen by the user, reset it to + the default which is now true + - Added lpia to the list of DIET_ARCHS in debian/rules, to match i386. + - Add -l option (Eric Chan). Addresses LP #102105. + + -- Michael Vogt Fri, 20 Jun 2008 17:49:50 +0200 + +dash (0.5.4-9) unstable; urgency=low + + * debian/diff/0046-Fix-bitwise-AND-and-OR-operator-parsing.diff: new: + Fix bitwise AND and OR operator parsing (closes: #470914). + * debian/dash.menu: change menu section from Apps/Shells to + Applications/Shells (thx Christian Perrier). + * debian/po/fr.po: [INTL:fr] French debconf templates translation update + (thx Christian Perrier, closes: #469253). + * debian/po/fi.po: [INTL:fi] Updated Finnish translation of the debconf + templates (thx Esko Arajärvi, closes: #469466). + * debian/po/de.po: [INTL:de] updated German debconf translation (thx + Helge Kreutzmann, closes: #469755). + + -- Gerrit Pape Thu, 17 Apr 2008 20:34:15 +0000 + +dash (0.5.4-8ubuntu1) hardy; urgency=low + + * Merge with Debian; remaining changes: + - Change default answer for "Install dash as /bin/sh?" question to true. + - debian/control: + + set Priority to "required" + + add dependency on debianutils so /etc/shells exists before + we are configured + + set Essential. + - debian/dash.postinst: + + If the dash/sh question has not been seen by the user, reset it to + the default which is now true + - Added lpia to the list of DIET_ARCHS in debian/rules, to match i386. + - Add -l option (Eric Chan). Addresses LP #102105. + + -- Matthias Klose Wed, 12 Mar 2008 11:14:46 +0100 + +dash (0.5.4-8) unstable; urgency=low + + * debian/diff/0045-Fix-null-pointer-dereference.diff: new from Larry + Doolittle, blessed by upstream: Fix null pointer dereference (thx!, + closes: #467065; most probably closes: #462414, #462977, #463649, + #467358, #468376, #468449, #468837, #469102). + * debian/dash.templates.in: don't mention 'distribution policy' or + 'Debian policy' at all, but talk only about POSIX-compliance; run + debconf-updatepo (closes: #455550). + * debian/control: Standards-Version: 3.7.3.0. + + -- Gerrit Pape Sun, 02 Mar 2008 21:36:20 +0000 + +dash (0.5.4-7) unstable; urgency=low + + * debian/po/nl.po: [INTL:nl] New po-debconf translation in Dutch for dash + (thx Tim Dijkstra, closes: #458425). + * debian/rules: apply patch for cross building support, slightly modified + (thx Neil Williams, closes: #450512). + + -- Gerrit Pape Wed, 13 Feb 2008 19:19:53 +0000 + +dash (0.5.4-6ubuntu1) hardy; urgency=low + + * Merge from Debian; remaining changes: + - Change default answer for "Install dash as /bin/sh?" question to true. + - debian/control: + + set Priority to "required" + + add dependency on debianutils so /etc/shells exists before + we are configured + + set Essential. + - debian/dash.postinst: + + If the dash/sh question has not been seen by the user, reset it to + the default which is now true + - Added lpia to the list of DIET_ARCHS in debian/rules, to match i386. + * Add -l option (Eric Chan). Addresses LP #102105. + + -- Matthias Klose Wed, 06 Feb 2008 14:18:50 +0000 + +dash (0.5.4-6) unstable; urgency=low + + * debian/control: add Vcs-Git: http://smarden.org/git/dash.git/. + * debian/diff/0041-PARSER-Add-FAKEEOFMARK-for-expandstr.diff, + debian/diff/0042-PARSER-Do-not-show-prompts-in-expandstr.diff: new + from upstream git. + * debian/diff/0043-EXPAND-Fix-slash-treatment-in-expmeta.diff: new + from upstream git: [EXPAND] Fix slash treatment in expmeta (closes: + #458687, #458690, #459049). + * debian/diff/0041-run-aclocal-autoconf-autoheader-automake.diff: redo + as debian/diff/0044-run-aclocal-autoconf-autoheader-automake.diff. + * debian/dash.templates.in: remove empty line after comments, hmm. + + -- Gerrit Pape Mon, 07 Jan 2008 10:37:47 +0000 + +dash (0.5.4-5) unstable; urgency=low + + * debian/diff/0038-EVAL-Fix-unaligned-trap-on-sparc.diff: applied + upstream, rename to + 0038-EVAL-Fix-bad-pointer-arithmetic-in-evalcommand.diff. + * debian/diff/0039-ARITH-If-imaxdiv-isn-t-available-use-and-ope.diff: + applied upstream, rename to + 0040-ARITH-If-imaxdiv-isn-t-available-use-and-ope.diff. + * debian/diff/0040-run-aclocal-autoconf-autoheader-automake.diff: redo + as debian/diff/0041-run-aclocal-autoconf-autoheader-automake.diff. + * debian/diff/0039-BUILTIN-Add-set-o-support.diff: new; from upstream + git: Add set +o support (closes: #456990). + * debian/diff/ja.po: remove again, doh. + + -- Gerrit Pape Thu, 27 Dec 2007 12:23:12 +0000 + +dash (0.5.4-4ubuntu1) hardy; urgency=low + + * Merge from Debian unstable, remaining changes: + - Change default answer for "Install dash as /bin/sh?" question to true. + - debian/control: + + set Priority to "required" + + add dependency on debianutils so /etc/shells exists before + we are configured + - debian/dash.postinst: + + If the dash/sh question has not been seen by the user, reset it to + the default which is now true + - Added lpia to the list of DIET_ARCHS in debian/rules, to match i386. + * debian/control: + - set Essential: yes, but this needs to be set in the binary package + stanza, not in the source package stanza. + + -- Steve Langasek Sat, 22 Dec 2007 00:02:46 -0800 + +dash (0.5.4-4) unstable; urgency=low + + * debian/diff/0038-EVAL-Fix-unaligned-trap-on-sparc.diff: new; fix + unaligned trap on sparc (thx Steve Langasek, closes: #456399). + * debian/diff/0039-ARITH-If-imaxdiv-isn-t-available-use-and-ope.diff: new; + if imaxdiv() isn't available, use / and % operators (closes: #456398). + * debian/diff/0038-run-aclocal-autoconf-autoheader-automake.diff: redo + as debian/diff/0040-*. + * debian/po/vi.po: [INTL:vi] Vietnamese debconf templates translation + update (thx Clytie Siddall, closes: #453625). + * debian/diff/ja.po: new; [INTL:ja] Japanese debconf translation (thx + Kenshi Muto, closes: #446573). + + -- Gerrit Pape Fri, 21 Dec 2007 09:21:34 +0000 + +dash (0.5.4-3ubuntu2) hardy; urgency=low + + * Fix unaligned trap on sparc that broke our own postrm, and the buildds. + + -- Steve Langasek Fri, 14 Dec 2007 12:31:15 -0800 + +dash (0.5.4-3ubuntu1) hardy; urgency=low + + * Merge from debian unstable, remaining changes: + - Change default answer for "Install dash as /bin/sh?" question to true. + - debian/control: + + set Priority to "required" + + set Essential to "yes" + + add dependency on debianutils so /etc/shells exists before + we are configured + - debian/dash.postinst: + + If the dash/sh question has not been seen by the user, reset it to + the default which is now true + - Added lpia to the list of DIET_ARCHS in debian/rules, to match i386. + * dropped, taken upstream: + - Build against glibc instead of dietlibc + + -- Michael Vogt Thu, 13 Dec 2007 11:10:28 +0100 + +dash (0.5.4-3) unstable; urgency=low + + * debian/diff/0005-*..0037-*: new: from upstream git. + * 0025-*: Report substition errors at expansion time (closes: #418774). + * debian/diff/0005-dash.1-clarify-description-of-nt-ot-options-to-te.diff, + debian/diff/0006-dash.1-clarify-syntax-of-the-for-command.diff: remove; + applied upstream. + * debian/rules: no longer build dash.udeb package (on request of Otavio + Salvador, closes: #439139, #431312). + * debian/control: no longer Build-Depends: dietlibc; remove dash.udeb + package. + * Debconf templates and debian/control reviewed by the debian-l10n- + english team as part of the Smith review project (thx Christian Perrier + for the patch, closes: #449517): + * Convert debian/changelog to UTF-8 (closes: #451080, #453962, #453960). + * [Debconf translation updates] + * Galician (closes: #450864). + * Finnish (closes: #451015). + * Korean (closes: #451419). + * Italian (closes: #451607). + * Czech (closes: #451826). + * German (closes: #452173). + * Russian (closes: #452733). + * Portuguese (closes: #453038). + + -- Gerrit Pape Mon, 10 Dec 2007 13:18:14 +0000 + +dash (0.5.4-2ubuntu1) hardy; urgency=low + + * Merge from debian unstable, remaining changes: + - Build against glibc instead of dietlibc + - Change default answer for "Install dash as /bin/sh?" question to true. + - debian/control: + + set Priority to "required" + + set Essential to "yes" + + add dependency on debianutils so /etc/shells exists before + we are configured + - debian/dash.postinst: + + If the dash/sh question has not been seen by the user, reset it to + the default which is now true + - Added lpia to the list of DIET_ARCHS in debian/rules, to match i386. + + -- Michael Vogt Tue, 13 Nov 2007 10:09:38 +0100 + +dash (0.5.4-2) unstable; urgency=low + + * debian/diff/0001-SHELL-Restore-foreground-process-group-on-exit.diff: + new; from upstream git, replaces + debian/diff/0001-Restore-pgrp-on-exit-fix-backgrounded-MC-bug.diff. + * debian/diff/0002-SHELL-Move-flushall-to-the-point-just-before-_exit.diff, + debian/diff/0003-BUILTIN-test-White-space-fixes.diff, + debian/diff/0004-BUILTIN-test-little-size-and-speed-optimizations.diff: + new; from upstream git (closes: #431320). + * debian/diff/0005-dash.1-clarify-description-of-nt-ot-options-to-te.diff: + new; dash.1: clarify description of -nt, -ot options to test builtin + (closes: #373611). + * debian/diff/0006-dash.1-clarify-syntax-of-the-for-command.diff: new; + dash.1: clarify syntax of the for command (closes: #387441). + + -- Gerrit Pape Tue, 25 Sep 2007 07:39:37 +0000 + +dash (0.5.4-1ubuntu3) gutsy; urgency=low + + * Trigger rebuild for hppa. + + -- LaMont Jones Fri, 28 Sep 2007 10:50:20 -0600 + +dash (0.5.4-1ubuntu2) gutsy; urgency=low + + * Add lpia to the list of DIET_ARCHS in debian/rules, to match i386. + + -- Adam Conrad Mon, 30 Jul 2007 12:08:53 +1000 + +dash (0.5.4-1ubuntu1) gutsy; urgency=low + + * Merge with Debian; remaining changes: + - Build against glibc instead of dietlibc + - Change default answer for "Install dash as /bin/sh?" question to true. + + -- Matthias Klose Wed, 18 Jul 2007 15:38:47 +0200 + +dash (0.5.4-1) unstable; urgency=low + + * new upstream version. + * debian/diff/????-*.diff: remove all but + ????-Restore-pgrp-on-exit-fix-backgrounded-MC-bug.diff; obsolete. + * debian/rules: dump config.log on build failure. + + -- Gerrit Pape Wed, 18 Jul 2007 09:33:06 +0000 + +dash (0.5.3-9) unstable; urgency=low + + * debian/rules: target patch, clean: apply diffs from debian/diff/ in + alphabetical order. + * debian/diff/0018-Restore-pgrp-on-exit-fix-backgrounded-MC-bug.diff: + new; Restore pgrp on exit (fix "backgrounded MC" bug) (thx Denis + Vlasenko, closes: #381878). + + -- Gerrit Pape Tue, 26 Jun 2007 13:38:39 +0000 + +dash (0.5.3-8ubuntu1) gutsy; urgency=low + + * Merge with Debian; remaining changes: + - Build against glibc instead of dietlibc + - Change default answer for "Install dash as /bin/sh?" question to true. + + -- Matthias Klose Mon, 11 Jun 2007 18:42:38 +0200 + +dash (0.5.3-8) unstable; urgency=low + + * debian/diff/0009..0017-*.diff: new; from upstream master branch. + * 0009-BUILTIN-Fix-mkbuiltin-sort-order.diff: Fix mkbuiltin sort + order (closes: #415119). + * 0016-REDIR-Fix-redirect-restore-on-saved-file-descriptor.diff: + Fix redirect restore on saved file descriptors (closes: #357091). + * debian/po/it.po: [INTL:it] Italian debconf templates translation + (thx Luca Monducci; closes: #418174). + + -- Gerrit Pape Mon, 04 Jun 2007 18:46:04 +0000 + +dash (0.5.3-7ubuntu1) gutsy; urgency=low + + * Merge from Debian; remaining changes: + - build against glibc instead of dietlibc + - our default /bin/sh + + -- Matthias Klose Wed, 16 May 2007 18:59:51 +0200 + +dash (0.5.3-7) unstable; urgency=medium + + * Debconf translation updates (thx Christian Perrier for the patch): + - Czech updated (thx Miroslav Kure; closes: #407828). + - Galician added (thx Jacobo Tarrio; closes: #407952). + - Portuguese updated + - Russian updated + - Galician updated + - Dutch updated + - Vietnamese updated + - Swedish updated + * run debconf-updatepo to update PO files about debconf templates. + + -- Gerrit Pape Fri, 2 Feb 2007 07:03:36 +0000 + +dash (0.5.3-6) unstable; urgency=medium + + * debian/po/es: [INTL:es] Spanish po-debconf translation (thx Fernando + Cerezal; closes: #402981). + * debian/po/pt_BR: [INTL:pt_BR] updating the Brazilian Portuguese + translation (thx Andre Luis Lopes; closes: #403831). + + -- Gerrit Pape Sun, 31 Dec 2006 12:24:03 +0000 + +dash (0.5.3-5ubuntu2) feisty; urgency=low + + * Rebuild for changes in the amd64 toolchain. + * Set Ubuntu maintainer address. + + -- Matthias Klose Mon, 5 Mar 2007 01:14:12 +0000 + +dash (0.5.3-5ubuntu1) feisty; urgency=low + + * Merge from debian unstable, remaining changes: + - build against glibc instead of dietlibc + - our default /bin/sh + + -- Scott James Remnant Mon, 27 Nov 2006 12:26:18 +0000 + +dash (0.5.3-5) unstable; urgency=low + + * debian/po/da.po: [INTL:da] Updated Danish debconf translation (thx Claus + Hindsgaul; closes: #398779). + * debian/po/de.po: [INTL:de] Update German debconf translation (thx Helge + Kreutzmann; closes: #397825). + * debian/po/fr.po: French debconf templates translation update (thx Cyril + Brulebois; closes: #397013). + + -- Gerrit Pape Tue, 21 Nov 2006 13:48:33 +0000 + +dash (0.5.3-4) unstable; urgency=low + + * debian/diff/0001-EVAL-Make-eval-with-empty-arguments-return-0.diff: new + from upstream git; replaces debian/diff/eval-exit-status.diff. + * debian/diff/0004-PARSER-Only-use-signed-char-for-syntax-arrays.diff: new + from upstream git; replaces debian/diff/dash-signed-char-syntax.diff. + * 0002-PARSER-Removed-useless-parsebackquote-flag.diff, + 0003-PARSER-Use-alloca-to-get-rid-of-setjmp.diff, + 0005-BUILD-Added-with-libedit-option-to-configure.diff, + 0006-EXPAND-Fixed-inverted-char-class-matching.diff, + 0007-SYSTEM-Check-return-code-for-getgroups-and-fwrite.diff, + 0008-BUILTIN-Fixed-command-v-segmentation-fault.diff (closes: #387458): + new from upstream git. + * debian/dash.templates.in: fix glitch in debconf message (thx Christian + Perrier, closes: #366099), + * debian/control: Standards-Version: 3.7.2.2. + + -- Gerrit Pape Mon, 23 Oct 2006 20:38:54 +0000 + +dash (0.5.3-3ubuntu4) edgy; urgency=low + + * Add dependency on debianutils so /etc/shells exists before we are + configured. Ubuntu: #52653. + + -- Scott James Remnant Tue, 11 Jul 2006 18:34:54 +0100 + +dash (0.5.3-3ubuntu3) edgy; urgency=low + + * If the dash/sh question has not been seen by the user, reset it to + the default which is now true. This will mean any user who had dash + already installed without knowing about it will have /bin/sh changed, + but any user who has actually given a response to the question + themselves will not. + + -- Scott James Remnant Wed, 5 Jul 2006 01:08:29 +0100 + +dash (0.5.3-3ubuntu2) edgy; urgency=low + + * Sync priorities with archive. + + -- Scott James Remnant Wed, 28 Jun 2006 20:23:05 +0100 + +dash (0.5.3-3ubuntu1) edgy; urgency=low + + [ Ongoing Merge Process ] + * Merge from debian unstable. + + [ Scott James Remnant ] + * Change default answer for "Install dash as /bin/sh?" question to true. + + -- Scott James Remnant Wed, 28 Jun 2006 20:06:07 +0100 + +dash (0.5.3-3) unstable; urgency=low + + * debian/rules: target configure, configure-udeb: add --host option to + configure (adds the ability to cross-compile, patch from Pjotr + Kourzanov; closes: #355132, #355124). + * debian/po/it.po: new: initial Italian debconf translation (thx Andrea + Bolognani; closes: #355011). + * debian/diff/dash-signed-char-syntax.diff: new: patch from upstream: + don't remove special chars on expansion (closes: 349855). + * debian/implicit: update to revision 1.11. + + -- Gerrit Pape Sun, 16 Apr 2006 13:09:08 +0000 + +dash (0.5.3-2) unstable; urgency=low + + * debian/diff/eval-exit-status.diff: new; patch from upstream; fix exit + status of eval with null arguments (closes: #347232). + * debian/rules: new target patch: apply diffs from debian/diff/, + reverse-apply in target clean:. + + -- Gerrit Pape Tue, 17 Jan 2006 05:37:48 +0000 + +dash (0.5.3-1ubuntu1) dapper; urgency=low + + * debian/rules: + - Set CCUDEB to $CC. + - Remove -nostdinc from CFLAGSUDEB. + - This will build dash-udeb against normal glibc instead of dietlibc, to + make dash build again and keep dietlibc out of main. + * debian/control: Remove dietlibc-dev build dependency. + + -- Martin Pitt Tue, 13 Dec 2005 16:42:02 +0100 + +dash (0.5.3-1) unstable; urgency=low + + * new upstream version. + * Fix \c spillage across echo commands (closes: #337294). + * debian/copyright: adapt copyright notice. + * debian/rules: remove workaround for udeb build failure with dietlibc + on 64bit archs; fixed upstream. + + -- Gerrit Pape Mon, 28 Nov 2005 12:18:30 +0000 + +dash (0.5.2-8) unstable; urgency=low + + * src/input.c: apply patch from upstream (handle NUL characters + gracefully, closes: #317516). + * debian/po/sv.po: update Swedish translation (thx Daniel Nylander, + closes: #330315). + + -- Gerrit Pape Wed, 5 Oct 2005 13:24:33 +0000 + +dash (0.5.2-7) unstable; urgency=low + + * debian/rules: work around udeb build failure with dietlibc on 64bit + archs (closes: #318607). + + -- Gerrit Pape Fri, 5 Aug 2005 17:12:31 +0000 + +dash (0.5.2-6) unstable; urgency=low + + * debian/po/vi.po: new; initial Vietnamese debconf translation (closes: + #313502, thx Clytie Siddall). + * debian/rules: install dash menu file into /usr/share/menu/; build + dash.udeb against dietlibc on archs !m68k. + * debian/control: Build-Depends: dietlibc-dev [archs]; Standards-Version: + 3.6.2.0. + + -- Gerrit Pape Fri, 8 Jul 2005 16:17:00 +0000 + +dash (0.5.2-5) unstable; urgency=low + + * debian/po/cs.po: new; initial Czech debconf translation (closes: + #308043, thx Martin Sin, Miroslav Kure). + + -- Gerrit Pape Wed, 11 May 2005 14:01:40 +0000 + +dash (0.5.2-4) unstable; urgency=medium + + * debian/dash.postrm: fix typo in options to dpkg (in or list). + + -- Gerrit Pape Sat, 2 Apr 2005 18:04:39 +0000 + +dash (0.5.2-3) unstable; urgency=low + + * apply patch from upstream bk: + * src/var.c: add trailing equal sign in setvar for variables set to null + (closes: #299639). + * debian/dash.menu: new. + * debian/rules: install debian/dash.menu file (closes: #296297). + * debian/dash.postinst: conditionally run update-menus on configure. + * debian/dash.postrm: conditionally run update-menus on remove and upgrade + (actually downgrade). + + -- Gerrit Pape Mon, 28 Mar 2005 17:15:22 +0000 + +dash (0.5.2-2) unstable; urgency=high + + * debian/control: no longer Build-Depends: bison. + * apply patch from upstream: + * src/eval.c, src/eval.h: don't errexit on builtin in if condition and + or list (closes: #276964). + * src/dash.1: fix grammar, typo (thx A Costa, closes: #296396, #296545). + + -- Gerrit Pape Tue, 1 Mar 2005 21:14:37 +0000 + +dash (0.5.2-1) unstable; urgency=low + + * new upstream release. + * Fixed spelling errors in manual page; Spell behaviour consistently in + manual page (closes: #281803). + * Corrected manual entry about ENV and non-interactive shells (closes: + #292501). + + -- Gerrit Pape Mon, 31 Jan 2005 20:12:08 +0000 + +dash (0.5.1-3) unstable; urgency=low + + * apply patch from upstream bk: + * src/jobs.c: allow negative pid argument to kill(1). + * apply patch from upstream: + * src/expand.c: fix $@ expansion when leading argument is null (closes: + #266082). + + -- Gerrit Pape Sun, 22 Aug 2004 15:48:47 +0000 + +dash (0.5.1-2) unstable; urgency=low + + * apply patch from upstream: + * src/cd.c: fix cd - when OLDPWD is unset (closes: #263159). + + -- Gerrit Pape Thu, 5 Aug 2004 08:17:18 +0000 + +dash (0.5.1-1) unstable; urgency=low + + * new upstream release. + * debian/rules: reorganize; stop using debhelper, use implicit rules. + * debian/implicit: new; implicit Makefile rules. + * debian/control: no longer Build-Depends: debhelper, pmake; + Build-Depends: po-debconf. + * debian/copyright: adapt. + * debian/ash.dirs, debian/bsdyacc, debian/compat, debian/dash-udeb.dirs, + debian/dash.dirs, debian/dash.templates.merged: remove; obsolete. + * debian/dash.templates: rename to debian/dash.templates.in. + * debian/dash.postrm: new; run db_purge on purge if debconf is available. + * debian/ash.postinst, debian/ash.postrm, debian/dash.postinst, + debian/dash.prerm: remove "#DEBHELPER#". + * src/mystring.c, src/var.c, src/bltin/printf.c: #include "system.h" (for + diet libc). + + -- Gerrit Pape Fri, 9 Jul 2004 19:21:26 +0000 + +dash (0.4.26-3) unstable; urgency=low + + * apply patch approved by upstream: + * error.c, error.h, mystring.c, mystring.h, bltin/printf.c: optionally + compile with the diet libc. + * debian/README.Debian.diet, debian/dash.docs: new; how to build dash + with the diet libc. + * debian/rules: support "diet" in DEB_BUILD_OPTIONS to easily build the + packages with the diet libc instead of glibc. + + -- Gerrit Pape Sat, 26 Jun 2004 12:26:19 +0000 + +dash (0.4.26-2) unstable; urgency=low + + * apply patch from upstream: + * expand.c: add support for character classes to pmatch(), glibc's + fnmatch() still is broken (closes: #250499, works around: #243885). + + -- Gerrit Pape Tue, 1 Jun 2004 05:53:39 +0000 + +dash (0.4.26-1) unstable; urgency=low + + * new maintainer. + * add debian_revision to upstream_version, package no longer is debian + native, upstream is Herbert Xu. + * apply patch from upstream: + * Fixed vstype trim operator ordering in cmdputs. + * Fixed quote for CTLENDVAR in cmdputs. + * Fixed VSLENGTH crash in cmdputs (closes: #250855). + + -- Gerrit Pape Fri, 28 May 2004 18:40:53 +0000 + +dash (0.4.26) unstable; urgency=low + + * Disabled fnmatch code again (closes: #240887). + * Updated copyright. + * Updated German debconf translation (Florian Ernst, closes: #244507). + * Fixed obstack corruption in setprompt (closes: #246635). + + -- Herbert Xu Fri, 30 Apr 2004 21:48:52 +1000 + +dash (0.4.25) unstable; urgency=low + + * Fixed use-after-free bug in setvareq (Vladimir N. Oleynik). + * Fixed value of expdest after _STPUTC in expandarg (closes: #238265). + + -- Herbert Xu Thu, 18 Mar 2004 20:55:57 +1100 + +dash (0.4.24) unstable; urgency=low + + * Fixed segmentation fault when PWD is undefined. + + -- Herbert Xu Tue, 9 Mar 2004 19:58:41 +1100 + +dash (0.4.23) unstable; urgency=low + + * Verify PWD before using it. + + -- Herbert Xu Mon, 8 Mar 2004 20:12:27 +1100 + +dash (0.4.22) unstable; urgency=low + + * Read PWD from environment (closes: #228659). + * Added Danish debconf translation (Claus Hindsgaul, closes: #233756). + * Added check_gcc to support gcc 2.95 (closes: #235933). + * Perform here-doc expansion on PS1/PS2/PS4 (closes: #230858). + + -- Herbert Xu Sun, 7 Mar 2004 21:50:04 +1100 + +dash (0.4.21) unstable; urgency=low + + * Fixed typo that broke ulimit (GCS, closes: #228369). + + -- Herbert Xu Mon, 19 Jan 2004 19:02:32 +1100 + +dash (0.4.20) unstable; urgency=low + + * Added Dutch debconf translation (Tim Dijkstra, closes: #218904). + * Check existence RLIMIT symbols for ulimit. + * Removed table lookup in errmsg. + * Restored NULL check in cmdtxt. + * Restored ash postrm to purge debconf entries (closes: #221913). + * Fixed exit status of exit in EXIT trap (closes: #227734). + * Updated Brazilian debconf translation (Andre Luis Lopes, closes: #228095). + * Restored goodname check in prehash. + + -- Herbert Xu Sat, 17 Jan 2004 09:57:14 +1100 + +dash (0.4.19) unstable; urgency=low + + * Fixed handling of evalskip in dotcmd (closes: #212975). + * Updated Russian debconf translation (Ilgiz Kalmetev, closes: #214333). + * Added Portugese debconf translation (Bruno Rodrigues, closes: #216214). + * Updated Spanish debconf translation (Carlos Valdivia, closes: #216338). + * Fixed length expansion of special variables (closes: #216767). + * Replaced umask builtin with pdksh version. + * Reverted bogus eval change in 0.3.1-20. + * Added vmemory/locks support in ulimit. + * Call install -D instead of cp for merged template. + + -- Herbert Xu Wed, 29 Oct 2003 22:14:22 +1100 + +dash (0.4.18) unstable; urgency=low + + * Fixed boundary checks in getopts. + * Updated Japanese debconf template (Tomohiro KUBOTA, closes: #192382). + * Use -falign-* instead -malign-*. + * Use strtoll for parsing integers in arith expansion. + * Added support for add-shell/remove-shell (closes: #163131). + * Fixed JOBS ifdefs in sprint_status (closes: #211009). + * Fixed bit-wise or in arith expansion (Mototoshi KONDO, closes: #212825). + * Print PS4 on previous stderr. + * Converted debconf templates to gettext (Christian Perrier, + closes: #200112). + + -- Herbert Xu Sat, 27 Sep 2003 14:26:36 +1000 + +dash (0.4.17) unstable; urgency=low + + * Reset rehash when recylcing cmd entries. + * Fixed null arg0 segfault with -c (closes: #191687). + * Relocate job pointers in makejob (closes: #191595). + + -- Herbert Xu Sat, 3 May 2003 20:57:46 +1000 + +dash (0.4.16) unstable; urgency=low + + * Fixed printf so that exit status is cleared on entry. + * Call nextopt() in printf. + * Fixed command substitution corruption by grabbing expdest in expbackq + (closes: #187896). + + -- Herbert Xu Mon, 7 Apr 2003 21:21:30 +1000 + +dash (0.4.15) unstable; urgency=low + + * Fixed octal escapes in echo/printf (closes: #187827). + + -- Herbert Xu Sun, 6 Apr 2003 20:45:38 +1000 + +dash (0.4.14) unstable; urgency=low + + * Added missing newline when printing in dowait. + * Do not print status in dowait when stopped. + * Fixed job status display. + * Fixed current job setting. + * Fixed kill segfault with no arguments (closes: #187189). + * Fixed sorting of set output. + * Removed setvar builtin. + + -- Herbert Xu Thu, 3 Apr 2003 20:38:33 +1000 + +dash (0.4.13) unstable; urgency=low + + * Fixed precision type on 64 bit systems in showvars. + + -- Herbert Xu Wed, 26 Mar 2003 20:00:03 +1100 + +dash (0.4.12) unstable; urgency=low + + * Fixed dash_errno build problem with gcc 3.2. + + -- Herbert Xu Tue, 25 Mar 2003 22:28:50 +1100 + +dash (0.4.11) unstable; urgency=low + + * Removed unused pgrp field from job structure. + * Free jobs when calling wait with no arguments. + * Fixed build problem with bison. + * Merged changes from NetBSD 20030123. + . printf: + - Fixed mklong sefault. + - Fixed precision/field width with %b. + . Improved option parsing of command(1). + . Added rudimentary support for PS4. + * Moved builtin flags into builtins.def. + * Updated Spanish debconf template (Carlos Valdivia Yagüe, closes: #178359). + * Fixed ordering of redirection versus assignment substitution. + * Fixed potential setvareq memory leaks. + * Use bison instead of byacc. + * Fixed wait(1) race condition. + * Fixed alignment memory corruption bug in growstackblock(). + * Fixed potential memory corruption in parsing position parameters. + * Fixed getopts done check. + + -- Herbert Xu Mon, 24 Mar 2003 20:42:29 +1100 + +dash (0.4.10) unstable; urgency=low + + * Fixed redirection fd leak when execing. + + -- Herbert Xu Sun, 19 Jan 2003 13:25:41 +1100 + +dash (0.4.9) unstable; urgency=low + + * Reset exitstatus in evalsubshell if backgnd is true. + * Fixed glibc glob syntax error in expand.c. + + -- Herbert Xu Sat, 11 Jan 2003 16:04:02 +1100 + +dash (0.4.8) unstable; urgency=low + + * Removed backgnd flag from ncmd due to previous redirection change. + * Set lim after the stack stablises in updatepwd (closes: #173884). + * Do not clobber the exitstatus after redirection. + + -- Herbert Xu Mon, 23 Dec 2002 19:50:06 +1100 + +dash (0.4.7) unstable; urgency=low + + * Merged clearredir with reset code in redir.c. + * Redirect before command search in evalcommand (closes: #168862). + * Build binary-all packages in binary-indep (closes: #173191). + + -- Herbert Xu Sat, 21 Dec 2002 13:52:37 +1100 + +dash (0.4.6) unstable; urgency=low + + * Restored code for leaving job control. + + -- Herbert Xu Sun, 8 Dec 2002 15:21:58 +1100 + +dash (0.4.5) unstable; urgency=low + + * Optimised doformat so that vsnprintf is usually called only once. + * Reset redirlist in clearredir so that popredir can work (closes: #170247). + + -- Herbert Xu Sat, 23 Nov 2002 22:09:59 +1100 + +dash (0.4.4) unstable; urgency=low + + * Fixed duplicate define warnings in init.c. + * Set debhelper compat to 4. + * Vanishing mail boxes no longer elicit "you have mail" messages. + * Function redirection errors no longer abort the shell. + * Fixed potential memory leak in redirect. + * Only allocate memory if necessary in redirect. + * Reap dead here documents. + * Do not strdup default values of static shell variables. + * Removed unnecessary setprompt(0) calls. + * Read in BUFSIZ chunks rather than BUFSIZ - 1. + * Documented undefined escape behaviour for echo(1) (closes: #167893). + * Do va_copy when we use a va_list twice (closes: #169503). + + -- Herbert Xu Wed, 20 Nov 2002 19:48:31 +1100 + +dash (0.4.3) unstable; urgency=low + + * Added manual entry for PPID. + * Exporting an unset variable no longer causes it to be set. + * Fixed fd0 redirection in asynchronous lists. + * Only stat if necessary in cdcmd (see #42880). + * Removed extra newline in error message in arith lexer. + * Set heredoclist to 0 ASAP in parseheredoc. + * Removed BSD advertising clause from copyright file. + * Check non-ash diversions as well in dash.postinst. + * Duplicated diversion checking in ash.postinst (closes: #166441). + + -- Herbert Xu Sat, 26 Oct 2002 21:28:33 +1000 + +dash (0.4.2) unstable; urgency=low + + * Give benefits of dash in templates (closes: #161527). + * Fixed signed/unsigned on result of xwrite (closes: #161606). + * Removed support for SIG prefixes in kill and trap. + * Added -- processing in trap. + * Dropped use of unset in postinst (closes: 161868). + * Fixed printf(1) %* processing on bad integers and zero. + * Use stat64 in test(1). + * Allocate group_array with stalloc in test(1). + * Disabled alias checking after a pattern in a case statement. + * Wait now returns 128 + last trapped signal. + * Printf now keeps going after errors. + * Empty non-trivial parameter expansions are now removed correctly. + * Call reset() before exitshell() is called. This fixes the bug where + returning an error from a function running under set -e caused the exit + trap to be taken with evalskip set. + * Fixed quoting of empty strings in single_quote(). + * Show line numbers on all errors. + * Function names must be valid identifiers. + * Removed unused dependency on groff. + * Fixed race condition before entering a function. + * Fixed getopts initialisation for functions. + * Added memory barriers in INT macros. + * Banned empty compound lists in most places. + * Keep usage counters on functions (closes: #164234). + * Updated copyright file. + * Check evalskip in evalstring (closes: #165056). + * Merged changes from NetBSD 1.6: + . Added intmax support in printf(1). + . Implemented set -u. + + -- Herbert Xu Sat, 19 Oct 2002 14:23:11 +1000 + +dash (0.4.1) unstable; urgency=low + + * Removed extra new line in command -v output for aliases. + * Removed alais prefix in the output of alias. + * Recognise octal and hex numbers in arith expansion (closes: #151449). + * Added sh(1) entries for echo, printf and test (closes: #156446). + * Renamed to dash --- the Debian Almquist Shell. + * Cleaned up rules file (Matej Vela). + * Check mtime instead of size in chkmail per POSIX. + * Added support for LFS (closes: #157884). + * Added SuS options to cd and pwd (closes: #145828). + + -- Herbert Xu Fri, 13 Sep 2002 20:35:06 +1000 + +ash (0.3.8-38) unstable; urgency=low + + * Turned pre-dependency to dependency in udeb since the former is not allowed + (closes: #143749). + + -- Herbert Xu Sun, 28 Apr 2002 11:59:05 +1000 + +ash (0.3.8-37) unstable; urgency=low + + * Added Japanese debconf translation (Tomohiro KUBOTA, closes: #137431). + * Added missing escapes in manual page (Aaron Schrab, closes: #137966). + * Added Russian debconf translation (Ilgiz Kalmetev, closes: #137618). + * Fixed trap(1) documentation (closes: #140973). + * Do not abort if getcwd fails. + + -- Herbert Xu Wed, 3 Apr 2002 20:58:09 +1000 + +ash (0.3.8-36) unstable; urgency=low + + * Added library dependency for ash-udeb. + * Handle null case statements correctly. + * Fixed alias expansions in case statements (NetBSD). + * Disabled unused jobid command. + * Corrected documentation about shifting too much. + * Added French debconf translation (Denis Barbier, closes: #134625). + * Updated Spanish debconf translation (Carlos Valdivia, closes: #136366). + + -- Herbert Xu Sat, 2 Mar 2002 18:31:22 +1100 + +ash (0.3.8-35) unstable; urgency=low + + * Moved PWD initialisation into var.c (closes: #124032). + + -- Herbert Xu Mon, 24 Dec 2001 09:34:55 +1100 + +ash (0.3.8-34) unstable; urgency=low + + * NSEMI must be NOR + 1. + * Set exitstatus to zero before evaluating cases (closes: #124066). + * Explicitly set default answer of the ash/sh question to false so that + people whose debconf priority is set to low and who keeps banging on their + keyboards don't accidently end up with ash as /bin/sh. + + -- Herbert Xu Fri, 21 Dec 2001 20:30:49 +1100 + +ash (0.3.8-33) unstable; urgency=low + + * Added missing inclusion of bltin.h in bltin/times.c. + + -- Herbert Xu Thu, 13 Dec 2001 18:46:07 +1100 + +ash (0.3.8-32) unstable; urgency=low + + * Back slashes in expansions are now escaped (closes: #121516). + + -- Herbert Xu Wed, 28 Nov 2001 20:15:01 +1100 + +ash (0.3.8-31) unstable; urgency=low + + * Made sure all back slashes are escaped. + + -- Herbert Xu Mon, 26 Nov 2001 19:10:27 +1100 + +ash (0.3.8-30) unstable; urgency=low + + * Restored fnmatch(3) code. + * Treat escaped slashes correctly while globbing. + * Restored missing EV_EXIT check in evalcommand (closes: #120364). + * Fixed stack corruption in _rmescapes. + + -- Herbert Xu Sun, 25 Nov 2001 17:51:19 +1100 + +ash (0.3.8-29) unstable; urgency=low + + * Added missing va_end in fmtstr (NetBSD). + * Removed shellproc crap. + * Updated Swedish debconf translation (Mikael Hedin, closes: #116097). + * Updated German debconf translation (Andreas Metzler, closes: #117160). + * Break now treats illegal numbers according to SuS. + * Errors in special builtins now rise to the top. + * Normal redirection errors no longer abort the shell. + * Functions now have the same variable assignment properties as special + builtins. + + -- Herbert Xu Sat, 3 Nov 2001 11:36:36 +1100 + +ash (0.3.8-28) unstable; urgency=low + + * Local variables are now unset properly in shprocvar() (closes: #114917). + + -- Herbert Xu Sat, 13 Oct 2001 14:07:21 +1000 + +ash (0.3.8-27) unstable; urgency=low + + * Kill no longer aborts if it fails to kill someone. + + -- Herbert Xu Sun, 30 Sep 2001 22:20:36 +1000 + +ash (0.3.8-26) unstable; urgency=low + + * The sh.1.gz diversion now agrees with reality (closes: #113831). + + -- Herbert Xu Sat, 29 Sep 2001 08:43:27 +1000 + +ash (0.3.8-25) unstable; urgency=low + + * Only read ENV if the shell is interactive (closes: #110421). + + -- Herbert Xu Wed, 29 Aug 2001 19:18:53 +1000 + +ash (0.3.8-24) unstable; urgency=low + + * Handle SIGINT when waiting even if there is no trap (closes: #107699). + * Protect all makejob/forkshell/waitforjobs sequences from SIGINT. + * Work around gcc bug that generates bad ..ng references (closes: #107994). + + -- Herbert Xu Wed, 8 Aug 2001 20:28:28 +1000 + +ash (0.3.8-23) unstable; urgency=low + + * Fixed fence post error in scanleft (closes: #107229). + * Removed stunalloc in expname as it interferes with addfname. + * Fixed CTLESC skipping in scanright. + + -- Herbert Xu Thu, 2 Aug 2001 20:06:00 +1000 + +ash (0.3.8-22) unstable; urgency=low + + * Fixed trailing back slash bug in echo/printf (closes: #106693). + * Some quoted's are meant to be quotes. + * Added Brazilian translation (Andre Luis Lopes, closes: #107041). + + -- Herbert Xu Mon, 30 Jul 2001 20:21:52 +1000 + +ash (0.3.8-21) unstable; urgency=low + + * Fixed EV_EXIT/redirection bugs that caused core dumps. + + -- Herbert Xu Sat, 28 Jul 2001 17:03:28 +1000 + +ash (0.3.8-20) unstable; urgency=low + + * Don't save fd2 if job control is turned off. + * Don't push redirections when EV_EXIT is set. + * Fixed assignment recognition in the presence of back ticks. + * Combined checkkwd and checkalias. + + -- Herbert Xu Fri, 27 Jul 2001 22:29:41 +1000 + +ash (0.3.8-19) unstable; urgency=low + + * Recompute strings after growing in subevalvar (closes: #106050). + + -- Herbert Xu Mon, 23 Jul 2001 21:16:50 +1000 + +ash (0.3.8-18) unstable; urgency=low + + * Added more space optimisations for udeb on i386. + * Set stack mark in patmatch (closes: #106050). + * Fixed theoretical bug in expari. + + -- Herbert Xu Sat, 21 Jul 2001 20:08:15 +1000 + +ash (0.3.8-17) unstable; urgency=low + + * Don't complain about unknown escape codes in echo and printf + (closes: #105659). + * Updated build-time dependency on groff-base (closes: #105612). + + -- Herbert Xu Wed, 18 Jul 2001 19:33:20 +1000 + +ash (0.3.8-16) unstable; urgency=low + + * Fixed backslash bug in new pattern matching code. + + -- Herbert Xu Mon, 16 Jul 2001 21:47:39 +1000 + +ash (0.3.8-15) unstable; urgency=low + + * Added Swedish translation of templates (Martin Sj?n, closes: #103158). + * Restored escape code support in echo. + * Removed assignment builtins since it is at best undefined by the SuS and + also can't be implemented consistently. + * Removed extraneous volatile modifier (closes: #104518). + * General overhaul of word expansion (closes: #96588). + * Redirection prefixes no longer stop assignments from being recognised. + + -- Herbert Xu Sun, 15 Jul 2001 17:27:03 +1000 + +ash (0.3.8-14) unstable; urgency=low + + * Divert sh.1.gz to sh.distrib.1.gz (closes: #102251). + * Added HETIO support for ^D and ^U (Aaron Lehmann, closes: #102215). + * Added Spaniash translation of debconf templates (Carlos Valdivia Yage, + closes: #103040). + * Added versioned build-time dependency on groff. + + -- Herbert Xu Mon, 2 Jul 2001 19:32:03 +1000 + +ash (0.3.8-13) unstable; urgency=low + + * Fixed a bug where errors in pipelines which are part of andor lists were + not ignored when -e is in effect. + + -- Herbert Xu Mon, 25 Jun 2001 19:40:27 +1000 + +ash (0.3.8-12) unstable; urgency=low + + * Rewrote arith_lex.l in C (Aaron Lehmann, closes: #101741). + * && and || in arithmetic expansions now return either 0 or 1. + + -- Herbert Xu Sun, 24 Jun 2001 20:14:29 +1000 + +ash (0.3.8-11) unstable; urgency=low + + * Check for NULL argument in evaltree() (closes: #98865, #98867). + + -- Herbert Xu Sun, 27 May 2001 17:53:14 +1000 + +ash (0.3.8-10) unstable; urgency=low + + * Use /bin/ash in postinst to sidestep bugs in other shells (closes: #98739). + * Exit status is now tested on non-negated pipelines (closes: #98736). + + -- Herbert Xu Sat, 26 May 2001 23:56:07 +1000 + +ash (0.3.8-9) unstable; urgency=medium + + * IFS is now fetched using bltinlookup() again in read (closes: #98343). + * Divert sh(1) man page as well as /bin/sh (closes: #98525). + + -- Herbert Xu Fri, 25 May 2001 20:30:06 +1000 + +ash (0.3.8-8) unstable; urgency=low + + * Fixed diversion removal in prerm (duh, closes: #98031). + + -- Herbert Xu Mon, 21 May 2001 20:52:48 +1000 + +ash (0.3.8-7) unstable; urgency=low + + * Fixed diversion test in prerm (closes: #98031). + + -- Herbert Xu Sun, 20 May 2001 12:30:53 +1000 + +ash (0.3.8-6) unstable; urgency=low + + * Make sure that fd2 is closed when clearing redirects (closes: #96619). + * Fixed memory corruption in stunalloc(). + * The output of export/readonly/set is now correctly quoted. + * Fixed newline eating bug in expbackq(). + * Set OLDPWD. + * Removed ash-medium as neither bf or di uses it. + * Wait now waits for all its argument rather than the first one. + * Wait will exit with 129 when interrupted by a signal for a which a trap has + been set. + + -- Herbert Xu Fri, 18 May 2001 21:51:41 +1000 + +ash (0.3.8-5) unstable; urgency=low + + * Added German translation to template file (Sebastian Feltel, + closes: #96203). + * Added missing initialisation in setalias() (closes: #95433). + + -- Herbert Xu Fri, 4 May 2001 20:54:31 +1000 + +ash (0.3.8-4) unstable; urgency=low + + * Disabled fnmatch code as fnmatch(3) in glibc is broken. + * Fixed echo example in man page (Kalle Olavi Niemitalo, closes: #96014). + * Fixed trailing semicolon bug with eval (NetBSD). + * Fixed globbing inconsistency with broken symlinks (NetBSD). + + -- Herbert Xu Wed, 2 May 2001 22:57:16 +1000 + +ash (0.3.8-3) unstable; urgency=low + + * Work around broken autoconf scripts (closes: #95430). + + -- Herbert Xu Tue, 1 May 2001 18:27:50 +1000 + +ash (0.3.8-2) unstable; urgency=low + + * Save checkalias before calling xxreadtoken() (closes: #95628). + + -- Herbert Xu Sun, 29 Apr 2001 17:36:01 +1000 + +ash (0.3.8-1) unstable; urgency=low + + * NetBSD-current version as of 20010316. + * Removed code that sets IFS. + * Fixed memory leak with PWD. + * Set PPID. + * Fixed inconsistencies in alias expansion. + * Restored original output code. + * Enabled fnmatch code again. + * Added builtin printf. + * Offer to divert /bin/sh (closes: #70462). + + -- Herbert Xu Wed, 25 Apr 2001 22:32:39 +1000 + +ash (0.3.7-16) unstable; urgency=low + + * Fixed incorrect default IFS in readcmd (closes: #88950). + * Added missing return in hashcmd. + + -- Herbert Xu Fri, 9 Mar 2001 20:44:40 +1100 + +ash (0.3.7-15) unstable; urgency=low + + * Unknown escape codes are now prnted literally by echo (closes: #82869). + * Made hetio_read_input() fail if fd is not stdin. + * Some uses of VSQUOTE were really meant to be quotes (closes: #88777). + * Build different ashes in different subdirectories. + + -- Herbert Xu Thu, 8 Mar 2001 21:32:28 +1100 + +ash (0.3.7-14) unstable; urgency=low + + * Removed predependency from udeb (closes: #81995). + * Added /bin/sh symlink to udeb (closes: #81967). + + -- Herbert Xu Sat, 13 Jan 2001 15:23:21 +1100 + +ash (0.3.7-13) unstable; urgency=low + + * Renamed the udeb to ash-udeb. + + -- Herbert Xu Wed, 20 Dec 2000 19:32:34 +1100 + +ash (0.3.7-12) unstable; urgency=low + + * Added support for udebs (Randolph Chung, closes: #79237). + + -- Herbert Xu Sat, 16 Dec 2000 13:53:28 +1100 + +ash (0.3.7-11) unstable; urgency=low + + * Preserve the previous exit status upon entering a function + (closes: #78374). + + -- Herbert Xu Sun, 3 Dec 2000 13:34:27 +1100 + +ash (0.3.7-10) unstable; urgency=low + + * Merged changes for GNU from Igor Khavkine. + * Minimise the number of sigactions. + + -- Herbert Xu Fri, 3 Nov 2000 20:31:52 +1100 + +ash (0.3.7-9) unstable; urgency=low + + * Predepend on the libraries. + * Always save fd 2 when it is redirected (closes: #75302). + + -- Herbert Xu Sun, 22 Oct 2000 08:40:40 +1100 + +ash (0.3.7-8) unstable; urgency=high + + * More redirection fixes (closes: #73613). + + -- Herbert Xu Thu, 5 Oct 2000 18:22:17 +1100 + +ash (0.3.7-7) unstable; urgency=high + + * Added missing break in redirection code (closes: #72956). + + -- Herbert Xu Tue, 3 Oct 2000 07:58:04 +1100 + +ash (0.3.7-6) unstable; urgency=low + + * command -[vV] no longer displays an error message on stdout. + * Redirecting to /proc/self/fd/* now works (closes: #72852). + + -- Herbert Xu Sun, 1 Oct 2000 12:56:39 +1100 + +ash (0.3.7-5) unstable; urgency=low + + * Implemented set -a. + + -- Herbert Xu Sat, 30 Sep 2000 16:00:33 +1100 + +ash (0.3.7-4) unstable; urgency=low + + * Added build-time dependency on debhelper (closes: #69920). + * Extended maximum length of arithmetic expansions to match 32-bit integers. + + -- Herbert Xu Wed, 20 Sep 2000 14:28:16 +1100 + +ash (0.3.7-3) unstable; urgency=low + + * Switch to the old globbing code since glob(3) is hopelessly broken + (closes: #69455). + + -- Herbert Xu Mon, 21 Aug 2000 20:37:15 +1000 + +ash (0.3.7-2) unstable; urgency=low + + * Call glob(3) with GLOB_NOMAGIC (ouch). + + -- Herbert Xu Sun, 6 Aug 2000 17:47:08 +1000 + +ash (0.3.7-1) unstable; urgency=low + + * NetBSD-current version as of 20000729. + * Use fnmatch(3) and glob(3). + * Fixed the use of backslashes in the pattern in parameter substitutions, + hopefully for the last time. + * Applied HETIO patch and built ash.medium (closes: #50788). Will do ash.big + when readline is fixed so that it doesn't leak anymore. + + -- Herbert Xu Fri, 4 Aug 2000 21:36:44 +1000 + +ash (0.3.6-5) unstable; urgency=low + + * Fixed manpage entry for read with patch from Kevin Ryde (closes: #62500). + * Fixed a file descriptor leak for pipelines. + + -- Herbert Xu Wed, 19 Apr 2000 18:56:20 +1000 + +ash (0.3.6-4) unstable; urgency=low + + * Fixed the case of an empty command with redirections. + + -- Herbert Xu Fri, 7 Apr 2000 12:07:18 +1000 + +ash (0.3.6-3) unstable; urgency=low + + * ! is now recognised correctly. + * Ash is now more strict on the syntax, e.g., a lone ! is no longer accepted + as an alternative to ! true. + + -- Herbert Xu Fri, 7 Apr 2000 10:46:06 +1000 + +ash (0.3.6-2) unstable; urgency=low + + * Fixed a problem with fmtstr() which broke getopts. + + -- Herbert Xu Sun, 2 Apr 2000 10:49:26 +1000 + +ash (0.3.6-1) unstable; urgency=low + + * NetBSD-current version as of 20000326. + * Added a Build-Depends on groff (closes: #61041). + * Implemented noclobber (closes: #59028). + * Rewrote output.c to use stream IO. + + -- Herbert Xu Sat, 1 Apr 2000 19:24:31 +1000 + +ash (0.3.5-10) frozen unstable; urgency=low + + * Don't stat mail boxes in non-interactive mode (closes: #59213). + * Added an fflush(stdout) to the times builtin (closes: #59027). + * Documented the times builtin. + * Added source depends. + + -- Herbert Xu Sat, 18 Mar 2000 18:58:44 +1100 + +ash (0.3.5-9) unstable; urgency=low + + * Double quotes inside paramater substitutions inside double quotes are now + ignored as in bash (the originial behaviour was POSIX compliant too but + IMHO this one makes a little bit more sense). + This one broke mwm (but it was actually mwm's fault). + * Corrected backslash/CTLESC treatment for patterns in parameter + substitutions. + + -- Herbert Xu Sat, 6 Nov 1999 18:13:19 +1100 + +ash (0.3.5-8) unstable; urgency=low + + * Replaced use of echo -n in manual page with escape codes. + * Made FHS compliant (closes: #47978). + * Restored echo's option processing ability. + + -- Herbert Xu Fri, 22 Oct 1999 10:20:58 +1000 + +ash (0.3.5-7) unstable; urgency=low + + * echo no longer supports options. + * Don't quote patterns inside parameter substitutions enclosed by double + quotes (closes: #47842). + + -- Herbert Xu Wed, 20 Oct 1999 20:28:14 +1000 + +ash (0.3.5-6) unstable; urgency=low + + * Use getcwd() instead of /bin/pwd -- Zack Weinberg (closes: #46981). + + -- Herbert Xu Sun, 10 Oct 1999 16:31:49 +1000 + +ash (0.3.5-5) unstable; urgency=low + + * Only test for -e on simple commands (fixes #44559). + + -- Herbert Xu Wed, 8 Sep 1999 22:18:27 +1000 + +ash (0.3.5-4) unstable; urgency=low + + * Don't wait for stopped children if job control is disabled (fixes #42814). + * Allow an option '(' in a case statement (fixes #42364). + + -- Herbert Xu Thu, 12 Aug 1999 23:30:30 +1000 + +ash (0.3.5-3) unstable; urgency=low + + * OK, the fix to the esoteric problem in 0.3.5-1 actually breaks VSASSIGN + and VSQUESTION, they should work properly now (fixes #41327). + + -- Herbert Xu Thu, 15 Jul 1999 22:47:13 +1000 + +ash (0.3.5-2) unstable; urgency=low + + * PATH search and execution is now correct. + * hash no longer shows builtins. + * Added kill builtin. + * New description from James R. van Zandt reformatted by Josip Rodin. + + -- Herbert Xu Mon, 12 Jul 1999 18:51:42 +1000 + +ash (0.3.5-1) unstable; urgency=low + + * New upstream release. + * Adapted to new pmake (fixes #38737). + * Fixed behvaiour of backslashes preceding a closing brace for a parameter + substituion inside double quotes (even bash messes this one up :). + * Fixed command (fixes #34639). + * Fixed a pipe bug where stdin may be wrongly closed (fixes #35452). + * Revamped getopts (fixes #39694). + + -- Herbert Xu Sun, 4 Jul 1999 12:19:01 +1000 + +ash (0.3.4-7) unstable; urgency=low + + * Fixed a glibc 2.1 compatitibility problem. + * Fixed a PWD inconsistency that stuffed up the kernel compilation. + + -- Herbert Xu Mon, 17 May 1999 23:14:57 +1000 + +ash (0.3.4-6) unstable; urgency=low + + * Fixed incorrect -e test due to the last bug fix (fixes #26509). + + -- Herbert Xu Tue, 8 Sep 1998 10:02:46 +1000 + +ash (0.3.4-5) unstable; urgency=low + + * Use test_eaccess from bash instead of access(2) (fixes #26110). + + -- Herbert Xu Wed, 26 Aug 1998 21:22:49 +1000 + +ash (0.3.4-4) unstable; urgency=low + + * Only upload to unstable. + + -- Herbert Xu Tue, 5 May 1998 18:01:02 +1000 + +ash (0.3.4-3) frozen unstable; urgency=low + + * Applied sparc patch (fixes #21562). + + -- Herbert Xu Fri, 1 May 1998 19:48:13 +1000 + +ash (0.3.4-2) frozen unstable; urgency=low + + * Fixed the incorrect trap fixes (fixes #20363). + + -- Herbert Xu Thu, 16 Apr 1998 21:07:10 +1000 + +ash (0.3.4-1) unstable; urgency=low + + * New upstream release. + * Reverted word splitting change in 0.3.2-1 since the fix was broken and + major work (the quote removal is done too quickly at the moment) is needed + to fix it properly. + * Fixed more trap noncompliance. + + -- Herbert Xu Thu, 19 Mar 1998 22:59:12 +1100 + +ash (0.3.2-5) unstable; urgency=low + + * Fixed a bug when doing pattern matching in parameter expansions. + + -- Herbert Xu Tue, 10 Mar 1998 21:25:40 +1100 + +ash (0.3.2-4) unstable; urgency=low + + * Allow ] to be quoted in bracket expressions (fixes #17533). + * Move dh_fixperms to second last spot (fixes #18267). + * Don't do field splitting in evalfor. + + -- Herbert Xu Tue, 17 Feb 1998 13:32:09 +1100 + +ash (0.3.2-3) unstable; urgency=low + + * Fixed stupid core dump. + + -- Herbert Xu Wed, 11 Feb 1998 21:33:55 +1100 + +ash (0.3.2-2) unstable; urgency=low + + * Hack for special builtins (fixes #18055). + * Hack for command. + + -- Herbert Xu Wed, 11 Feb 1998 21:19:46 +1100 + +ash (0.3.2-1) unstable; urgency=low + + * NetBSD-current version as of 19980209. + * Fixed a word splitting problem after parameter expansion thanks to Alexey + Marinichev. + * Converted to debhelper (fixes #14612, #15005). + + -- Herbert Xu Mon, 9 Feb 1998 16:53:48 +1100 + +ash (0.3.1-20) unstable; urgency=low + + * Fixed -e problem with eval. + + -- Herbert Xu Sun, 7 Dec 1997 20:19:00 +1100 + +ash (0.3.1-19) unstable; urgency=low + + * Fixed -e problem with command substitution. + + -- Herbert Xu Sun, 7 Dec 1997 19:44:49 +1100 + +ash (0.3.1-18) unstable; urgency=low + + * Do not link with ncurses (#15485). + + -- Herbert Xu Sun, 30 Nov 1997 12:00:11 +1100 + +ash (0.3.1-17) unstable; urgency=low + + * Set PATH like bash (#15238). + + -- Herbert Xu Wed, 26 Nov 1997 16:17:27 +1100 + +ash (0.3.1-16) unstable; urgency=low + + * Fixed incorrect assignment builtin code. + + -- Herbert Xu Mon, 24 Nov 1997 16:19:10 +1100 + +ash (0.3.1-15) unstable; urgency=low + + * hash now returns error codes (needed by the Linux kernel). + + -- Herbert Xu Sun, 23 Nov 1997 21:37:08 +1100 + +ash (0.3.1-14) unstable; urgency=low + + * Disabled word-splitting for assignment builtins. + + -- Herbert Xu Sun, 23 Nov 1997 12:45:15 +1100 + +ash (0.3.1-13) unstable; urgency=low + + * ! is now recognised even after &&/||. + + -- Herbert Xu Fri, 21 Nov 1997 22:09:05 +1100 + +ash (0.3.1-12) unstable; urgency=low + + * More fixes to the handling of SIGINT when forking. + + -- Herbert Xu Fri, 14 Nov 1997 15:14:32 +1100 + +ash (0.3.1-11) unstable; urgency=low + + * Ignore SIGINT when forking non-interactively. + + -- Herbert Xu Mon, 3 Nov 1997 12:00:02 +1100 + +ash (0.3.1-10) unstable; urgency=low + + * echo now handles options correctly. + * echo nolonger returns 0 if erorrs occured while writing to stdout. + * New code from GNU echo merged. + * Error messages from test now work. + + -- Herbert Xu Wed, 8 Oct 1997 21:47:13 +1000 + +ash (0.3.1-9) unstable; urgency=low + + * ! is recognised at pipeline level like bash. + + -- Herbert Xu Mon, 15 Sep 1997 23:13:45 +1000 + +ash (0.3.1-8) unstable; urgency=medium + + * Old patch regarding SIGCHLD in again. + + -- Herbert Xu Sun, 31 Aug 1997 11:20:27 +1000 + +ash (0.3.1-7) unstable; urgency=low + + * /bin/sh -e is behaving even better now (for loops within conditionals). + + -- Herbert Xu Sat, 23 Aug 1997 22:08:19 +1000 + +ash (0.3.1-6) unstable; urgency=low + + * /bin/sh -e is behaving better now. + + -- Herbert Xu Sat, 23 Aug 1997 13:16:26 +1000 + +ash (0.3.1-5) unstable; urgency=low + + * hash -v /dir/command doesn't coredump anymore. + * type /dir/command now works correctly. + + -- Herbert Xu Fri, 1 Aug 1997 20:48:19 +1000 + +ash (0.3.1-4) unstable; urgency=low + + * trap now understands symbolic signal names. + + -- Herbert Xu Sat, 26 Jul 1997 14:04:46 +1000 + +ash (0.3.1-3) unstable; urgency=low + + * Added the builtin test command. + + -- Herbert Xu Sun, 20 Jul 1997 15:00:14 +1000 + +ash (0.3.1-2) unstable; urgency=medium + + * Fixed a coredump involving $*. + + -- Herbert Xu Sat, 19 Jul 1997 12:03:02 +1000 + +ash (0.3.1-1) unstable; urgency=medium + + * NetBSD-current version as of 19970715. + * Fixed a "use after free" bug (#11294). + + -- Herbert Xu Fri, 18 Jul 1997 13:48:09 +1000 + +ash (0.3-1) unstable; urgency=low + + * Initial Release. + + -- Herbert Xu Thu, 19 Jun 1997 19:29:16 +1000 + --- dash-0.5.4.orig/debian/dash.postrm +++ dash-0.5.4/debian/dash.postrm @@ -0,0 +1,10 @@ +#!/bin/sh +set -e + +test "$1" != 'upgrade' || dpkg --compare-versions "$2" ge 0.5.2-3 || \ + test ! -x /usr/bin/update-menus || exec update-menus +test "$1" != 'remove' || test ! -x /usr/bin/update-menus || exec update-menus +test "$1" = 'purge' || exit 0 +test -e /usr/share/debconf/confmodule || exit 0 +. /usr/share/debconf/confmodule +db_purge --- dash-0.5.4.orig/debian/dash.docs +++ dash-0.5.4/debian/dash.docs @@ -0,0 +1 @@ +debian/README.Debian.diet --- dash-0.5.4.orig/debian/dash.prerm +++ dash-0.5.4/debian/dash.prerm @@ -0,0 +1,34 @@ +#!/bin/sh +# +# pre-removal script for the Debian GNU/Linux ash package +# +# $Id: dash.prerm,v 1.2 2003/09/03 10:42:08 herbert Exp $ + +set -e + +remove_divert() { + div=$(dpkg-divert --list $1) + if [ -n "$div" ] && [ -z "${div%%*by dash}" ]; then + distrib=${div% by dash} + distrib=${distrib##* to } + mv $distrib $1 + dpkg-divert --remove $1 + fi +} + +remove_shell() { + if ! type remove-shell > /dev/null 2>&1; then + return + fi + + remove-shell /bin/dash +} + +if [ "$1" = remove ] || [ "$1" = deconfigure ]; then + remove_divert /bin/sh + remove_divert /usr/share/man/man1/sh.1.gz +fi + +if [ "$1" = remove ]; then + remove_shell +fi --- dash-0.5.4.orig/debian/dash.menu +++ dash-0.5.4/debian/dash.menu @@ -0,0 +1,5 @@ +?package(dash): \ + title="Dash"\ + needs="text"\ + section="Applications/Shells"\ + command="/bin/dash -i" --- dash-0.5.4.orig/debian/README.Debian.diet +++ dash-0.5.4/debian/README.Debian.diet @@ -0,0 +1,15 @@ +Building with the diet libc +--------------------------- + +This package optionally can be built with the diet libc instead of the +glibc to provide small statically linked programs. The resulting package +has no dependency on any other package. + +To use the diet libc, make sure the latest versions of the dietlibc-dev +package is installed, and set DEB_BUILD_OPTIONS=diet in the environment +when building the package, e.g.: + + # apt-get install dietlibc-dev + $ DEB_BUILD_OPTIONS=diet fakeroot apt-get source -b dash + + -- Gerrit Pape , Wed, 23 Jun 2004 05:11:20 +0000 --- dash-0.5.4.orig/debian/control +++ dash-0.5.4/debian/control @@ -0,0 +1,32 @@ +Source: dash +Section: shells +Priority: required +Maintainer: Ubuntu Core Developers +XSBC-Original-Maintainer: Gerrit Pape +Build-Depends: po-debconf +Standards-Version: 3.8.0.1 +Homepage: http://gondor.apana.org.au/~herbert/dash/ +Vcs-Git: http://smarden.org/git/dash.git/ + +Package: dash +Architecture: any +Essential: yes +Pre-Depends: ${shlibs:Depends} +Depends: debianutils (>= 2.15) +Description: POSIX-compliant shell + The Debian Almquist Shell (dash) is a lightweight POSIX-compliant shell + derived from ash. + . + It can be usefully installed as /bin/sh (because it executes scripts + faster than bash), or as the default shell for the superuser. It + depends on fewer libraries than bash, and is therefore less likely to + be affected by an upgrade problem or a disk failure. It is also + useful for checking the POSIX compliance of scripts. + +Package: ash +Architecture: all +Pre-Depends: dash +Description: compatibility package for dash + This package allows upgrading ash to its replacement, + dash. It includes the /bin/ash symlink. + It can be removed as soon as /bin/ash is no longer used. --- dash-0.5.4.orig/debian/ash.postinst +++ dash-0.5.4/debian/ash.postinst @@ -0,0 +1,52 @@ +#!/bin/sh +# +# post-install script for the Debian GNU/Linux ash package +# +# $Id: ash.postinst,v 1.9 2002/10/26 11:27:48 herbert Exp $ + +set -e + +check_divert() { + div=$(dpkg-divert --list $1) + distrib=${3:-$1.distrib} + case $div in + '' | *by\ dash) + ;; + *by\ ash) + dst=${div% by ash} + dst=${dst##* to } + + # Work around dpkg-divert bug. + if [ -e "$dst" ]; then + mv "$dst" "$dst.ash-tmp" + fi + dpkg-divert --remove $1 + if [ -e "$dst.ash-tmp" ]; then + mv "$dst.ash-tmp" "$dst" + fi + + dpkg-divert --package dash --divert $distrib --add $1 + if [ "$dst" != $distrib ] && [ -e "$dst" ]; then + mv "$dst" $distrib + fi + ln -sf $2 $1 + ;; + *) + d=${1%/*} + if + [ -h $1 ] && [ -f $1 ] && [ -f $d/$4 ] && + cmp $1 $d/$4 + then + ln -sf $2 $1 + fi + ;; + esac +} + +dcv='dpkg --compare-versions' + +if [ "$1" = configure ] && [ -n "$2" ] && $dcv "$2" lt 0.4.3; then + check_divert /bin/sh dash '' ash + check_divert /usr/share/man/man1/sh.1.gz dash.1.gz \ + /usr/share/man/man1/sh.distrib.1.gz ash.1.gz +fi --- dash-0.5.4.orig/debian/rules +++ dash-0.5.4/debian/rules @@ -0,0 +1,96 @@ +#!/usr/bin/make -f + +CC =gcc +CFLAGS =-g -O2 -Wall +STRIP =strip + +DEB_HOST_GNU_TYPE =$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE =$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) + CC =$(DEB_HOST_GNU_TYPE)-gcc +endif + +ifneq (,$(findstring diet,$(DEB_BUILD_OPTIONS))) + CC =diet -v -Os gcc + CFLAGS =-nostdinc -Wall +endif +ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + STRIP =: strip +endif + +DIR =$(shell pwd)/debian/dash +DIRA =$(shell pwd)/debian/ash + +patch: deb-checkdir patch-stamp +patch-stamp: + for i in `ls -1 debian/diff/*.diff || :`; do \ + patch -p1 <$$i || exit 1; \ + done + touch patch-stamp + +configure: deb-checkdir configure-stamp +configure-stamp: patch-stamp + mkdir -p build-tmp + touch configure + (cd build-tmp && CC='$(CC)' CFLAGS='$(CFLAGS)' \ + exec ../configure --host='$(DEB_HOST_GNU_TYPE)') + touch configure-stamp + +build: deb-checkdir build-stamp +build-stamp: configure-stamp + -$(CC) -v + (cd build-tmp && exec $(MAKE) CFLAGS='$(CFLAGS)') || \ + (cat build-tmp/config.log; exit 1) || exit 1 + touch build-stamp + +po-templates: po-templates-stamp +po-templates-stamp: deb-checkdir + po2debconf debian/dash.templates.in >debian/dash.templates + touch po-templates-stamp + +clean: deb-checkdir deb-checkuid + rm -rf build-tmp + test ! -e patch-stamp || \ + for i in `ls -1r debian/diff/*.diff || :`; do patch -p1 -R <$$i; done + rm -f configure-stamp patch-stamp build-stamp po-templates-stamp + rm -rf '$(DIR)' '$(DIRA)' + rm -f debian/files debian/substvars debian/dash.templates changelog + +install: install-indep install-arch +install-indep: deb-checkdir deb-checkuid + rm -rf '$(DIRA)' + install -d -m0755 '$(DIRA)'/bin + ln -s dash '$(DIRA)'/bin/ash + install -d -m0755 '$(DIRA)'/usr/share/man/man1/ + ln -s dash.1.gz '$(DIRA)'/usr/share/man/man1/ash.1.gz + # changelog + test -r changelog || ln -s ChangeLog changelog +install-arch: deb-checkdir deb-checkuid build-stamp + # dash + rm -rf '$(DIR)' + install -d -m0755 '$(DIR)'/bin + install -m0755 build-tmp/src/dash '$(DIR)'/bin/dash + $(STRIP) -R .comment -R .note '$(DIR)'/bin/dash + install -d -m0755 '$(DIR)'/usr/share/man/man1/ + install -m0644 src/dash.1 '$(DIR)'/usr/share/man/man1/dash.1 + gzip -9 '$(DIR)'/usr/share/man/man1/dash.1 + install -d -m0755 '$(DIR)'/usr/share/menu + install -m0644 debian/dash.menu '$(DIR)'/usr/share/menu/dash + # changelog + test -r changelog || ln -s ChangeLog changelog + +binary: binary-indep binary-arch +binary-indep: install-indep ash.deb + dpkg-gencontrol -isp -pash -P'$(DIRA)' + dpkg -b '$(DIRA)' .. +binary-arch: install-arch po-templates dash.deb + # dash + rm -f debian/substvars + test '$(CC)' != 'gcc' || dpkg-shlibdeps '$(DIR)'/bin/dash + dpkg-gencontrol -isp -pdash -P'$(DIR)' + dpkg -b '$(DIR)' .. + +.PHONY: configure build po-templates clean patch install install-indep \ + install-arch binary binary-indep binary-arch + +include debian/implicit --- dash-0.5.4.orig/debian/dash.templates.in +++ dash-0.5.4/debian/dash.templates.in @@ -0,0 +1,17 @@ +# These templates have been reviewed by the debian-l10n-english +# team +# +# If modifications/additions/rewording are needed, please ask +# debian-l10n-english@lists.debian.org for advice. +# +# Even minor modifications require translation updates and such +# changes should be coordinated with translators and reviewers. +Template: dash/sh +Type: boolean +Default: true +_Description: Install dash as /bin/sh? + The default /bin/sh shell on Debian and Debian-based systems is bash. + . + However, since the default shell is required to be POSIX-compliant, + any shell that conforms to POSIX, such as dash, can serve as /bin/sh. + You may wish to do this because dash is faster and smaller than bash. --- dash-0.5.4.orig/debian/ash.postrm +++ dash-0.5.4/debian/ash.postrm @@ -0,0 +1,9 @@ +#!/bin/sh +# $Id: ash.postrm,v 1.1 2003/11/21 08:47:16 herbert Exp $ + +set -e + +if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_purge +fi --- dash-0.5.4.orig/debian/dash.postinst +++ dash-0.5.4/debian/dash.postinst @@ -0,0 +1,99 @@ +#!/bin/sh +set -e + +check_divert() { + div=$(dpkg-divert --list $2) + distrib=${4:-$2.distrib} + case "$1" in + true) + if [ -z "$div" ]; then + dpkg-divert --package dash --divert $distrib --add $2 + cp -dp $2 $distrib + ln -sf $3 $2 + fi + ;; + false) + if [ -n "$div" ] && [ -z "${div%%*by dash}" ]; then + mv $distrib $2 + dpkg-divert --remove $2 + fi + ;; + ash) + case $div in + '') + ;; + *by\ ash) + dst=${div% by ash} + dst=${dst##* to } + + # Work around dpkg-divert bug. + if [ -e "$dst" ]; then + mv "$dst" "$dst.dash-tmp" + fi + dpkg-divert --remove $2 + if [ -e "$dst.dash-tmp" ]; then + mv "$dst.dash-tmp" "$dst" + fi + + dpkg-divert --package dash --divert $distrib --add $2 + if [ "$dst" != $distrib ] && [ -e "$dst" ]; then + mv "$dst" $distrib + fi + ln -sf $3 $2 + ;; + *) + d=${2%/*} + if + [ -h $2 ] && [ -f $2 ] && [ -f $d/$5 ] && + cmp $2 $d/$5 + then + ln -sf $3 $2 + fi + ;; + esac + esac +} + +add_shell() { + if ! type add-shell > /dev/null 2>&1; then + return + fi + + add-shell /bin/dash +} + +reset_default() { + db_fget dash/sh seen + if [ "$RET" = false ]; then + db_reset dash/sh + fi +} + +debconf= +if [ -f /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + debconf=yes +fi + +if [ "$1" = configure ] && [ -z "$2" ]; then + check_divert ash /bin/sh dash '' ash + check_divert ash /usr/share/man/man1/sh.1.gz dash.1.gz \ + /usr/share/man/man1/sh.distrib.1.gz ash.1.gz + add_shell +elif [ "$1" = configure ] && dpkg --compare-versions "$2" lt 0.4.18; then + add_shell +fi + +if [ $debconf ]; then + reset_default + + db_get dash/sh + check_divert "$RET" /bin/sh dash + check_divert "$RET" /usr/share/man/man1/sh.1.gz dash.1.gz \ + /usr/share/man/man1/sh.distrib.1.gz +fi + +test "$1" = 'configure' || exit 0 +test -x /usr/bin/update-menus || exit 0 +test -z "$2" || dpkg --compare-versions "$2" lt 0.5.2-3 || exit 0 +exec update-menus --- dash-0.5.4.orig/debian/implicit +++ dash-0.5.4/debian/implicit @@ -0,0 +1,93 @@ +# $Id: implicit,v 1.11 2005/11/29 21:57:55 pape Exp $ + +.PHONY: deb-checkdir deb-checkuid + +deb-checkdir: + @test -e debian/control || sh -cx '! : wrong directory' +deb-checkuid: + @test "`id -u`" -eq 0 || sh -cx '! : need root privileges' + +%.deb: %.deb-docs %.deb-DEBIAN + @rm -f $*.deb $*.deb-checkdir $*.deb-docs $*.deb-docs-base \ + $*.deb-docs-docs $*.deb-docs-examples $*.deb-DEBIAN \ + $*.deb-DEBIAN-dir $*.deb-DEBIAN-scripts $*.deb-DEBIAN-md5sums + +%.udeb: %.deb-DEBIAN + @rm -f $*.deb $*.deb-checkdir $*.deb-DEBIAN $*.deb-DEBIAN-dir \ + $*.deb-DEBIAN-scripts $*.deb-DEBIAN-md5sums + +%.deb-checkdir: + @test -d debian/$* || sh -cx '! : directory debian/$* missing' + @test "`id -u`" -eq 0 || sh -cx '! : need root privileges' + +%.deb-docs-base: + : implicit + @rm -f debian/$*/usr/share/doc/$*/* || : + @install -d -m0755 debian/$*/usr/share/doc/$* + : debian/$*/usr/share/doc/$*/ + @sh -cx 'install -m0644 debian/copyright debian/$*/usr/share/doc/$*/' + @sh -cx 'install -m0644 debian/changelog \ + debian/$*/usr/share/doc/$*/changelog.Debian' + @test ! -r changelog || \ + sh -cx 'install -m0644 changelog debian/$*/usr/share/doc/$*/' + @test -r debian/$*/usr/share/doc/$*/changelog || \ + sh -cx 'mv debian/$*/usr/share/doc/$*/changelog.Debian \ + debian/$*/usr/share/doc/$*/changelog' + @test -s debian/$*/usr/share/doc/$*/changelog || \ + sh -cx 'rm -f debian/$*/usr/share/doc/$*/changelog' + @gzip -9 debian/$*/usr/share/doc/$*/changelog* +%.deb-docs-docs: + @for i in `cat debian/$*.docs 2>/dev/null || :`; do \ + if test -d $$i; then \ + sh -cx "install -d -m0755 debian/$*/usr/share/doc/$*/$${i##*/}" && \ + for j in $$i/*; do \ + sh -cx "install -m0644 $$j \ + debian/$*/usr/share/doc/$*/$${i##*/}/" || exit 1; \ + done || exit 1; \ + continue; \ + fi; \ + sh -cx "install -m0644 $$i debian/$*/usr/share/doc/$*/" || exit 1; \ + done + @test ! -r debian/$*.README.Debian || \ + sh -cx 'install -m0644 debian/$*.README.Debian \ + debian/$*/usr/share/doc/$*/README.Debian' + @if test -r debian/$*.NEWS.Debian; then \ + sh -cx 'install -m0644 debian/$*.NEWS.Debian \ + debian/$*/usr/share/doc/$*/NEWS.Debian && \ + gzip -9 debian/$*/usr/share/doc/$*/NEWS.Debian'; \ + fi +%.deb-docs-examples: + @rm -rf debian/$*/usr/share/doc/$*/examples + : debian/$*/usr/share/doc/$*/examples/ + @test ! -r debian/$*.examples || \ + install -d -m0755 debian/$*/usr/share/doc/$*/examples + @for i in `cat debian/$*.examples 2>/dev/null || :`; do \ + sh -cx "install -m0644 $$i debian/$*/usr/share/doc/$*/examples/" \ + || exit 1; \ + done +%.deb-docs: %.deb-checkdir %.deb-docs-base %.deb-docs-docs %.deb-docs-examples + : debian/$*/usr/share/doc/$*/ ok + +%.deb-DEBIAN-base: + @rm -rf debian/$*/DEBIAN + : debian/$*/DEBIAN/ + @install -d -m0755 debian/$*/DEBIAN + @for i in conffiles shlibs templates; do \ + test ! -r debian/$*.$$i || \ + sh -cx "install -m0644 debian/$*.$$i debian/$*/DEBIAN/$$i" \ + || exit 1; \ + done +%.deb-DEBIAN-scripts: + @for i in preinst prerm postinst postrm config; do \ + test ! -r debian/$*.$$i || \ + sh -cx "install -m0755 debian/$*.$$i debian/$*/DEBIAN/$$i" \ + || exit 1; \ + done +%.deb-DEBIAN-md5sums: + : debian/$*/DEBIAN/md5sums + @rm -f debian/$*/DEBIAN/md5sums + @cd debian/$* && find * -path 'DEBIAN' -prune -o \ + -type f -exec md5sum {} >>DEBIAN/md5sums \; +%.deb-DEBIAN: %.deb-checkdir %.deb-DEBIAN-base %.deb-DEBIAN-scripts \ + %.deb-DEBIAN-md5sums + : debian/$*/DEBIAN/ ok --- dash-0.5.4.orig/debian/po/pt_BR.po +++ dash-0.5.4/debian/po/pt_BR.po @@ -0,0 +1,49 @@ +# dash Brazilian Portuguese translation +# Copyright (C) 2008 THE dash'S COPYRIGHT HOLDER +# This file is distributed under the same license as the dash package. +# André Luís Lopes , 2008. +# Adriano Rafael Gomes , 2008. +# +msgid "" +msgstr "pt_BR utf-8\n" +"Project-Id-Version: dash 0.5.4-9.1\n" +"Report-Msgid-Bugs-To: dash@packages.debian.org\n" +"POT-Creation-Date: 2008-03-02 21:54+0000\n" +"PO-Revision-Date: 2008-06-28 01:36-0300\n" +"Last-Translator: Adriano Rafael Gomes \n" +"Language-Team: l10n Portuguese \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "Install dash as /bin/sh?" +msgstr "Instalar o dash como /bin/sh?" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "The default /bin/sh shell on Debian and Debian-based systems is bash." +msgstr "" +"O shell /bin/sh padrão no Debian e em sistemas baseados no Debian é o bash." + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +#| msgid "" +#| "Bash is the default /bin/sh on a Debian system. However, since the " +#| "Debian policy requires all shell scripts using /bin/sh to be POSIX " +#| "compliant, any shell that conforms to POSIX can serve as /bin/sh. Since " +#| "dash is POSIX compliant, it can be used as /bin/sh. You may wish to do " +#| "this because dash is faster and smaller than bash." +msgid "" +"However, since the default shell is required to be POSIX-compliant, any " +"shell that conforms to POSIX, such as dash, can serve as /bin/sh. You may " +"wish to do this because dash is faster and smaller than bash." +msgstr "" +"Contudo, como é requerido que o shell padrão seja compatível com o padrão " +"POSIX, qualquer shell que esteja em conformidade com o padrão POSIX, tal " +"como o dash, pode servir como /bin/sh. Você pode desejar fazer isto porque " +"o dash é mais rápido e menor que o bash." --- dash-0.5.4.orig/debian/po/pt.po +++ dash-0.5.4/debian/po/pt.po @@ -0,0 +1,43 @@ +# Portuguese translation of dash's debconf messages. +# Copyright (C) 2007 +# This file is distributed under the same license as the dash package. +# Ricardo Silva , 2007. +# +msgid "" +msgstr "" +"Project-Id-Version: dash 0.5.4-9\n" +"Report-Msgid-Bugs-To: dash@packages.debian.org\n" +"POT-Creation-Date: 2008-03-02 21:54+0000\n" +"PO-Revision-Date: 2008-07-06 23:37+0100\n" +"Last-Translator: Ricardo Silva \n" +"Language-Team: Portuguese \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "Install dash as /bin/sh?" +msgstr "Instalar dash como /bin/sh?" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "The default /bin/sh shell on Debian and Debian-based systems is bash." +msgstr "" +"A shell em /bin/sh por omissão em sistemas Debian e baseados em Debian é a " +"bash." + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "" +"However, since the default shell is required to be POSIX-compliant, any " +"shell that conforms to POSIX, such as dash, can serve as /bin/sh. You may " +"wish to do this because dash is faster and smaller than bash." +msgstr "" +"No entanto, uma vez que a shell por omissão tem de ser compatível com " +"POSIX, qualquer shell que o seja, tal como a dash, pode servir como /bin/sh. " +"Você pode querer fazer isto uma vez que a dash é mais pequena e rápida que " +"a bash." --- dash-0.5.4.orig/debian/po/da.po +++ dash-0.5.4/debian/po/da.po @@ -0,0 +1,49 @@ +# translation of dash_0.4.21_templates.po to Danish +# +# Claus Hindsgaul , 2004. +# Claus Hindsgaul , 2006. +msgid "" +msgstr "" +"Project-Id-Version: dash_0.4.21_templates\n" +"Report-Msgid-Bugs-To: dash@packages.debian.org\n" +"POT-Creation-Date: 2008-03-02 21:54+0000\n" +"PO-Revision-Date: 2006-11-15 15:01+0100\n" +"Last-Translator: Claus Hindsgaul \n" +"Language-Team: Danish\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "Install dash as /bin/sh?" +msgstr "Installér dash som /bin/sh?" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "The default /bin/sh shell on Debian and Debian-based systems is bash." +msgstr "" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +#, fuzzy +#| msgid "" +#| "Bash is the default /bin/sh on a Debian system. However, since the " +#| "Debian policy requires all shell scripts using /bin/sh to be POSIX " +#| "compliant, any shell that conforms to POSIX can serve as /bin/sh. Since " +#| "dash is POSIX compliant, it can be used as /bin/sh. You may wish to do " +#| "this because dash is faster and smaller than bash." +msgid "" +"However, since the default shell is required to be POSIX-compliant, any " +"shell that conforms to POSIX, such as dash, can serve as /bin/sh. You may " +"wish to do this because dash is faster and smaller than bash." +msgstr "" +"Bash er som udgangspunkt /bin/sh på et Debiansystem. Men da det er Debians " +"politik, at skalskripter, der benytter /bin/sh skal overholde POSIX-" +"standarden, vil enhver skal, der overholder POSIX kunne fungere som /bin/sh. " +"Siden dash er overholder POSIX, kan den benyttes som /bin/sh. Det kan være " +"en fordel at gøre dette, fordi dash er hurtigere og mindre end bash." --- dash-0.5.4.orig/debian/po/ja.po +++ dash-0.5.4/debian/po/ja.po @@ -0,0 +1,45 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +msgid "" +msgstr "" +"Project-Id-Version: dash\n" +"Report-Msgid-Bugs-To: dash@packages.debian.org\n" +"POT-Creation-Date: 2008-03-02 21:54+0000\n" +"PO-Revision-Date: 2008-05-29 14:18+0900\n" +"Last-Translator: Kenshi Muto \n" +"Language-Team: Japanese \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "Install dash as /bin/sh?" +msgstr "dash を /bin/sh としてインストールしますか?" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "The default /bin/sh shell on Debian and Debian-based systems is bash." +msgstr "Debian および Debian ベースのシステムのデフォルトの /bin/sh シェルは bash です。" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "" +"However, since the default shell is required to be POSIX-compliant, any " +"shell that conforms to POSIX, such as dash, can serve as /bin/sh. You may " +"wish to do this because dash is faster and smaller than bash." +msgstr "Debian システムでは bash がデフォルトの /bin/sh です。しかし、Debian のポリシーによって、/bin/sh を用いる全てのシェルスクリプトは POSIX 準拠でなければならないため、POSIX を満たすシェルはどれでも /bin/sh となることができます。dash は POSIX 準拠ですので、/bin/sh として使うことができます。dash は bash より速くて小さいので、そうしたいと思うかもしれません。" --- dash-0.5.4.orig/debian/po/es.po +++ dash-0.5.4/debian/po/es.po @@ -0,0 +1,46 @@ +# +msgid "" +msgstr "" +"Project-Id-Version: dash 0.4.18\n" +"Report-Msgid-Bugs-To: dash@packages.debian.org\n" +"POT-Creation-Date: 2008-03-02 21:54+0000\n" +"PO-Revision-Date: 2006-12-08 23:49+0100\n" +"Last-Translator: Fernando Cerezal Lpez \n" +"Language-Team: Debian L10n Spanish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-15\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "Install dash as /bin/sh?" +msgstr "Instalar dash como /bin/sh?" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "The default /bin/sh shell on Debian and Debian-based systems is bash." +msgstr "" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +#, fuzzy +#| msgid "" +#| "Bash is the default /bin/sh on a Debian system. However, since the " +#| "Debian policy requires all shell scripts using /bin/sh to be POSIX " +#| "compliant, any shell that conforms to POSIX can serve as /bin/sh. Since " +#| "dash is POSIX compliant, it can be used as /bin/sh. You may wish to do " +#| "this because dash is faster and smaller than bash." +msgid "" +"However, since the default shell is required to be POSIX-compliant, any " +"shell that conforms to POSIX, such as dash, can serve as /bin/sh. You may " +"wish to do this because dash is faster and smaller than bash." +msgstr "" +"Bash es el intrprete de rdenes /bin/sh predeterminado de los sistemas " +"Debian. Sin embargo, dado que nuestras normas obligan a que todos los " +"scripts para el intrprete de rdenes se atengan a las normas POSIX, " +"cualquier intrprete compatible con POSIX puede servir como /bin/sh. Puesto " +"que dash lo es, puede usarse como /bin/sh, con la ventaja de ser ms rpido " +"y pequeo que bash." --- dash-0.5.4.orig/debian/po/POTFILES.in +++ dash-0.5.4/debian/po/POTFILES.in @@ -0,0 +1 @@ +[type: gettext/rfc822deb] dash.templates.in --- dash-0.5.4.orig/debian/po/ko.po +++ dash-0.5.4/debian/po/ko.po @@ -0,0 +1,41 @@ +# Korean translations for dash package +# dash 패키지에 대한 한국어 번역문. +# Sunjae Park , 2007 - 2008. +# +msgid "" +msgstr "" +"Project-Id-Version: dash\n" +"Report-Msgid-Bugs-To: dash@packages.debian.org\n" +"POT-Creation-Date: 2008-03-02 21:54+0000\n" +"PO-Revision-Date: 2008-06-24 18:27-0400\n" +"Last-Translator: Sunjae Park \n" +"Language-Team: Korean \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "Install dash as /bin/sh?" +msgstr "dash를 /bin/sh로 설치할까요?" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "The default /bin/sh shell on Debian and Debian-based systems is bash." +msgstr "" +"데비안과 데비안 기반 시스템은 모두 bash를 기본 /bin/sh용 셸로 사용합니다." + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "" +"However, since the default shell is required to be POSIX-compliant, any " +"shell that conforms to POSIX, such as dash, can serve as /bin/sh. You may " +"wish to do this because dash is faster and smaller than bash." +msgstr "" +"하지만 기본 셸은 모두 POSIX 호환이어야 하므로, dash와 같이 POSIX 호환 셸" +"이기만 하면 /bin/sh로 사용할 수 있습니다. dash는 bash보다 작고 빠르기 때문에 " +"dash를 사용하길 원하실 수 있습니다." --- dash-0.5.4.orig/debian/po/sv.po +++ dash-0.5.4/debian/po/sv.po @@ -0,0 +1,50 @@ +# translation of dash_0.5.4-11_sv.po to Swedish +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# Developers do not need to manually edit POT or PO files. +# +# Martin gren , 2008. +msgid "" +msgstr "" +"Project-Id-Version: dash_0.5.4-11_sv\n" +"Report-Msgid-Bugs-To: dash@packages.debian.org\n" +"POT-Creation-Date: 2008-03-02 21:54+0000\n" +"PO-Revision-Date: 2008-07-20 10:45+0200\n" +"Last-Translator: Martin gren \n" +"Language-Team: Swedish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "Install dash as /bin/sh?" +msgstr "Installera dash som /bin/sh?" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "The default /bin/sh shell on Debian and Debian-based systems is bash." +msgstr "Standardvalet fr skalet /bin/sh p Debian och Debianbaserade system r bash." + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "" +"However, since the default shell is required to be POSIX-compliant, any " +"shell that conforms to POSIX, such as dash, can serve as /bin/sh. You may " +"wish to do this because dash is faster and smaller than bash." +msgstr "" +"Eftersom standardskalet mste vara POSIX-kompatibelt, kan dock " +"vilket POSIX-kompatibelt skal som helst, ssom dash, tjnstgra som /bin/sh. " +"Du kanske nskar detta eftersom dash r snabbare och mindre n bash." + --- dash-0.5.4.orig/debian/po/ru.po +++ dash-0.5.4/debian/po/ru.po @@ -0,0 +1,56 @@ +# translation of ru.po to Russian +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans# +# Developers do not need to manually edit POT or PO files. +# +# Ilgiz Kalmetev , 2003. +# Yuri Kozlov , 2007, 2008. +msgid "" +msgstr "" +"Project-Id-Version: dash 0.5.4-9\n" +"Report-Msgid-Bugs-To: dash@packages.debian.org\n" +"POT-Creation-Date: 2008-03-02 21:54+0000\n" +"PO-Revision-Date: 2008-05-05 20:44+0400\n" +"Last-Translator: Yuri Kozlov \n" +"Language-Team: Russian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "Install dash as /bin/sh?" +msgstr "Установить dash как /bin/sh?" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "The default /bin/sh shell on Debian and Debian-based systems is bash." +msgstr "" +"Оболочкой командной строки /bin/sh в Debian и основанных на Debian системах " +"по умолчанию является bash." + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "" +"However, since the default shell is required to be POSIX-compliant, any " +"shell that conforms to POSIX, such as dash, can serve as /bin/sh. You may " +"wish to do this because dash is faster and smaller than bash." +msgstr "" +"Однако, так как от оболочки командной строки по умолчанию требуется " +"только соответствовать POSIX, то любая оболочка, соответствующая POSIX, " +"типа dash, может работать в качестве /bin/sh. Причинами, по которым вам стоит " +"рассмотреть переход на dash, являются большая скорость и меньший размер по " +"сравнению с bash." + --- dash-0.5.4.orig/debian/po/tr.po +++ dash-0.5.4/debian/po/tr.po @@ -0,0 +1,36 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Mert Dirik , 2008. +# +msgid "" +msgstr "" +"Project-Id-Version: $paket $surum\n" +"Report-Msgid-Bugs-To: dash@packages.debian.org\n" +"POT-Creation-Date: 2008-03-02 21:54+0000\n" +"PO-Revision-Date: 2008-06-17 01:15+0200\n" +"Last-Translator: Mert Dirik \n" +"Language-Team: Debian L10n Turkish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Turkish\n" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "Install dash as /bin/sh?" +msgstr "dash /bin/sh olarak kurulsun mu?" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "The default /bin/sh shell on Debian and Debian-based systems is bash." +msgstr "Debian tabanlı sistemlerdeki öntanımlı /bin/sh kabuğu bash'tir." + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "However, since the default shell is required to be POSIX-compliant, any shell that conforms to POSIX, such as dash, can serve as /bin/sh. You may wish to do this because dash is faster and smaller than bash." +msgstr "Ama, öntanımlı kabuğun POSIX uyumlu olması gerektiğinden, POSIX standartlarına uyan herhangi bir kabuk, örneğin dash, /bin/sh olarak kullanılabilir. dash bash'ten daha küçük ve daha hızlı olduğundan dash'i /bin/sh olarak kullanmak isteyebilirsiniz." + --- dash-0.5.4.orig/debian/po/templates.pot +++ dash-0.5.4/debian/po/templates.pot @@ -0,0 +1,38 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: dash@packages.debian.org\n" +"POT-Creation-Date: 2008-03-02 21:54+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "Install dash as /bin/sh?" +msgstr "" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "The default /bin/sh shell on Debian and Debian-based systems is bash." +msgstr "" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "" +"However, since the default shell is required to be POSIX-compliant, any " +"shell that conforms to POSIX, such as dash, can serve as /bin/sh. You may " +"wish to do this because dash is faster and smaller than bash." +msgstr "" --- dash-0.5.4.orig/debian/po/cs.po +++ dash-0.5.4/debian/po/cs.po @@ -0,0 +1,44 @@ +# Czech translation of dash templates +# +msgid "" +msgstr "" +"Project-Id-Version: dash\n" +"Report-Msgid-Bugs-To: dash@packages.debian.org\n" +"POT-Creation-Date: 2008-03-02 21:54+0000\n" +"PO-Revision-Date: 2008-06-18 08:24+0200\n" +"Last-Translator: Miroslav Kure \n" +"Language-Team: Czech \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "Install dash as /bin/sh?" +msgstr "Nainstalovat dash jako /bin/sh?" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "The default /bin/sh shell on Debian and Debian-based systems is bash." +msgstr "" +"Výchozím shellem /bin/sh je v Debianu a systémech z něj odvozených bash." + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +#| msgid "" +#| "However, since the distribution policy requires all shell scripts using /" +#| "bin/sh to be POSIX compliant, any shell that conforms to POSIX, such as " +#| "dash, can serve as /bin/sh. You may wish to do this because dash is " +#| "faster and smaller than bash." +msgid "" +"However, since the default shell is required to be POSIX-compliant, any " +"shell that conforms to POSIX, such as dash, can serve as /bin/sh. You may " +"wish to do this because dash is faster and smaller than bash." +msgstr "" +"Protože však politika distribuce vyžaduje, aby byly všechny shellové skripty " +"využívající /bin/sh kompatibilní s POSIXem, můžete jako /bin/sh použít " +"jakýkoliv shell splňující normu POSIX, například shell dash. Určitě to stojí " +"za vyzkoušení, protože dash je rychlejší a menší než bash." --- dash-0.5.4.orig/debian/po/fi.po +++ dash-0.5.4/debian/po/fi.po @@ -0,0 +1,40 @@ +msgid "" +msgstr "" +"Project-Id-Version: dash 0.5.4-8\n" +"Report-Msgid-Bugs-To: dash@packages.debian.org\n" +"POT-Creation-Date: 2008-03-02 21:54+0000\n" +"PO-Revision-Date: 2008-03-05 13:25+0200\n" +"Last-Translator: Esko Arajärvi \n" +"Language-Team: Finnish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Finnish\n" +"X-Poedit-Country: FINLAND\n" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "Install dash as /bin/sh?" +msgstr "Asennetaanko dash linkitettynä tiedostoon /bin/sh?" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "The default /bin/sh shell on Debian and Debian-based systems is bash." +msgstr "" +"Debianissa ja Debianiin pohjautuvissa järjestelmissä oletuskomentotulkkina /" +"bin/sh toimii bash." + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "" +"However, since the default shell is required to be POSIX-compliant, any " +"shell that conforms to POSIX, such as dash, can serve as /bin/sh. You may " +"wish to do this because dash is faster and smaller than bash." +msgstr "" +"Koska oletuskomentotulkin tulee olla POSIX-yhteensopiva, mikä tahansa " +"POSIXin vaatimukset täyttävä komentotulkki, esimerkiksi dash, voi toimia /" +"bin/sh:na. Saatat haluta käyttää dashia, koska se on nopeampi ja pienempi " +"kuin bash." --- dash-0.5.4.orig/debian/po/de.po +++ dash-0.5.4/debian/po/de.po @@ -0,0 +1,41 @@ +# Translation of dash debconf templates to German +# Copyright (C) Helge Kreutzmann , 2006-2008. +# This file is distributed under the same license as the dash package. +# +msgid "" +msgstr "" +"Project-Id-Version: dash 0.5.4-8\n" +"Report-Msgid-Bugs-To: dash@packages.debian.org\n" +"POT-Creation-Date: 2008-03-02 21:54+0000\n" +"PO-Revision-Date: 2008-03-06 22:52+0100\n" +"Last-Translator: Helge Kreutzmann \n" +"Language-Team: de \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-15\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "Install dash as /bin/sh?" +msgstr "Dash als /bin/sh installieren?" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "The default /bin/sh shell on Debian and Debian-based systems is bash." +msgstr "" +"Standardmig ist bash als /bin/sh in Debian und auf Debian-basierten " +"Systemen installiert." + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "" +"However, since the default shell is required to be POSIX-compliant, any " +"shell that conforms to POSIX, such as dash, can serve as /bin/sh. You may " +"wish to do this because dash is faster and smaller than bash." +msgstr "" +"Da die Standardshell allerdings POSIX-konform sein muss, kann jede Shell, " +"die (wie Dash) POSIX-konform ist als /bin/sh dienen. Eventuell wollen Sie " +"Dash verwenden, da Dash schneller und kleiner als Bash ist." --- dash-0.5.4.orig/debian/po/it.po +++ dash-0.5.4/debian/po/it.po @@ -0,0 +1,41 @@ +# dash -- Italian debconf messages +# This file is distributed under the same license as the dash package. +# Andrea Bolognani , 2006. +# Luca Monducci , 2007 - 2008. +# +msgid "" +msgstr "" +"Project-Id-Version: dash 0.5.4 italian debconf templates\n" +"Report-Msgid-Bugs-To: dash@packages.debian.org\n" +"POT-Creation-Date: 2008-03-02 21:54+0000\n" +"PO-Revision-Date: 2008-06-16 20:21+0200\n" +"Last-Translator: Luca Monducci \n" +"Language-Team: Italian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "Install dash as /bin/sh?" +msgstr "Installare dash come /bin/sh?" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "The default /bin/sh shell on Debian and Debian-based systems is bash." +msgstr "" +"La shell predefinita per /bin/sh su sistemi Debian o basati su Debian è bash." + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "" +"However, since the default shell is required to be POSIX-compliant, any " +"shell that conforms to POSIX, such as dash, can serve as /bin/sh. You may " +"wish to do this because dash is faster and smaller than bash." +msgstr "" +"Tuttavia, poiché è richiesto che la shell predefinita sia conforme con " +"POSIX, qualunque shell conforme a POSIX, come dash, può essere usata come /" +"bin/sh. Si può preferire dash perché è più piccola e veloce di bash." --- dash-0.5.4.orig/debian/po/fr.po +++ dash-0.5.4/debian/po/fr.po @@ -0,0 +1,47 @@ +# Translation of dash debconf templates to French +# Copyright (C) 2008 Christian Perrier +# This file is distributed under the same license as the dash package. +# +# Denis Barbier , 2003-2006. +# Cyril Brulebois , 2007. +# Christian Perrier , 2008. +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: dash@packages.debian.org\n" +"POT-Creation-Date: 2008-03-02 21:54+0000\n" +"PO-Revision-Date: 2008-03-04 09:01+0100\n" +"Last-Translator: Christian Perrier \n" +"Language-Team: French \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "Install dash as /bin/sh?" +msgstr "Faut-il mettre en place un lien de /bin/sh vers dash ?" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "The default /bin/sh shell on Debian and Debian-based systems is bash." +msgstr "" +"Par défaut, sur un système Debian ou un système basé sur Debian , /bin/sh " +"est un lien vers bash." + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "" +"However, since the default shell is required to be POSIX-compliant, any " +"shell that conforms to POSIX, such as dash, can serve as /bin/sh. You may " +"wish to do this because dash is faster and smaller than bash." +msgstr "" +"Cependant, comme l'interpréteur de commandes (« shell ») par défaut du " +"système doit être conforme à la norme POSIX, /bin/sh peut être n'importe " +"quel interpréteur de commandes conforme à cette norme, notamment dash. Il " +"peut être préférable de choisir cette option car dash est plus rapide et " +"plus petit que bash." --- dash-0.5.4.orig/debian/po/gl.po +++ dash-0.5.4/debian/po/gl.po @@ -0,0 +1,42 @@ +# Galician translation of dash's debconf templates +# This file is distributed under the same license as the dash package. +# Jacobo Tarrio , 2007, 2008. +# +msgid "" +msgstr "" +"Project-Id-Version: dash\n" +"Report-Msgid-Bugs-To: dash@packages.debian.org\n" +"POT-Creation-Date: 2008-03-02 21:54+0000\n" +"PO-Revision-Date: 2008-05-13 00:31+0100\n" +"Last-Translator: Jacobo Tarrio \n" +"Language-Team: Galician \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "Install dash as /bin/sh?" +msgstr "¿Instalar dash coma /bin/sh?" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "The default /bin/sh shell on Debian and Debian-based systems is bash." +msgstr "" +"O intérprete de ordes /bin/sh por defecto dos sistemas Debian e baseados en " +"Debian é bash." + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "" +"However, since the default shell is required to be POSIX-compliant, any " +"shell that conforms to POSIX, such as dash, can serve as /bin/sh. You may " +"wish to do this because dash is faster and smaller than bash." +msgstr "" +"Nembargantes, como o intérprete de ordes por defecto ten que ser compatible " +"con POSIX, calquera shell que siga POSIX, coma dash, pode servir coma /bin/" +"sh. Pode ser unha boa idea facelo, xa que dash é máis rápido e máis pequeno " +"que bash." --- dash-0.5.4.orig/debian/po/ro.po +++ dash-0.5.4/debian/po/ro.po @@ -0,0 +1,44 @@ +# translation of ro.po to Romanian +# Romanian translations for PACKAGE package +# Traducerea în limba română pentru pachetul PACKAGE. +# Copyright (C) 2008 THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Eddy Petrisor , 2008. +# Eddy Petrișor , 2008. +msgid "" +msgstr "" +"Project-Id-Version: ro\n" +"Report-Msgid-Bugs-To: dash@packages.debian.org\n" +"POT-Creation-Date: 2008-03-02 21:54+0000\n" +"PO-Revision-Date: 2008-06-28 21:24+0300\n" +"Last-Translator: Eddy Petrișor \n" +"Language-Team: Romanian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < 20)) ? 1 : 2;\n" +"X-Generator: KBabel 1.11.4\n" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "Install dash as /bin/sh?" +msgstr "Se instalează dash ca /bin/sh?" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "The default /bin/sh shell on Debian and Debian-based systems is bash." +msgstr "Shell-ul implicit /bin/sh pe sistemele Debian și bazate pe Debian este bash." + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "" +"However, since the default shell is required to be POSIX-compliant, any " +"shell that conforms to POSIX, such as dash, can serve as /bin/sh. You may " +"wish to do this because dash is faster and smaller than bash." +msgstr "Totuși, deoarece shell-ul implicit trebuie să respecte standardul POSIX, orice alt shell conform cu POSIX, precum dash, poate fi folosit ca /bin/sh. Ați putea dori acest lucru deoarece dash este mai rapid și mai mic decât bash." + + --- dash-0.5.4.orig/debian/po/bg.po +++ dash-0.5.4/debian/po/bg.po @@ -0,0 +1,43 @@ +# translation of bg.po to Bulgarian +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Damyan Ivanov , 2008. +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: dash@packages.debian.org\n" +"POT-Creation-Date: 2008-03-02 21:54+0000\n" +"PO-Revision-Date: 2008-06-18 11:28+0300\n" +"Last-Translator: Damyan Ivanov \n" +"Language-Team: Bulgarian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "Install dash as /bin/sh?" +msgstr "Инсталиране на dash като /bin/sh?" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "The default /bin/sh shell on Debian and Debian-based systems is bash." +msgstr "Обвивката по подразбиране (/bin/sh) е bash." + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "" +"However, since the default shell is required to be POSIX-compliant, any " +"shell that conforms to POSIX, such as dash, can serve as /bin/sh. You may " +"wish to do this because dash is faster and smaller than bash." +msgstr "" +"Тъй като изискването към обвивката по подразбиране е единствено да бъде " +"съвместима с POSIX, всяко обвивка, която отговаря на това условие, като " +"например dash, може да изпълнява тази роля. Възможна причина да " +"предпочетете dash пред bash е, че е по-малка и по-бърза." + --- dash-0.5.4.orig/debian/po/nl.po +++ dash-0.5.4/debian/po/nl.po @@ -0,0 +1,49 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +msgid "" +msgstr "" +"Project-Id-Version: dash 0.4.18\n" +"Report-Msgid-Bugs-To: dash@packages.debian.org\n" +"POT-Creation-Date: 2008-03-02 21:54+0000\n" +"PO-Revision-Date: 2008-07-21 10:50+0200\n" +"Last-Translator: Thijs Kinkhorst \n" +"Language-Team: Debian Dutch \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-15\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "Install dash as /bin/sh?" +msgstr "dash als /bin/sh installeren?" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "The default /bin/sh shell on Debian and Debian-based systems is bash." +msgstr "" +"De standaard /bin/sh shell voor Debian en voor op Debian-gebaseerde systemen is bash." + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "" +"However, since the default shell is required to be POSIX-compliant, any " +"shell that conforms to POSIX, such as dash, can serve as /bin/sh. You may " +"wish to do this because dash is faster and smaller than bash." +msgstr "" +"Echter, Debian-beleid eist dat elke shell die zich conformeert aan " +"POSIX, zoals dash, kan worden gebruikt voor /bin/sh. Een reden om dit te " +"overwegen is dat dash sneller en compacter is dan bash." --- dash-0.5.4.orig/debian/po/vi.po +++ dash-0.5.4/debian/po/vi.po @@ -0,0 +1,51 @@ +# Vietnamese translation for dash. +# Copyright © 2008 Free Software Foundation, Inc. +# Clytie Siddall , 2005-2008. +# +msgid "" +msgstr "" +"Project-Id-Version: dash 0.5.4-9.1\n" +"Report-Msgid-Bugs-To: dash@packages.debian.org\n" +"POT-Creation-Date: 2008-03-02 21:54+0000\n" +"PO-Revision-Date: 2007-11-30 19:19+1030\n" +"Last-Translator: Clytie Siddall \n" +"Language-Team: Vietnamese \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: LocFactoryEditor 1.7b1\n" + +#: ../dash.templates.in:1001 +#. Type: boolean +#. Description +msgid "Install dash as /bin/sh?" +msgstr "Cài đặt dash làm « /bin/sh » không?" + +#: ../dash.templates.in:1001 +#. Type: boolean +#. Description +msgid "The default /bin/sh shell on Debian and Debian-based systems is bash." +msgstr "" +"Trên hệ thống Debian và dựa trên Debian, trình bao « /bin/sh » mặc định là " +"bash." + +# Bash is the default /bin/sh on a Debian system. However, since the +# Debian policy requires all shell scripts using /bin/sh to be POSIX +# compliant, any shell that conforms to POSIX can serve as /bin/sh. Since +# dash is POSIX compliant, it can be used as /bin/sh. You may wish to do +# this because dash is faster and smaller than bash. +#: ../dash.templates.in:1001 +#. Type: boolean +#. Description +#| msgid "" +#| "However, since the distribution policy requires all shell scripts using /" +#| "bin/sh to be POSIX compliant, any shell that conforms to POSIX, such as " +#| "dash, can serve as /bin/sh. You may wish to do this because dash is " +#| "faster and smaller than bash." +msgid "" +"However, since the default shell is required to be POSIX-compliant, any " +"shell that conforms to POSIX, such as dash, can serve as /bin/sh. You may " +"wish to do this because dash is faster and smaller than bash." +msgstr "" +"Tuy nhiên, vì trình bao mặc định phải tuân theo POSIX, bất cứ trình bào nào làm cho phù hợp với POSIX, v.d. dash, có khả năng làm « /bin/sh ». Có ích vì dash nhỏ hơn và chạy nhanh hơn bash." --- dash-0.5.4.orig/debian/po/eu.po +++ dash-0.5.4/debian/po/eu.po @@ -0,0 +1,46 @@ +# translation of dash debconf template to Basque +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Xabier Bilbao , 2008. +# Iñaki Larrañaga Murgoitio , 2008. +msgid "" +msgstr "" +"Project-Id-Version: dash-eu\n" +"Report-Msgid-Bugs-To: dash@packages.debian.org\n" +"POT-Creation-Date: 2008-03-02 21:54+0000\n" +"PO-Revision-Date: 2008-06-24 16:57+0200\n" +"Last-Translator: Iñaki Larrañaga Murgoitio \n" +"Language-Team: Basque \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "Install dash as /bin/sh?" +msgstr "Dash instalatu /bin/sh gisa?" + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "The default /bin/sh shell on Debian and Debian-based systems is bash." +msgstr "" +"Debian banaketan, eta Debian-en oinarriturikoetan, bash da lehenetsitako " +"/bin/sh shell-a." + +#. Type: boolean +#. Description +#: ../dash.templates.in:1001 +msgid "" +"However, since the default shell is required to be POSIX-compliant, any " +"shell that conforms to POSIX, such as dash, can serve as /bin/sh. You may " +"wish to do this because dash is faster and smaller than bash." +msgstr "" +"Alabaina, lehenetsitako shell-ak POSIX-ekin bateragarria izan behar duenez, " +"POSIX-ekin bat datorren edozein shell, hala nola dash, /bin/sh gisa ezar " +"daiteke. Aldaketa hau egitea nahi izan dezakezu, dash bizkorragoa eta " +"txikiagoa baita bash baino." --- dash-0.5.4.orig/debian/diff/0024--BUILTIN-Use-intmax_t-arithmetic-in-test.diff +++ dash-0.5.4/debian/diff/0024--BUILTIN-Use-intmax_t-arithmetic-in-test.diff @@ -0,0 +1,172 @@ +From 45c1f40e0235e06d5e6552ce5ab228644d5f36dc Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Sat, 6 Oct 2007 22:42:14 +0800 +Subject: [PATCH] [BUILTIN] Use intmax_t arithmetic in test + +This patch adds the function atomax10 and uses it in test(1) so that we +support intmax_t comparisons. +--- + ChangeLog | 1 + + src/bltin/test.c | 31 ++++++------------------------- + src/mystring.c | 34 ++++++++++++++++++++++++++++++++-- + src/mystring.h | 2 ++ + 4 files changed, 41 insertions(+), 27 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index ea54d84..1db14ac 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -3,6 +3,7 @@ + * Add pushstackmark. + * Treat OPTIND=0 in the same way as OPTIND=1. + * Remove setvarsafe. ++ * Use intmax_t arithmetic in test. + + 2007-10-05 Herbert Xu + +diff --git a/src/bltin/test.c b/src/bltin/test.c +index 7d49569..bc8b175 100644 +--- a/src/bltin/test.c ++++ b/src/bltin/test.c +@@ -11,8 +11,7 @@ + #include + #include + +-#include +-#include ++#include + #include + #include + #include +@@ -145,13 +144,17 @@ static int binop(void); + static int filstat(char *, enum token); + static enum token t_lex(char *); + static int isoperand(void); +-static int getn(const char *); + static int newerf(const char *, const char *); + static int olderf(const char *, const char *); + static int equalf(const char *, const char *); + static int test_st_mode(const struct stat64 *, int); + static int bash_group_member(gid_t); + ++static inline intmax_t getn(const char *s) ++{ ++ return atomax10(s); ++} ++ + int + testcmd(int argc, char **argv) + { +@@ -396,28 +399,6 @@ isoperand(void) + return 0; + } + +-/* atoi with error detection */ +-static int +-getn(const char *s) +-{ +- char *p; +- long r; +- +- errno = 0; +- r = strtol(s, &p, 10); +- +- if (errno != 0) +- error("%s: out of range", s); +- +- while (isspace((unsigned char)*p)) +- p++; +- +- if (*p) +- error("%s: bad number", s); +- +- return (int) r; +-} +- + static int + newerf (const char *f1, const char *f2) + { +diff --git a/src/mystring.c b/src/mystring.c +index 7d937a8..df1691b 100644 +--- a/src/mystring.c ++++ b/src/mystring.c +@@ -42,6 +42,11 @@ + * is_number(s) Return true if s is a string of digits. + */ + ++#include ++#include ++#include ++#include ++#include + #include + #include "shell.h" + #include "syntax.h" +@@ -105,6 +110,29 @@ prefix(const char *string, const char *pfx) + + + /* ++ * Convert a string into an integer of type intmax_t. Alow trailing spaces. ++ */ ++intmax_t atomax10(const char *s) ++{ ++ char *p; ++ intmax_t r; ++ ++ errno = 0; ++ r = strtoimax(s, &p, 10); ++ ++ if (errno != 0) ++ sh_error(illnum, s); ++ ++ while (isspace((unsigned char)*p)) ++ p++; ++ ++ if (*p) ++ sh_error(illnum, s); ++ ++ return r; ++} ++ ++/* + * Convert a string of digits to an integer, printing an error message on + * failure. + */ +@@ -112,10 +140,12 @@ prefix(const char *string, const char *pfx) + int + number(const char *s) + { ++ intmax_t n = atomax10(s); + +- if (! is_number(s)) ++ if (n < 0 || n > INT_MAX) + sh_error(illnum, s); +- return atoi(s); ++ ++ return n; + } + + +diff --git a/src/mystring.h b/src/mystring.h +index f451cc2..c9cade6 100644 +--- a/src/mystring.h ++++ b/src/mystring.h +@@ -34,6 +34,7 @@ + * @(#)mystring.h 8.2 (Berkeley) 5/4/95 + */ + ++#include + #include + + extern const char snlfmt[]; +@@ -47,6 +48,7 @@ extern const char homestr[]; + void scopyn(const char *, char *, int); + #endif + char *prefix(const char *, const char *); ++intmax_t atomax10(const char *); + int number(const char *); + int is_number(const char *); + char *single_quote(const char *); +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0036--EXPAND-Removed-herefd-hack.diff +++ dash-0.5.4/debian/diff/0036--EXPAND-Removed-herefd-hack.diff @@ -0,0 +1,133 @@ +From c0dae4ce84cccb3bf21c7580c4ddcc8e669a5137 Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Sun, 11 Nov 2007 15:00:06 +0800 +Subject: [PATCH] [EXPAND] Removed herefd hack + +The herefd hack goes back more than a decade. it limits the amount of +memory we have to allocate when expanding here-documents by writing the +result out from time to time. However, it's no longer safe because the +stack is used to place intermediate results too and there we certainly +don't want to write them out should we be short on memory. + +In any case, with today's computers we can afford to keep the entire +result in memory and write them out at the end. +--- + ChangeLog | 1 + + src/eval.c | 6 ------ + src/expand.c | 4 ---- + src/memalloc.c | 5 ----- + src/memalloc.h | 1 - + 5 files changed, 1 insertions(+), 16 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index ad98810..39940b9 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,6 +1,7 @@ + 2007-11-11 Herbert Xu + + * Removed noexpand/length check on eofmark. ++ * Removed herefd hack. + + 2007-10-20 Herbert Xu + +diff --git a/src/eval.c b/src/eval.c +index 17b558d..a8feaa0 100644 +--- a/src/eval.c ++++ b/src/eval.c +@@ -577,8 +577,6 @@ evalpipe(union node *n, int flags) + void + evalbackcmd(union node *n, struct backcmd *result) + { +- int saveherefd; +- + result->fd = -1; + result->buf = NULL; + result->nleft = 0; +@@ -587,9 +585,6 @@ evalbackcmd(union node *n, struct backcmd *result) + goto out; + } + +- saveherefd = herefd; +- herefd = -1; +- + #ifdef notyet + /* + * For now we disable executing builtins in the same +@@ -636,7 +631,6 @@ evalbackcmd(union node *n, struct backcmd *result) + result->fd = pip[0]; + result->jp = jp; + } +- herefd = saveherefd; + out: + TRACE(("evalbackcmd done: fd=%d buf=0x%x nleft=%d jp=0x%x\n", + result->fd, result->buf, result->nleft, result->jp)); +diff --git a/src/expand.c b/src/expand.c +index c489446..ee699e8 100644 +--- a/src/expand.c ++++ b/src/expand.c +@@ -184,7 +184,6 @@ static inline const char *getpwhome(const char *name) + void + expandhere(union node *arg, int fd) + { +- herefd = fd; + expandarg(arg, (struct arglist *)NULL, EXP_QUOTED); + xwrite(fd, stackblock(), expdest - (char *)stackblock()); + } +@@ -663,18 +662,15 @@ subevalvar(char *p, char *str, int strloc, int subtype, int startloc, int varfla + int quotes = flag & QUOTES_ESC; + char *startp; + char *loc; +- int saveherefd = herefd; + struct nodelist *saveargbackq = argbackq; + int amount; + char *rmesc, *rmescend; + int zero; + char *(*scan)(char *, char *, char *, char *, int , int); + +- herefd = -1; + argstr(p, EXP_TILDE | (subtype != VSASSIGN && subtype != VSQUESTION ? + (flag & EXP_QUOTED ? EXP_QPAT : EXP_CASE) : 0)); + STPUTC('\0', expdest); +- herefd = saveherefd; + argbackq = saveargbackq; + startp = stackblock() + startloc; + +diff --git a/src/memalloc.c b/src/memalloc.c +index 8d3e2ed..e75e609 100644 +--- a/src/memalloc.c ++++ b/src/memalloc.c +@@ -109,7 +109,6 @@ struct stack_block *stackp = &stackbase; + char *stacknxt = stackbase.space; + size_t stacknleft = MINSIZE; + char *sstrend = stackbase.space + MINSIZE; +-int herefd = -1; + + pointer + stalloc(size_t nbytes) +@@ -264,10 +263,6 @@ void * + growstackstr(void) + { + size_t len = stackblocksize(); +- if (herefd >= 0 && len >= 1024) { +- xwrite(herefd, stackblock(), len); +- return stackblock(); +- } + growstackblock(); + return stackblock() + len; + } +diff --git a/src/memalloc.h b/src/memalloc.h +index ad6015d..4b5be46 100644 +--- a/src/memalloc.h ++++ b/src/memalloc.h +@@ -46,7 +46,6 @@ struct stackmark { + extern char *stacknxt; + extern size_t stacknleft; + extern char *sstrend; +-extern int herefd; + + pointer ckmalloc(size_t); + pointer ckrealloc(pointer, size_t); +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0050--SHELL-Fixed-klibc-klcc-build-problems.diff +++ dash-0.5.4/debian/diff/0050--SHELL-Fixed-klibc-klcc-build-problems.diff @@ -0,0 +1,90 @@ +From bbe5eb81d7114794001a7791523e661108c1cc19 Mon Sep 17 00:00:00 2001 +From: Dan McGee +Date: Sat, 3 May 2008 14:55:33 +0800 +Subject: [PATCH] [SHELL] Fixed klibc/klcc build problems + +klibc does not have mempcpy, so system.h must be included where this is used +to provide the replacement. glob.h doesn't exist, so we need to guard this +include with the HAVE_GLOB definition. Finally, klcc didn't like the syntax +of the main definition in mksignames, and the resulting program segfaulted +when trying to dereference any part of the argv array. Updating the main +function definition solved the problem. + +Signed-off-by: Dan McGee +Signed-off-by: Herbert Xu +--- + ChangeLog | 4 ++++ + src/arith_yylex.c | 1 + + src/expand.c | 2 ++ + src/mksignames.c | 4 +--- + src/parser.c | 1 + + 5 files changed, 9 insertions(+), 3 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 773b36e..d52c521 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++2008-05-03 Dan McGee ++ ++ * Fixed klibc/klcc build problems. ++ + 2008-05-03 Herbert Xu + + * Fixed _PATH_BSHELL warning. +diff --git a/src/arith_yylex.c b/src/arith_yylex.c +index 2c15657..c4458a4 100644 +--- a/src/arith_yylex.c ++++ b/src/arith_yylex.c +@@ -41,6 +41,7 @@ + #include "shell.h" + #include "memalloc.h" + #include "syntax.h" ++#include "system.h" + + #if ARITH_BOR + 11 != ARITH_BORASS || ARITH_ASS + 11 != ARITH_EQ + #error Arithmetic tokens are out of order. +diff --git a/src/expand.c b/src/expand.c +index 5986236..2c52781 100644 +--- a/src/expand.c ++++ b/src/expand.c +@@ -46,7 +46,9 @@ + #include + #include + #include ++#ifdef HAVE_GLOB + #include ++#endif + #include + + /* +diff --git a/src/mksignames.c b/src/mksignames.c +index 03b8742..a832eab 100644 +--- a/src/mksignames.c ++++ b/src/mksignames.c +@@ -382,9 +382,7 @@ write_signames (stream) + } + + int +-main (argc, argv) +- int argc; +- char **argv; ++main(int argc, char **argv) + { + char *stream_name; + FILE *stream; +diff --git a/src/parser.c b/src/parser.c +index 9dd6185..32ed044 100644 +--- a/src/parser.c ++++ b/src/parser.c +@@ -51,6 +51,7 @@ + #include "alias.h" + #include "show.h" + #include "builtins.h" ++#include "system.h" + #ifndef SMALL + #include "myhistedit.h" + #endif +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0055--BUILTIN-Fixed-3-4-argument-cases-for-test-per-POSIX.diff +++ dash-0.5.4/debian/diff/0055--BUILTIN-Fixed-3-4-argument-cases-for-test-per-POSIX.diff @@ -0,0 +1,194 @@ +From 2792935ff548411660a9303d4ca7f27873c43a9f Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Sun, 13 Jul 2008 19:20:10 +0800 +Subject: [PATCH] [BUILTIN] Fixed 3,4-argument cases for test per POSIX + +----- Forwarded message from Gerrit Pape ----- + +Subject: Bug#455828: dash: 4-argument test "test \( ! -e \)" yields an error +Date: Fri, 28 Dec 2007 08:53:29 +0000 +From: Gerrit Pape +To: Vincent Lefevre , 455828@bugs.debian.org + +On Thu, Dec 27, 2007 at 06:23:20PM +0100, Vincent Lefevre wrote: +> On 2007-12-27 16:00:06 +0000, Gerrit Pape wrote: +> > On Wed, Dec 12, 2007 at 02:18:47AM +0100, Vincent Lefevre wrote: +> > > According to POSIX[*], "test \( ! -e \)" is a 4-argument test and is +> > > here equivalent to "test ! -e". But dash (like ksh93 and bash) yields +> > > an error: +> > > +> > > $ test \( ! -e \) || echo $? +> > > test: 1: closing paren expected +> > > 2 +> > > $ test ! -e || echo $? +> > > 1 +> > +> > Hi Vincent, +> > +> > the -e switch to test takes an argument, a pathname. +> +> According to POSIX, in both above examples, "-e" is *not* a switch, +> just a string. +> +> test \( ! -e \) +> +> means: return true if the string "-e" is empty, otherwhise return false. +> The error in dash is that it incorrectly thinks that "-e" is a switch in +> this context. + +I see, you're right. Thanks, Gerrit. + +----- End forwarded message ----- + +This patch hard-codes the 3,4-argument cases in the way required by +POSIX. + +Signed-off-by: Herbert Xu +--- + ChangeLog | 4 ++ + src/bltin/test.c | 81 ++++++++++++++++++++++++++++++++++++++---------------- + 2 files changed, 61 insertions(+), 24 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 7cf15c0..b2f7333 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++2008-06-13 Herbert Xu ++ ++ * Fixed 3,4-argument cases for test per POSIX. ++ + 2008-05-19 Herbert Xu + + * Fixed non-leading slash treatment in expmeta. +diff --git a/src/bltin/test.c b/src/bltin/test.c +index bc8b175..89d8d86 100644 +--- a/src/bltin/test.c ++++ b/src/bltin/test.c +@@ -155,9 +155,23 @@ static inline intmax_t getn(const char *s) + return atomax10(s); + } + ++static const struct t_op *getop(const char *s) ++{ ++ const struct t_op *op; ++ ++ for (op = ops; op->op_text; op++) { ++ if (strcmp(s, op->op_text) == 0) ++ return op; ++ } ++ ++ return NULL; ++} ++ + int + testcmd(int argc, char **argv) + { ++ const struct t_op *op; ++ enum token n; + int res; + + if (*argv[0] == '[') { +@@ -166,14 +180,42 @@ testcmd(int argc, char **argv) + argv[argc] = NULL; + } + +- if (argc < 2) ++ argv++; ++ argc--; ++ ++ if (argc < 1) + return 1; + +- t_wp = &argv[1]; +- res = !oexpr(t_lex(*t_wp)); ++ /* ++ * POSIX prescriptions: he who wrote this deserves the Nobel ++ * peace prize. ++ */ ++ switch (argc) { ++ case 3: ++ op = getop(argv[1]); ++ if (op && op->op_type == BINOP) { ++ n = OPERAND; ++ goto eval; ++ } ++ /* fall through */ + +- if (*t_wp != NULL && *++t_wp != NULL) +- syntax(*t_wp, "unexpected operator"); ++ case 4: ++ if (!strcmp(argv[0], "(") && !strcmp(argv[argc - 1], ")")) { ++ argv[--argc] = NULL; ++ argv++; ++ argc--; ++ } ++ } ++ ++ n = t_lex(*argv); ++ ++eval: ++ t_wp = argv; ++ res = !oexpr(n); ++ argv = t_wp; ++ ++ if (argv[0] != NULL && argv[1] != NULL) ++ syntax(argv[0], "unexpected operator"); + + return res; + } +@@ -359,22 +401,18 @@ t_lex(char *s) + { + struct t_op const *op; + +- op = ops; +- + if (s == 0) { + t_wp_op = (struct t_op *)0; + return EOI; + } +- while (op->op_text) { +- if (strcmp(s, op->op_text) == 0) { +- if ((op->op_type == UNOP && isoperand()) || +- (op->op_num == LPAREN && *(t_wp+1) == 0)) +- break; +- t_wp_op = op; +- return op->op_num; +- } +- op++; ++ ++ op = getop(s); ++ if (op && !(op->op_type == UNOP && isoperand()) && ++ !(op->op_num == LPAREN && *(t_wp+1) == 0)) { ++ t_wp_op = op; ++ return op->op_num; + } ++ + t_wp_op = (struct t_op *)0; + return OPERAND; + } +@@ -385,18 +423,13 @@ isoperand(void) + struct t_op const *op; + char *s, *t; + +- op = ops; + if ((s = *(t_wp+1)) == 0) + return 1; + if ((t = *(t_wp+2)) == 0) + return 0; +- while (op->op_text) { +- if (strcmp(s, op->op_text) == 0) +- return op->op_type == BINOP && +- (t[0] != ')' || t[1] != '\0'); +- op++; +- } +- return 0; ++ ++ op = getop(s); ++ return op && op->op_type == BINOP; + } + + static int +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0058--INPUT-Made-setinputfd-static.diff +++ dash-0.5.4/debian/diff/0058--INPUT-Made-setinputfd-static.diff @@ -0,0 +1,62 @@ +From 6ac68daaa717646e8f5615594299771a1ca9bead Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Sun, 13 Jul 2008 21:40:51 +0800 +Subject: [PATCH] [INPUT] Made setinputfd static + +This function is no longer used anywhere else. + +Signed-off-by: Herbert Xu +--- + ChangeLog | 1 + + src/input.c | 3 ++- + src/input.h | 1 - + 3 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 5565e06..53d5b7c 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -3,6 +3,7 @@ + * Fixed 3,4-argument cases for test per POSIX. + * Made aexpr/oexpr non-recursive. + * Made t_lex reentrant. ++ * Made setinputfd static. + + 2008-05-19 Herbert Xu + +diff --git a/src/input.c b/src/input.c +index bc84e57..27c4fd1 100644 +--- a/src/input.c ++++ b/src/input.c +@@ -107,6 +107,7 @@ EditLine *el; /* cookie for editline package */ + + STATIC void pushfile(void); + static int preadfd(void); ++static void setinputfd(int fd, int push); + + #ifdef mkinit + INCLUDE +@@ -422,7 +423,7 @@ out: + * interrupts off. + */ + +-void ++static void + setinputfd(int fd, int push) + { + if (push) { +diff --git a/src/input.h b/src/input.h +index 1d6f528..50a7797 100644 +--- a/src/input.h ++++ b/src/input.h +@@ -57,7 +57,6 @@ void pungetc(void); + void pushstring(char *, void *); + void popstring(void); + int setinputfile(const char *, int); +-void setinputfd(int, int); + void setinputstring(char *); + void popfile(void); + void popallfiles(void); +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0026--ARITH-Add-assignment-and-intmax_t-support.diff +++ dash-0.5.4/debian/diff/0026--ARITH-Add-assignment-and-intmax_t-support.diff @@ -0,0 +1,1053 @@ +From 2b9ea7693dbc41eaf39e3bdeac1f4b538d216221 Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Thu, 11 Oct 2007 22:36:28 +0800 +Subject: [PATCH] [ARITH] Add assignment and intmax_t support + +This patch adds assignment operator support in arithmetic expansions. It +also changes the type used to intmax_t. +--- + ChangeLog | 4 + + src/Makefile.am | 8 +- + src/arith.y | 155 --------------------------- + src/arith_yacc.c | 298 +++++++++++++++++++++++++++++++++++++++++++++++++++++ + src/arith_yacc.h | 89 ++++++++++++++++ + src/arith_yylex.c | 114 +++++++++++++++++---- + src/expand.c | 23 +++-- + src/expand.h | 4 +- + src/mystring.c | 9 ++- + src/mystring.h | 1 + + src/shell.h | 10 ++ + src/var.c | 20 ++++ + src/var.h | 4 + + 13 files changed, 549 insertions(+), 190 deletions(-) + delete mode 100644 src/arith.y + create mode 100644 src/arith_yacc.c + create mode 100644 src/arith_yacc.h + +diff --git a/ChangeLog b/ChangeLog +index 69ba464..895c607 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++2007-10-11 Herbert Xu ++ ++ * Add assignment support in arithmetic expansions. ++ + 2007-10-08 Herbert Xu + + * Report substition errors at expansion time. +diff --git a/src/Makefile.am b/src/Makefile.am +index 37d6d3c..49026a3 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -18,12 +18,12 @@ COMPILE_FOR_BUILD = \ + bin_PROGRAMS = dash + + dash_CFILES = \ +- alias.c arith_yylex.c cd.c error.c eval.c exec.c expand.c \ ++ alias.c arith_yacc.c arith_yylex.c cd.c error.c eval.c exec.c expand.c \ + histedit.c input.c jobs.c mail.c main.c memalloc.c miscbltin.c \ + mystring.c options.c parser.c redir.c show.c trap.c output.c \ + bltin/printf.c system.c bltin/test.c bltin/times.c var.c + dash_SOURCES = \ +- $(dash_CFILES) arith.y \ ++ $(dash_CFILES) \ + alias.h bltin/bltin.h cd.h error.h eval.h exec.h expand.h hetio.h \ + init.h input.h jobs.h machdep.h mail.h main.h memalloc.h miscbltin.h \ + myhistedit.h mystring.h options.h output.h parser.h redir.h shell.h \ +@@ -32,10 +32,10 @@ dash_LDADD = builtins.o init.o nodes.o signames.o syntax.o + + HELPERS = mkinit mksyntax mknodes mksignames + +-BUILT_SOURCES = arith.h builtins.h nodes.h syntax.h token.h ++BUILT_SOURCES = builtins.h nodes.h syntax.h token.h + CLEANFILES = \ + $(BUILT_SOURCES) $(patsubst %.o,%.c,$(dash_LDADD)) \ +- arith.c $(HELPERS) builtins.def ++ $(HELPERS) builtins.def + + man_MANS = dash.1 + EXTRA_DIST = \ +diff --git a/src/arith.y b/src/arith.y +deleted file mode 100644 +index 07b0b39..0000000 +--- a/src/arith.y ++++ /dev/null +@@ -1,155 +0,0 @@ +-%{ +-/*- +- * Copyright (c) 1993 +- * The Regents of the University of California. All rights reserved. +- * Copyright (c) 1997-2005 +- * Herbert Xu . All rights reserved. +- * +- * This code is derived from software contributed to Berkeley by +- * Kenneth Almquist. +- * +- * Redistribution and use in source and binary forms, with or without +- * modification, are permitted provided that the following conditions +- * are met: +- * 1. Redistributions of source code must retain the above copyright +- * notice, this list of conditions and the following disclaimer. +- * 2. Redistributions in binary form must reproduce the above copyright +- * notice, this list of conditions and the following disclaimer in the +- * documentation and/or other materials provided with the distribution. +- * 3. Neither the name of the University nor the names of its contributors +- * may be used to endorse or promote products derived from this software +- * without specific prior written permission. +- * +- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +- * SUCH DAMAGE. +- */ +- +-#include +-#include "expand.h" +-#include "shell.h" +-#include "error.h" +-#include "output.h" +-#include "memalloc.h" +- +-const char *arith_buf, *arith_startbuf; +- +-#ifndef YYBISON +-int yyparse(void); +-#endif +-void yyerror(const char *); +-#ifdef TESTARITH +-int main(int , char *[]); +-int sh_error(char *); +-#endif +- +-%} +-%token ARITH_NUM ARITH_LPAREN ARITH_RPAREN +- +-%left ARITH_OR +-%left ARITH_AND +-%left ARITH_BOR +-%left ARITH_BXOR +-%left ARITH_BAND +-%left ARITH_EQ ARITH_NE +-%left ARITH_LT ARITH_GT ARITH_GE ARITH_LE +-%left ARITH_LSHIFT ARITH_RSHIFT +-%left ARITH_ADD ARITH_SUB +-%left ARITH_MUL ARITH_DIV ARITH_REM +-%left ARITH_UNARYMINUS ARITH_UNARYPLUS ARITH_NOT ARITH_BNOT +-%% +- +-exp: expr { +- return ($1); +- } +- ; +- +- +-expr: ARITH_LPAREN expr ARITH_RPAREN { $$ = $2; } +- | expr ARITH_OR expr { $$ = $1 || $3; } +- | expr ARITH_AND expr { $$ = $1 && $3; } +- | expr ARITH_BOR expr { $$ = $1 | $3; } +- | expr ARITH_BXOR expr { $$ = $1 ^ $3; } +- | expr ARITH_BAND expr { $$ = $1 & $3; } +- | expr ARITH_EQ expr { $$ = $1 == $3; } +- | expr ARITH_GT expr { $$ = $1 > $3; } +- | expr ARITH_GE expr { $$ = $1 >= $3; } +- | expr ARITH_LT expr { $$ = $1 < $3; } +- | expr ARITH_LE expr { $$ = $1 <= $3; } +- | expr ARITH_NE expr { $$ = $1 != $3; } +- | expr ARITH_LSHIFT expr { $$ = $1 << $3; } +- | expr ARITH_RSHIFT expr { $$ = $1 >> $3; } +- | expr ARITH_ADD expr { $$ = $1 + $3; } +- | expr ARITH_SUB expr { $$ = $1 - $3; } +- | expr ARITH_MUL expr { $$ = $1 * $3; } +- | expr ARITH_DIV expr { +- if ($3 == 0) +- yyerror("division by zero"); +- $$ = $1 / $3; +- } +- | expr ARITH_REM expr { +- if ($3 == 0) +- yyerror("division by zero"); +- $$ = $1 % $3; +- } +- | ARITH_NOT expr { $$ = !($2); } +- | ARITH_BNOT expr { $$ = ~($2); } +- | ARITH_SUB expr %prec ARITH_UNARYMINUS { $$ = -($2); } +- | ARITH_ADD expr %prec ARITH_UNARYPLUS { $$ = $2; } +- | ARITH_NUM +- ; +-%% +-int +-arith(s) +- const char *s; +-{ +- long result; +- +- arith_buf = arith_startbuf = s; +- +- INTOFF; +- result = yyparse(); +- arith_lex_reset(); /* reprime lex */ +- INTON; +- +- return (result); +-} +- +- +-/*************************/ +-#ifdef TEST_ARITH +-#include +-main(argc, argv) +- char *argv[]; +-{ +- printf("%d\n", exp(argv[1])); +-} +-sh_error(s) +- char *s; +-{ +- fprintf(stderr, "exp: %s\n", s); +- exit(1); +-} +-#endif +- +-void +-yyerror(s) +- const char *s; +-{ +- +-#ifndef YYBISON +- yyerrok; +-#endif +- yyclearin; +- arith_lex_reset(); /* reprime lex */ +- sh_error("arithmetic expression: %s: \"%s\"", s, arith_startbuf); +- /* NOTREACHED */ +-} +diff --git a/src/arith_yacc.c b/src/arith_yacc.c +new file mode 100644 +index 0000000..ad653ed +--- /dev/null ++++ b/src/arith_yacc.c +@@ -0,0 +1,298 @@ ++/*- ++ * Copyright (c) 1993 ++ * The Regents of the University of California. All rights reserved. ++ * Copyright (c) 2007 ++ * Herbert Xu . All rights reserved. ++ * ++ * This code is derived from software contributed to Berkeley by ++ * Kenneth Almquist. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * 3. Neither the name of the University nor the names of its contributors ++ * may be used to endorse or promote products derived from this software ++ * without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE ++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ++ * SUCH DAMAGE. ++ */ ++ ++#include ++#include ++#include ++#include "arith_yacc.h" ++#include "expand.h" ++#include "shell.h" ++#include "error.h" ++#include "output.h" ++#include "var.h" ++ ++#if ARITH_BOR + 11 != ARITH_BORASS || ARITH_ASS + 11 != ARITH_EQ ++#error Arithmetic tokens are out of order. ++#endif ++ ++static const char *arith_startbuf; ++ ++const char *arith_buf; ++union yystype yylval; ++ ++static int last_token; ++ ++#define ARITH_PRECEDENCE(op, prec) [op - ARITH_BINOP_MIN] = prec ++ ++static const char prec[ARITH_BINOP_MAX - ARITH_BINOP_MIN] = { ++ ARITH_PRECEDENCE(ARITH_MUL, 0), ++ ARITH_PRECEDENCE(ARITH_DIV, 0), ++ ARITH_PRECEDENCE(ARITH_REM, 0), ++ ARITH_PRECEDENCE(ARITH_ADD, 1), ++ ARITH_PRECEDENCE(ARITH_SUB, 1), ++ ARITH_PRECEDENCE(ARITH_LSHIFT, 2), ++ ARITH_PRECEDENCE(ARITH_RSHIFT, 2), ++ ARITH_PRECEDENCE(ARITH_LT, 3), ++ ARITH_PRECEDENCE(ARITH_LE, 3), ++ ARITH_PRECEDENCE(ARITH_GT, 3), ++ ARITH_PRECEDENCE(ARITH_GE, 3), ++ ARITH_PRECEDENCE(ARITH_EQ, 4), ++ ARITH_PRECEDENCE(ARITH_NE, 4), ++ ARITH_PRECEDENCE(ARITH_BAND, 5), ++ ARITH_PRECEDENCE(ARITH_BXOR, 6), ++ ARITH_PRECEDENCE(ARITH_BOR, 7), ++}; ++ ++static void yyerror(const char *s) __attribute__ ((noreturn)); ++static void yyerror(const char *s) ++{ ++ sh_error("arithmetic expression: %s: \"%s\"", s, arith_startbuf); ++ /* NOTREACHED */ ++} ++ ++static inline int higher_prec(int op1, int op2) ++{ ++ return prec[op1 - ARITH_BINOP_MIN] < prec[op2 - ARITH_BINOP_MIN]; ++} ++ ++static intmax_t do_binop(int op, intmax_t a, intmax_t b) ++{ ++ imaxdiv_t div; ++ ++ switch (op) { ++ default: ++ case ARITH_REM: ++ case ARITH_DIV: ++ if (!b) ++ yyerror("division by zero"); ++ div = imaxdiv(a, b); ++ return op == ARITH_REM ? div.rem : div.quot; ++ case ARITH_MUL: ++ return a * b; ++ case ARITH_ADD: ++ return a + b; ++ case ARITH_SUB: ++ return a - b; ++ case ARITH_LSHIFT: ++ return a << b; ++ case ARITH_RSHIFT: ++ return a >> b; ++ case ARITH_LT: ++ return a < b; ++ case ARITH_LE: ++ return a <= b; ++ case ARITH_GT: ++ return a > b; ++ case ARITH_GE: ++ return a >= b; ++ case ARITH_EQ: ++ return a == b; ++ case ARITH_NE: ++ return a != b; ++ case ARITH_BAND: ++ return a & b; ++ case ARITH_BXOR: ++ return a ^ b; ++ case ARITH_BOR: ++ return a | b; ++ } ++} ++ ++static intmax_t assignment(int var, int noeval); ++ ++static intmax_t primary(int token, union yystype *val, int op, int noeval) ++{ ++ intmax_t result; ++ ++again: ++ switch (token) { ++ case ARITH_LPAREN: ++ result = assignment(op, noeval); ++ if (last_token != ARITH_RPAREN) ++ yyerror("expecting ')'"); ++ last_token = yylex(); ++ return result; ++ case ARITH_NUM: ++ last_token = op; ++ return val->val; ++ case ARITH_VAR: ++ last_token = op; ++ return noeval ? val->val : lookupvarint(val->name); ++ case ARITH_ADD: ++ token = op; ++ *val = yylval; ++ op = yylex(); ++ goto again; ++ case ARITH_SUB: ++ *val = yylval; ++ return -primary(op, val, yylex(), noeval); ++ case ARITH_NOT: ++ *val = yylval; ++ return !primary(op, val, yylex(), noeval); ++ case ARITH_BNOT: ++ *val = yylval; ++ return ~primary(op, val, yylex(), noeval); ++ default: ++ yyerror("expecting primary"); ++ } ++} ++ ++static intmax_t binop2(intmax_t a, int op, int noeval) ++{ ++ for (;;) { ++ union yystype val; ++ intmax_t b; ++ int op2; ++ int token; ++ ++ token = yylex(); ++ val = yylval; ++ ++ b = primary(token, &val, yylex(), noeval); ++ ++ op2 = last_token; ++ if (op2 < ARITH_BINOP_MIN || op2 >= ARITH_BINOP_MAX) ++ return noeval ? b : do_binop(op, a, b); ++ ++ if (higher_prec(op2, op)) { ++ b = binop2(b, op2, noeval); ++ return noeval ? b : do_binop(op, a, b); ++ } ++ ++ a = do_binop(op, a, b); ++ op = op2; ++ } ++} ++ ++static intmax_t binop(int token, union yystype *val, int op, int noeval) ++{ ++ intmax_t a = primary(token, val, op, noeval); ++ ++ op = last_token; ++ if (op < ARITH_BINOP_MIN || op >= ARITH_BINOP_MAX) ++ return a; ++ ++ return binop2(a, op, noeval); ++} ++ ++static intmax_t and(int token, union yystype *val, int op, int noeval) ++{ ++ intmax_t a = binop(token, val, op, noeval); ++ intmax_t b; ++ ++ op = last_token; ++ if (op != ARITH_AND) ++ return a; ++ ++ token = yylex(); ++ *val = yylval; ++ ++ b = and(token, val, yylex(), noeval | !a); ++ ++ return a && b; ++} ++ ++static intmax_t or(int token, union yystype *val, int op, int noeval) ++{ ++ intmax_t a = and(token, val, op, noeval); ++ intmax_t b; ++ ++ op = last_token; ++ if (op != ARITH_OR) ++ return a; ++ ++ token = yylex(); ++ *val = yylval; ++ ++ b = or(token, val, yylex(), noeval | !!a); ++ ++ return a | b; ++} ++ ++static intmax_t cond(int token, union yystype *val, int op, int noeval) ++{ ++ intmax_t a = or(token, val, op, noeval); ++ intmax_t b; ++ intmax_t c; ++ ++ if (last_token != ARITH_QMARK) ++ return a; ++ ++ b = assignment(yylex(), noeval | !a); ++ ++ if (last_token != ARITH_COLON) ++ yyerror("expecting ':'"); ++ ++ token = yylex(); ++ *val = yylval; ++ ++ c = cond(token, val, yylex(), noeval | !!a); ++ ++ return a ? b : c; ++} ++ ++static intmax_t assignment(int var, int noeval) ++{ ++ union yystype val = yylval; ++ int op = yylex(); ++ intmax_t result; ++ ++ if (var != ARITH_VAR) ++ return cond(var, &val, op, noeval); ++ ++ if (op != ARITH_ASS && (op < ARITH_ASS_MIN || op >= ARITH_ASS_MAX)) ++ return cond(var, &val, op, noeval); ++ ++ result = assignment(yylex(), noeval); ++ if (noeval) ++ return result; ++ ++ return setvarint(val.name, ++ op == ARITH_ASS ? result : ++ do_binop(op - 11, lookupvarint(val.name), result)); ++} ++ ++intmax_t arith(const char *s) ++{ ++ intmax_t result; ++ ++ arith_buf = arith_startbuf = s; ++ ++ result = assignment(yylex(), 0); ++ ++ if (last_token) ++ yyerror("expecting EOF"); ++ ++ return result; ++} +diff --git a/src/arith_yacc.h b/src/arith_yacc.h +new file mode 100644 +index 0000000..ff34d52 +--- /dev/null ++++ b/src/arith_yacc.h +@@ -0,0 +1,89 @@ ++/*- ++ * Copyright (c) 1993 ++ * The Regents of the University of California. All rights reserved. ++ * Copyright (c) 2007 ++ * Herbert Xu . All rights reserved. ++ * ++ * This code is derived from software contributed to Berkeley by ++ * Kenneth Almquist. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * 3. Neither the name of the University nor the names of its contributors ++ * may be used to endorse or promote products derived from this software ++ * without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE ++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ++ * SUCH DAMAGE. ++ */ ++ ++#define ARITH_ASS 1 ++ ++#define ARITH_OR 2 ++#define ARITH_AND 3 ++#define ARITH_BAD 4 ++#define ARITH_NUM 5 ++#define ARITH_VAR 6 ++#define ARITH_NOT 7 ++ ++#define ARITH_BINOP_MIN 8 ++#define ARITH_LE 8 ++#define ARITH_GE 9 ++#define ARITH_LT 10 ++#define ARITH_GT 11 ++#define ARITH_EQ 12 ++#define ARITH_REM 13 ++#define ARITH_BAND 14 ++#define ARITH_LSHIFT 15 ++#define ARITH_RSHIFT 16 ++#define ARITH_MUL 17 ++#define ARITH_ADD 18 ++#define ARITH_BOR 19 ++#define ARITH_SUB 20 ++#define ARITH_BXOR 21 ++#define ARITH_DIV 22 ++#define ARITH_NE 23 ++#define ARITH_BINOP_MAX 24 ++ ++#define ARITH_ASS_MIN 24 ++#define ARITH_REMASS 24 ++#define ARITH_BANDASS 25 ++#define ARITH_LSHIFTASS 26 ++#define ARITH_RSHIFTASS 27 ++#define ARITH_MULASS 28 ++#define ARITH_ADDASS 29 ++#define ARITH_BORASS 30 ++#define ARITH_SUBASS 31 ++#define ARITH_BXORASS 32 ++#define ARITH_DIVASS 33 ++#define ARITH_ASS_MAX 34 ++ ++#define ARITH_LPAREN 34 ++#define ARITH_RPAREN 35 ++#define ARITH_BNOT 36 ++#define ARITH_QMARK 37 ++#define ARITH_COLON 38 ++ ++union yystype { ++ intmax_t val; ++ char *name; ++}; ++ ++extern union yystype yylval; ++ ++int yylex(void); +diff --git a/src/arith_yylex.c b/src/arith_yylex.c +index 4fa2051..0f46990 100644 +--- a/src/arith_yylex.c ++++ b/src/arith_yylex.c +@@ -32,19 +32,28 @@ + * SUCH DAMAGE. + */ + ++#include + #include +-#include "arith.h" ++#include ++#include "arith_yacc.h" + #include "expand.h" + #include "error.h" ++#include "shell.h" ++#include "memalloc.h" ++#include "syntax.h" + +-extern int yylval; +-extern const char *arith_buf, *arith_startbuf; ++#if ARITH_BOR + 11 != ARITH_BORASS || ARITH_ASS + 11 != ARITH_EQ ++#error Arithmetic tokens are out of order. ++#endif ++ ++extern const char *arith_buf; + + int + yylex() + { + int value; + const char *buf = arith_buf; ++ const char *p; + + for (;;) { + switch (*buf) { +@@ -54,9 +63,7 @@ yylex() + buf++; + continue; + default: +-err: +- sh_error("arith: syntax error: \"%s\"", arith_startbuf); +- /* NOTREACHED */ ++ return ARITH_BAD; + case '0': + case '1': + case '2': +@@ -67,13 +74,74 @@ err: + case '7': + case '8': + case '9': +- yylval = strtoll(buf, (char **) &arith_buf, 0); ++ yylval.val = strtoimax(buf, (char **)&arith_buf, 0); + return ARITH_NUM; ++ case 'A': ++ case 'B': ++ case 'C': ++ case 'D': ++ case 'E': ++ case 'F': ++ case 'G': ++ case 'H': ++ case 'I': ++ case 'J': ++ case 'K': ++ case 'L': ++ case 'M': ++ case 'N': ++ case 'O': ++ case 'P': ++ case 'Q': ++ case 'R': ++ case 'S': ++ case 'T': ++ case 'U': ++ case 'V': ++ case 'W': ++ case 'X': ++ case 'Y': ++ case 'Z': ++ case '_': ++ case 'a': ++ case 'b': ++ case 'c': ++ case 'd': ++ case 'e': ++ case 'f': ++ case 'g': ++ case 'h': ++ case 'i': ++ case 'j': ++ case 'k': ++ case 'l': ++ case 'm': ++ case 'n': ++ case 'o': ++ case 'p': ++ case 'q': ++ case 'r': ++ case 's': ++ case 't': ++ case 'u': ++ case 'v': ++ case 'w': ++ case 'x': ++ case 'y': ++ case 'z': ++ p = buf; ++ while (buf++, is_in_name(*buf)) ++ ; ++ yylval.name = stalloc(buf - p + 1); ++ *(char *)mempcpy(yylval.name, p, buf - p) = 0; ++ value = ARITH_VAR; ++ goto out; + case '=': +- if (*++buf != '=') { +- goto err; +- } +- value = ARITH_EQ; ++ value = ARITH_ASS; ++checkeq: ++ if (*++buf != '=') ++ goto out; ++ value += 11; + break; + case '>': + switch (*++buf) { +@@ -82,7 +150,7 @@ err: + break; + case '>': + value = ARITH_RSHIFT; +- break; ++ goto checkeq; + default: + value = ARITH_GT; + goto out; +@@ -95,7 +163,7 @@ err: + break; + case '<': + value = ARITH_LSHIFT; +- break; ++ goto checkeq; + default: + value = ARITH_LT; + goto out; +@@ -104,14 +172,14 @@ err: + case '|': + if (*++buf != '|') { + value = ARITH_BOR; +- goto out; ++ goto checkeq; + } + value = ARITH_OR; + break; + case '&': + if (*++buf != '&') { + value = ARITH_BAND; +- goto out; ++ goto checkeq; + } + value = ARITH_AND; + break; +@@ -133,24 +201,30 @@ err: + break; + case '*': + value = ARITH_MUL; +- break; ++ goto checkeq; + case '/': + value = ARITH_DIV; +- break; ++ goto checkeq; + case '%': + value = ARITH_REM; +- break; ++ goto checkeq; + case '+': + value = ARITH_ADD; +- break; ++ goto checkeq; + case '-': + value = ARITH_SUB; +- break; ++ goto checkeq; + case '~': + value = ARITH_BNOT; + break; + case '^': + value = ARITH_BXOR; ++ goto checkeq; ++ case '?': ++ value = ARITH_QMARK; ++ break; ++ case ':': ++ value = ARITH_COLON; + break; + } + break; +diff --git a/src/expand.c b/src/expand.c +index 54fe908..9cb8eab 100644 +--- a/src/expand.c ++++ b/src/expand.c +@@ -42,6 +42,7 @@ + #endif + #include + #include ++#include + #include + #include + #if defined(__GLIBC__) +@@ -142,7 +143,7 @@ STATIC int pmatch(const char *, const char *); + #else + #define pmatch(a, b) !fnmatch((a), (b), 0) + #endif +-STATIC int cvtnum(long); ++STATIC int cvtnum(intmax_t); + STATIC size_t esclen(const char *, const char *); + STATIC char *scanleft(char *, char *, char *, char *, int, int); + STATIC char *scanright(char *, char *, char *, char *, int, int); +@@ -478,9 +479,11 @@ removerecordregions(int endoff) + void + expari(int flag) + { ++ struct stackmark sm; + char *p, *start; + int begoff; + int len; ++ intmax_t result; + + /* ifsfree(); */ + +@@ -490,8 +493,9 @@ expari(int flag) + * start of arithmetic. + */ + start = stackblock(); +- p = expdest - 1; +- *p = '\0'; ++ p = expdest; ++ pushstackmark(&sm, p - start); ++ *--p = '\0'; + p--; + do { + int esc; +@@ -522,7 +526,10 @@ expari(int flag) + if (flag & QUOTES_ESC) + rmescapes(p + 1); + +- len = cvtnum(arith(p + 1)); ++ result = arith(p + 1); ++ popstackmark(&sm); ++ ++ len = cvtnum(result); + + if (!(flag & EXP_QUOTED)) + recordregion(begoff, begoff + len, 0); +@@ -1707,12 +1714,12 @@ casematch(union node *pattern, char *val) + */ + + STATIC int +-cvtnum(long num) ++cvtnum(intmax_t num) + { +- int len; ++ int len = max_int_length(sizeof(num)); + +- expdest = makestrspace(32, expdest); +- len = fmtstr(expdest, 32, "%ld", num); ++ expdest = makestrspace(len, expdest); ++ len = fmtstr(expdest, len, "%jd", num); + STADJUST(len, expdest); + return len; + } +diff --git a/src/expand.h b/src/expand.h +index 4dfbc43..225b004 100644 +--- a/src/expand.h ++++ b/src/expand.h +@@ -34,6 +34,8 @@ + * @(#)expand.h 8.2 (Berkeley) 5/4/95 + */ + ++#include ++ + struct strlist { + struct strlist *next; + char *text; +@@ -68,7 +70,7 @@ char *_rmescapes(char *, int); + int casematch(union node *, char *); + + /* From arith.y */ +-int arith(const char *); ++intmax_t arith(const char *); + int expcmd(int , char **); + #ifdef USE_LEX + void arith_lex_reset(void); +diff --git a/src/mystring.c b/src/mystring.c +index df1691b..b84b7e2 100644 +--- a/src/mystring.c ++++ b/src/mystring.c +@@ -112,13 +112,13 @@ prefix(const char *string, const char *pfx) + /* + * Convert a string into an integer of type intmax_t. Alow trailing spaces. + */ +-intmax_t atomax10(const char *s) ++intmax_t atomax(const char *s, int base) + { + char *p; + intmax_t r; + + errno = 0; +- r = strtoimax(s, &p, 10); ++ r = strtoimax(s, &p, base); + + if (errno != 0) + sh_error(illnum, s); +@@ -132,6 +132,11 @@ intmax_t atomax10(const char *s) + return r; + } + ++intmax_t atomax10(const char *s) ++{ ++ return atomax(s, 10); ++} ++ + /* + * Convert a string of digits to an integer, printing an error message on + * failure. +diff --git a/src/mystring.h b/src/mystring.h +index c9cade6..477cd16 100644 +--- a/src/mystring.h ++++ b/src/mystring.h +@@ -48,6 +48,7 @@ extern const char homestr[]; + void scopyn(const char *, char *, int); + #endif + char *prefix(const char *, const char *); ++intmax_t atomax(const char *, int); + intmax_t atomax10(const char *); + int number(const char *); + int is_number(const char *); +diff --git a/src/shell.h b/src/shell.h +index 9b67696..98edc8b 100644 +--- a/src/shell.h ++++ b/src/shell.h +@@ -92,3 +92,13 @@ extern char nullstr[1]; /* null string */ + + #define likely(x) __builtin_expect(!!(x),1) + #define unlikely(x) __builtin_expect(!!(x),0) ++ ++/* ++ * Hack to calculate maximum length. ++ * (length * 8 - 1) * log10(2) + 1 + 1 + 12 ++ * The second 1 is for the minus sign and the 12 is a safety margin. ++ */ ++static inline int max_int_length(int bytes) ++{ ++ return (bytes * 8 - 1) * 0.30102999566398119521 + 14; ++} +diff --git a/src/var.c b/src/var.c +index 501a279..17d3637 100644 +--- a/src/var.c ++++ b/src/var.c +@@ -202,6 +202,21 @@ setvar(const char *name, const char *val, int flags) + INTON; + } + ++/* ++ * Set the given integer as the value of a variable. The flags argument is ++ * ored with the flags of the variable. ++ */ ++ ++intmax_t setvarint(const char *name, intmax_t val) ++{ ++ int len = max_int_length(sizeof(val)); ++ char buf[len]; ++ ++ fmtstr(buf, len, "%jd", val); ++ setvar(name, buf, 0); ++ return val; ++} ++ + + + /* +@@ -293,6 +308,11 @@ lookupvar(const char *name) + return NULL; + } + ++intmax_t lookupvarint(const char *name) ++{ ++ return atomax(lookupvar(name) ?: nullstr, 0); ++} ++ + + + /* +diff --git a/src/var.h b/src/var.h +index ae58c6c..66443df 100644 +--- a/src/var.h ++++ b/src/var.h +@@ -34,6 +34,8 @@ + * @(#)var.h 8.2 (Berkeley) 5/4/95 + */ + ++#include ++ + /* + * Shell variables. + */ +@@ -125,10 +127,12 @@ extern const char defpathvar[]; + + void initvar(void); + void setvar(const char *, const char *, int); ++intmax_t setvarint(const char *, intmax_t); + void setvareq(char *, int); + struct strlist; + void listsetvar(struct strlist *, int); + char *lookupvar(const char *); ++intmax_t lookupvarint(const char *); + char *bltinlookup(const char *); + char **listvars(int, int, char ***); + #define environment() listvars(VEXPORT, VUNSET, 0) +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0039--BUILTIN-Add-set-o-support.diff +++ dash-0.5.4/debian/diff/0039--BUILTIN-Add-set-o-support.diff @@ -0,0 +1,105 @@ +From 8b0cb6ab29cd7bb714dfd63b2eed79ee6002ce3e Mon Sep 17 00:00:00 2001 +From: Richard M Kreuter +Date: Sun, 23 Dec 2007 11:24:48 +0800 +Subject: [PATCH] [BUILTIN] Add set +o support + +The dash(1) in Debian stable does not support "set +o" in the manner +specified by SUSv3: + +|+o +| Write the current option settings to standard output in a format +| that is suitable for reinput to the shell as commands that +| achieve the same options settings. + +(citation from +http://www.opengroup.org/onlinepubs/009695399/utilities/set.html) + +Instead, dash's "set +o" prints the shell's options in a +human-readable format. + +Here is a simple test program that exercises this feature; it works as +I believe is required under bash, but not under dash. + + # Save the shell's options + set +o > /tmp/settings-commands + set -o | sort > /tmp/settings-before + # Change some options. + set -v + set -f + set -x + set +o emacs + set -o vi + # Try to restore our options. + . /tmp/settings-commands + set -o | sort > /tmp/settings-after + # Compare. + diff /tmp/settings-before /tmp/settings-after + +I believe the following small patch adds this feature to dash, and +documents it in the manual page: + +Signed-off-by: Herbert Xu +--- + ChangeLog | 4 ++++ + src/dash.1 | 5 +++++ + src/options.c | 16 ++++++++++++---- + 3 files changed, 21 insertions(+), 4 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index e72849c..10ec45c 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++2007-12-23 Richard M Kreuter ++ ++ * Add set +o support. ++ + 2007-12-23 Steve Langasek + + * Fixed bad pointer arithmetic in evalcommand. +diff --git a/src/dash.1 b/src/dash.1 +index 9b8ab0e..b4140eb 100644 +--- a/src/dash.1 ++++ b/src/dash.1 +@@ -1782,6 +1782,11 @@ With no arguments, it lists the values of all shell variables. + If options are given, it sets the specified option + flags, or clears them as described in the section called + .Sx Argument List Processing . ++As a special case, if the option is -o or +o and no argument is ++supplied, the shell prints the settings of all its options. If the ++option is -o, the settings are printed in a human-readable format; if ++the option is +o, the settings are printed in a format suitable for ++reinput to the shell to affect the same option settings. + .Pp + The third use of the set command is to set the values of the shell's + positional parameters to the specified args. +diff --git a/src/options.c b/src/options.c +index f669117..48c9671 100644 +--- a/src/options.c ++++ b/src/options.c +@@ -240,10 +240,18 @@ minus_o(char *name, int val) + int i; + + if (name == NULL) { +- out1str("Current option settings\n"); +- for (i = 0; i < NOPTS; i++) +- out1fmt("%-16s%s\n", optnames[i], +- optlist[i] ? "on" : "off"); ++ if (val) { ++ out1str("Current option settings\n"); ++ for (i = 0; i < NOPTS; i++) ++ out1fmt("%-16s%s\n", optnames[i], ++ optlist[i] ? "on" : "off"); ++ } else { ++ for (i = 0; i < NOPTS; i++) ++ out1fmt("set %s %s\n", ++ optlist[i] ? "-o" : "+o", ++ optnames[i]); ++ ++ } + } else { + for (i = 0; i < NOPTS; i++) + if (equal(name, optnames[i])) { +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0060--OPTIONS-Added-support-for-l.diff +++ dash-0.5.4/debian/diff/0060--OPTIONS-Added-support-for-l.diff @@ -0,0 +1,171 @@ +From 114ff11c939a31dba960bfd062bc321b08e5017f Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Sun, 13 Jul 2008 22:34:50 +0800 +Subject: [PATCH] [OPTIONS] Added support for -l + +This patch adds support for the -l option (login shell) as required +by the LSB. + +Signed-off-by: Herbert Xu +--- + ChangeLog | 1 + + src/dash.1 | 4 +++- + src/main.c | 5 +++-- + src/options.c | 17 +++++++++++++---- + src/options.h | 2 +- + 5 files changed, 21 insertions(+), 8 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 58bed78..89f5c13 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -5,6 +5,7 @@ + * Made t_lex reentrant. + * Made setinputfd static. + * Expand ENV before using it. ++ * Added support for -l. + + 2008-05-19 Herbert Xu + +diff --git a/src/dash.1 b/src/dash.1 +index b4140eb..c8cb3ce 100644 +--- a/src/dash.1 ++++ b/src/dash.1 +@@ -170,7 +170,7 @@ positional parameters of the shell ($1, $2, etc). + Otherwise, the shell + reads commands from its standard input. + .Ss Argument List Processing +-All of the single letter options have a corresponding name that can be ++All of the single letter options that have a corresponding name can be + used as an argument to the + .Fl o + option. +@@ -235,6 +235,8 @@ Useful for debugging. + Ignore EOF's from input when interactive. + .It Fl i Em interactive + Force the shell to behave interactively. ++.It Fl l ++Make dash act as if it had been invoked as a login shell. + .It Fl m Em monitor + Turn on job control (set automatically when interactive). + .It Fl s Em stdin +diff --git a/src/main.c b/src/main.c +index cf34931..7d07e2d 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -96,6 +96,7 @@ main(int argc, char **argv) + volatile int state; + struct jmploc jmploc; + struct stackmark smark; ++ int login; + + #ifdef __GLIBC__ + dash_errno = __errno_location(); +@@ -148,8 +149,8 @@ main(int argc, char **argv) + rootpid = getpid(); + init(); + setstackmark(&smark); +- procargs(argc, argv); +- if (argv[0] && argv[0][0] == '-') { ++ login = procargs(argc, argv); ++ if (login) { + state = 1; + read_profile("/etc/profile"); + state1: +diff --git a/src/options.c b/src/options.c +index 48c9671..6f381e6 100644 +--- a/src/options.c ++++ b/src/options.c +@@ -106,7 +106,7 @@ const char optletters[NOPTS] = { + char optlist[NOPTS]; + + +-STATIC void options(int); ++static int options(int); + STATIC void minus_o(char *, int); + STATIC void setoption(int, int); + STATIC int getopts(char *, char *, char **); +@@ -116,21 +116,23 @@ STATIC int getopts(char *, char *, char **); + * Process the shell command line arguments. + */ + +-void ++int + procargs(int argc, char **argv) + { + int i; + const char *xminusc; + char **xargv; ++ int login; + + xargv = argv; ++ login = xargv[0] && xargv[0][0] == '-'; + arg0 = xargv[0]; + if (argc > 0) + xargv++; + for (i = 0; i < NOPTS; i++) + optlist[i] = 2; + argptr = xargv; +- options(1); ++ login |= options(1); + xargv = argptr; + xminusc = minusc; + if (*xargv == NULL) { +@@ -169,6 +171,8 @@ setarg0: + xargv++; + } + optschanged(); ++ ++ return login; + } + + +@@ -190,12 +194,13 @@ optschanged(void) + * to the argument list; we advance it past the options. + */ + +-STATIC void ++STATIC int + options(int cmdline) + { + char *p; + int val; + int c; ++ int login = 0; + + if (cmdline) + minusc = NULL; +@@ -223,6 +228,8 @@ options(int cmdline) + while ((c = *p++) != '\0') { + if (c == 'c' && cmdline) { + minusc = p; /* command is after shell args*/ ++ } else if (c == 'l' && cmdline) { ++ login = 1; + } else if (c == 'o') { + minus_o(*argptr, val); + if (*argptr) +@@ -232,6 +239,8 @@ options(int cmdline) + } + } + } ++ ++ return login; + } + + STATIC void +diff --git a/src/options.h b/src/options.h +index 45bbe5a..975fe33 100644 +--- a/src/options.h ++++ b/src/options.h +@@ -75,7 +75,7 @@ extern char **argptr; /* argument list for builtin commands */ + extern char *optionarg; /* set by nextopt */ + extern char *optptr; /* used by nextopt */ + +-void procargs(int, char **); ++int procargs(int, char **); + void optschanged(void); + void setparam(char **); + void freeparam(volatile struct shparam *); +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0006--EXPAND-Perform-tilde-expansion-in-all-parameter-exp.diff +++ dash-0.5.4/debian/diff/0006--EXPAND-Perform-tilde-expansion-in-all-parameter-exp.diff @@ -0,0 +1,54 @@ +From 764cd0ba8701a4f557bab0a96dbb3a5cf1308a90 Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Mon, 24 Sep 2007 16:22:25 +0800 +Subject: [PATCH] [EXPAND] Perform tilde expansion in all parameter expansion words + +Previously tilde expansion was not carried out for =?#% expansion words. +This is contrary to the POSIX specification. + +Test case: + + a=~root:~root + echo ${a#~root} + +Old result: + + /root:/root + +New result: + + :/root +--- + ChangeLog | 1 + + src/expand.c | 3 ++- + 2 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index dca08d5..816f56d 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,6 +1,7 @@ + 2007-09-24 Herbert Xu + + * Do not quote back slashes in parameter expansions outside quotes. ++ * Perform tilde expansion in all parameter expansion words. + + 2007-09-22 Oleg Verych + +diff --git a/src/expand.c b/src/expand.c +index 3956112..1443c14 100644 +--- a/src/expand.c ++++ b/src/expand.c +@@ -683,7 +683,8 @@ subevalvar(char *p, char *str, int strloc, int subtype, int startloc, int varfla + char *(*scan)(char *, char *, char *, char *, int , int); + + herefd = -1; +- argstr(p, subtype != VSASSIGN && subtype != VSQUESTION ? EXP_CASE : 0); ++ argstr(p, EXP_TILDE | (subtype != VSASSIGN && subtype != VSQUESTION ? ++ EXP_CASE : 0)); + STPUTC('\0', expdest); + herefd = saveherefd; + argbackq = saveargbackq; +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0061--MAN-Added-missing-right-parenthesis.diff +++ dash-0.5.4/debian/diff/0061--MAN-Added-missing-right-parenthesis.diff @@ -0,0 +1,52 @@ +From 9a173d2123fddb1e909dd8bf3d30812d43b0133b Mon Sep 17 00:00:00 2001 +From: Gerrit Pape +Date: Sun, 13 Jul 2008 22:38:17 +0800 +Subject: [PATCH] [MAN] Added missing right parenthesis +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: 8bit + +In section Redirection the following text misses a left brace: + + where redir-op is one of the redirection operators mentioned previously. + Following is a list of the possible redirections. The [n] is an optional + number, as in \u20183\u2019 (not \u2018[3]\u2019, that refers to a file descriptor. + +Reported by Jörg Sommer through + http://bugs.debian.org/481365 + +Signed-off-by: Gerrit Pape +Signed-off-by: Herbert Xu +--- + ChangeLog | 4 ++++ + src/dash.1 | 2 +- + 2 files changed, 5 insertions(+), 1 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 89f5c13..261b445 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++2008-06-13 Gerrit Pape ++ ++ * Added missing right parenthesis in manual page. ++ + 2008-06-13 Herbert Xu + + * Fixed 3,4-argument cases for test per POSIX. +diff --git a/src/dash.1 b/src/dash.1 +index c8cb3ce..a8d6e6e 100644 +--- a/src/dash.1 ++++ b/src/dash.1 +@@ -391,7 +391,7 @@ The + is an optional number, as in + .Sq 3 + (not +-.Sq Bq 3 , ++.Sq Bq 3 ) , + that refers to a file descriptor. + .Bl -tag -width aaabsfiles -offset indent + .It [n] Ns \*[Gt] file +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0011--EXPAND-Do-not-expand-tilde-in-parameter-expansion-w.diff +++ dash-0.5.4/debian/diff/0011--EXPAND-Do-not-expand-tilde-in-parameter-expansion-w.diff @@ -0,0 +1,94 @@ +From a39e7997d2f7f71a32bc05df29c0b73c34add3f0 Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Tue, 25 Sep 2007 10:54:13 +0800 +Subject: [PATCH] [EXPAND] Do not expand tilde in parameter expansion within quotes + +Previously code was added so that tilde expansion was carried out +parameter expansions within double quotes. This change was made +with reference the behaviour of bash at the time. Bash has since +be fixed so that this behaviour no longer occurs which is in line +with most other POSIX shells. + +So this patch removes that behaviour in dash as well. + +Test case: + + unset a + echo "${a:-~root}" + +Old result: + + /root + +New result: + + ~root +--- + ChangeLog | 4 ++++ + src/expand.c | 10 +++------- + src/expand.h | 2 +- + 3 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 7992485..dacc9b3 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++2007-09-25 Herbert Xu ++ ++ * Do not expand tilde in parameter expansion within quotes. ++ + 2007-09-24 Herbert Xu + + * Do not quote back slashes in parameter expansions outside quotes. +diff --git a/src/expand.c b/src/expand.c +index 1443c14..c9f09ff 100644 +--- a/src/expand.c ++++ b/src/expand.c +@@ -278,7 +278,7 @@ argstr(char *p, int flag) + const char *reject = spclchars; + int c; + int quotes = flag & QUOTES_ESC; +- int breakall = flag & EXP_WORD; ++ int breakall = (flag & (EXP_WORD | EXP_QUOTED)) == EXP_WORD; + int inquotes; + size_t length; + int startloc; +@@ -296,8 +296,6 @@ argstr(char *p, int flag) + flag &= ~EXP_TILDE; + tilde: + q = p; +- if (*q == (char)CTLESC && (flag & EXP_QWORD)) +- q++; + if (*q == '~') + p = exptilde(p, q, flag); + } +@@ -780,10 +778,8 @@ again: + if (subtype == VSMINUS) { + vsplus: + if (varlen < 0) { +- argstr( +- p, flag | EXP_TILDE | +- (quoted ? EXP_QWORD : EXP_WORD) +- ); ++ argstr(p, flag | EXP_TILDE | EXP_WORD | ++ (quoted ? EXP_QUOTED : 0)); + goto end; + } + if (easy) +diff --git a/src/expand.h b/src/expand.h +index 6b7d607..be7ec6f 100644 +--- a/src/expand.h ++++ b/src/expand.h +@@ -56,7 +56,7 @@ struct arglist { + #define EXP_RECORD 0x20 /* need to record arguments for ifs breakup */ + #define EXP_VARTILDE2 0x40 /* expand tildes after colons only */ + #define EXP_WORD 0x80 /* expand word in parameter expansion */ +-#define EXP_QWORD 0x100 /* expand word in quoted parameter expansion */ ++#define EXP_QUOTED 0x100 /* expand word in double quotes */ + + + union node; +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0028--EXPAND-Add-likely-flags-in-expari.diff +++ dash-0.5.4/debian/diff/0028--EXPAND-Add-likely-flags-in-expari.diff @@ -0,0 +1,48 @@ +From 5b5ddaafa8fcb5ba615ec2262cf6890ccaaf9abc Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Thu, 11 Oct 2007 22:42:04 +0800 +Subject: [PATCH] [EXPAND] Add likely flags in expari + +The case where the expansion isn't quoted is the norm. +--- + ChangeLog | 1 + + src/expand.c | 4 ++-- + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 1f26b83..98c546e 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -2,6 +2,7 @@ + + * Add assignment support in arithmetic expansions. + * Size optimisations in arithmetic lexer. ++ * Add likely flags in expari. + + 2007-10-08 Herbert Xu + +diff --git a/src/expand.c b/src/expand.c +index 9cb8eab..5c31400 100644 +--- a/src/expand.c ++++ b/src/expand.c +@@ -523,7 +523,7 @@ expari(int flag) + + expdest = p; + +- if (flag & QUOTES_ESC) ++ if (likely(flag & QUOTES_ESC)) + rmescapes(p + 1); + + result = arith(p + 1); +@@ -531,7 +531,7 @@ expari(int flag) + + len = cvtnum(result); + +- if (!(flag & EXP_QUOTED)) ++ if (likely(!(flag & EXP_QUOTED))) + recordregion(begoff, begoff + len, 0); + } + +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0025--PARSER-Report-substition-errors-at-expansion-time.diff +++ dash-0.5.4/debian/diff/0025--PARSER-Report-substition-errors-at-expansion-time.diff @@ -0,0 +1,179 @@ +From 049b09d6ab8515d3f5edbec93b927fda26c922c2 Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Mon, 8 Oct 2007 21:32:25 +0800 +Subject: [PATCH] [PARSER] Report substition errors at expansion time + +On Wed, Apr 11, 2007 at 01:24:21PM -0700, Micah Cowan wrote: +> Package: dash +> Version: 0.5.3-3 +> +> Bug first reported against Ubuntu at +> https://bugs.launchpad.net/ubuntu/+source/dash/+bug/105634 +> by Paul Smith +> +> The description and some comments from that bug report follow. +> +> ----- +> +> This operation fails on Ubuntu: +> +> $ /bin/sh -c 'if false; then d="${foo/bar}"; fi' +> /bin/sh: Syntax error: Bad substitution +> +> When used with other POSIX shells it succeeds. While semantically the +> variable reference ${foo/bar} is not valid, this is not a syntax error +> according to POSIX, and since the variable assignment expression is +> never invoked (because it's within an "if false") it should not be seen +> as an error. +> +> I ran into this because after restarting my system I could no longer log +> in. It turns out that the problem was (a) I had edited .gnomerc to +> source my .bashrc file so that my environment would be set properly, and +> (b) I had added some new code to my .bashrc WITHIN A CHECK FOR BASH! +> that used bash's ${var/match/sub} feature. Even though this code was +> within a "case $BASH_VERSION; in *[0-9]*) ... esac (so dash would never +> execute it since that variable is not set), it still caused dash to +> throw up. +> +> ----- +> +> FYI, some relevant details from POSIX: +> +> Section 2.3, Token Recognition: +> +> 5. If the current character is an unquoted '$' or '`', the shell shall +> identify the start of any candidates for parameter expansion ( Parameter +> Expansion), command substitution ( Command Substitution), or arithmetic +> expansion ( Arithmetic Expansion) from their introductory unquoted +> character sequences: '$' or "${", "$(" or '`', and "$((", respectively. +> The shell shall read sufficient input to determine the end of the unit +> to be expanded (as explained in the cited sections). +> +> Section 2.6.2, Parameter Expansion: +> +> The format for parameter expansion is as follows: +> +> ${expression} +> +> where expression consists of all characters until the matching '}'. Any +> '}' escaped by a backslash or within a quoted string, and characters in +> embedded arithmetic expansions, command substitutions, and variable +> expansions, shall not be examined in determining the matching '}'. +> +> [...] +> +> The parameter name or symbol can be enclosed in braces, which are +> optional except for positional parameters with more than one digit or +> when parameter is followed by a character that could be interpreted as +> part of the name. The matching closing brace shall be determined by +> counting brace levels, skipping over enclosed quoted strings, and +> command substitutions. +> +> --- +> +> In addition to bash I've checked Solaris /bin/sh and ksh and they don't +> report an error. +> +> ----- +> Micah Cowan: +> +> The applicable portion of POSIX is in XCU 2.10.1: +> +> "The WORD tokens shall have the word expansion rules applied to them +> immediately before the associated command is executed, not at the time +> the command is parsed." +> +> This seems fairly clear to me. + +This patch moves the error detection to expansion time. + +Test case: + + if false; then + echo ${a!7} + fi + echo OK + +Old result: + + dash: Syntax error: Bad substitution + +New result: + + OK +--- + ChangeLog | 4 ++++ + src/expand.c | 4 ++++ + src/parser.c | 7 ++++--- + 3 files changed, 12 insertions(+), 3 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 1db14ac..69ba464 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++2007-10-08 Herbert Xu ++ ++ * Report substition errors at expansion time. ++ + 2007-10-06 Herbert Xu + + * Add pushstackmark. +diff --git a/src/expand.c b/src/expand.c +index e3e5d8f..54fe908 100644 +--- a/src/expand.c ++++ b/src/expand.c +@@ -749,6 +749,10 @@ evalvar(char *p, int flag) + + varflags = *p++; + subtype = varflags & VSTYPE; ++ ++ if (!subtype) ++ sh_error("Bad substitution"); ++ + quoted = flag & EXP_QUOTED; + var = p; + easy = (!quoted || (*var == '@' && shellparam.nparam)); +diff --git a/src/parser.c b/src/parser.c +index d0e0553..4b8a5fe 100644 +--- a/src/parser.c ++++ b/src/parser.c +@@ -1204,9 +1204,8 @@ varname: + USTPUTC(cc, out); + } + else +-badsub: synerror("Bad substitution"); ++ goto badsub; + +- STPUTC('=', out); + if (subtype == 0) { + switch (c) { + case ':': +@@ -1216,7 +1215,7 @@ badsub: synerror("Bad substitution"); + default: + p = strchr(types, c); + if (p == NULL) +- goto badsub; ++ break; + subtype |= p - types + VSNORMAL; + break; + case '%': +@@ -1234,6 +1233,7 @@ badsub: synerror("Bad substitution"); + } + } + } else { ++badsub: + pungetc(); + } + *((char *)stackblock() + typeloc) = subtype; +@@ -1242,6 +1242,7 @@ badsub: synerror("Bad substitution"); + if (dblquote) + dqvarnest++; + } ++ STPUTC('=', out); + } + goto parsesub_return; + } +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0020--MEMALLOC-Made-grabstackblock-an-inline-wrapper-for.diff +++ dash-0.5.4/debian/diff/0020--MEMALLOC-Made-grabstackblock-an-inline-wrapper-for.diff @@ -0,0 +1,70 @@ +From b2ce42cabeefe63177c8b461258ad480ea1c7894 Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Fri, 5 Oct 2007 23:26:45 +0800 +Subject: [PATCH] [MEMALLOC] Made grabstackblock an inline wrapper for stalloc + +The function grabstackblock is identical in semantics to stalloc within its +input constraints. +--- + ChangeLog | 4 ++++ + src/memalloc.c | 8 -------- + src/memalloc.h | 6 +++++- + 3 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 940e4b0..383332c 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++2007-10-05 Herbert Xu ++ ++ * Made grabstackblock an inline wrapper for stalloc. ++ + 2007-10-04 Herbert Xu + + * Fix parsing of ${##1}. +diff --git a/src/memalloc.c b/src/memalloc.c +index 358e6ec..c8147d3 100644 +--- a/src/memalloc.c ++++ b/src/memalloc.c +@@ -254,14 +254,6 @@ growstackblock(void) + } + } + +-void +-grabstackblock(size_t len) +-{ +- len = SHELL_ALIGN(len); +- stacknxt += len; +- stacknleft -= len; +-} +- + /* + * The following routines are somewhat easier to use than the above. + * The user declares a variable of type STACKSTR, which may be declared +diff --git a/src/memalloc.h b/src/memalloc.h +index 8a41e64..282dbb0 100644 +--- a/src/memalloc.h ++++ b/src/memalloc.h +@@ -57,13 +57,17 @@ void stunalloc(pointer); + void setstackmark(struct stackmark *); + void popstackmark(struct stackmark *); + void growstackblock(void); +-void grabstackblock(size_t); + void *growstackstr(void); + char *makestrspace(size_t, char *); + char *stnputs(const char *, size_t, char *); + char *stputs(const char *, char *); + + ++static inline void grabstackblock(size_t len) ++{ ++ stalloc(len); ++} ++ + static inline char *_STPUTC(int c, char *p) { + if (p == sstrend) + p = growstackstr(); +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0038--EVAL-Fix-bad-pointer-arithmetic-in-evalcommand.diff +++ dash-0.5.4/debian/diff/0038--EVAL-Fix-bad-pointer-arithmetic-in-evalcommand.diff @@ -0,0 +1,52 @@ +From 44866c4dba093733d5b199bdd3e092b5ffb66f84 Mon Sep 17 00:00:00 2001 +From: Steve Langasek +Date: Sun, 23 Dec 2007 11:02:26 +0800 +Subject: [PATCH] [EVAL] Fix bad pointer arithmetic in evalcommand + +dash dies on sparc with a SIGBUS due to an arithmetic error introduced +with commit 03b4958, this patch fixes it. +--- + +> Hi Gerrit, +> +> dash 0.5.4-3 dies on sparc with a SIGBUS due to an arithmetic error +> introduced with the patch +> 0030-EXEC-Fixed-execing-of-scripts-with-no-hash-bang.diff. The +> attached +> patch fixes the problem. + +Signed-off-by: Herbert Xu +--- + ChangeLog | 4 ++++ + src/eval.c | 3 ++- + 2 files changed, 6 insertions(+), 1 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index de37261..e72849c 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++2007-12-23 Steve Langasek ++ ++ * Fixed bad pointer arithmetic in evalcommand. ++ + 2007-11-11 Herbert Xu + + * Removed noexpand/length check on eofmark. +diff --git a/src/eval.c b/src/eval.c +index a8feaa0..77291b4 100644 +--- a/src/eval.c ++++ b/src/eval.c +@@ -722,7 +722,8 @@ evalcommand(union node *cmd, int flags) + } + + /* Reserve one extra spot at the front for shellexec. */ +- argv = nargv = stalloc(sizeof (char *) * (argc + 2)) + 1; ++ nargv = stalloc(sizeof (char *) * (argc + 2)); ++ argv = ++nargv; + for (sp = arglist.list ; sp ; sp = sp->next) { + TRACE(("evalcommand arg: %s\n", sp->text)); + *nargv++ = sp->text; +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0022--BUILTIN-Treat-OPTIND-0-in-the-same-way-as-OPTIND-1.diff +++ dash-0.5.4/debian/diff/0022--BUILTIN-Treat-OPTIND-0-in-the-same-way-as-OPTIND-1.diff @@ -0,0 +1,52 @@ +From 26876e11f862333596a3e1771b03ef2a3ea83523 Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Sat, 6 Oct 2007 18:59:31 +0800 +Subject: [PATCH] [BUILTIN] Treat OPTIND=0 in the same way as OPTIND=1 + +Previously setting OPTIND to 0 would cause subsequent getopts calls to fail. +This patch makes dash reset the getopts parameters the same way as OPTIND=1. + +Both behaviours are allowed by POSIX but other common shells do tolerate this +case. +--- + ChangeLog | 1 + + src/options.c | 4 +--- + 2 files changed, 2 insertions(+), 3 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index d3c7320..11cdb67 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,6 +1,7 @@ + 2007-10-06 Herbert Xu + + * Add pushstackmark. ++ * Treat OPTIND=0 in the same way as OPTIND=1. + + 2007-10-05 Herbert Xu + +diff --git a/src/options.c b/src/options.c +index 85f1406..045345a 100644 +--- a/src/options.c ++++ b/src/options.c +@@ -377,7 +377,7 @@ void + getoptsreset(value) + const char *value; + { +- shellparam.optind = number(value); ++ shellparam.optind = number(value) ?: 1; + shellparam.optoff = -1; + } + +@@ -424,8 +424,6 @@ getopts(char *optstr, char *optvar, char **optfirst, int *optind, int *optoff) + char s[12]; + char **optnext; + +- if (*optind < 1) +- return 1; + optnext = optfirst + *optind - 1; + + if (*optind <= 1 || *optoff < 0 || strlen(optnext[-1]) < *optoff) +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0023--VAR-Remove-setvarsafe.diff +++ dash-0.5.4/debian/diff/0023--VAR-Remove-setvarsafe.diff @@ -0,0 +1,194 @@ +From 8386655170128eee31f9a4234bdb1676cd99102d Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Sat, 6 Oct 2007 21:18:58 +0800 +Subject: [PATCH] [VAR] Remove setvarsafe + +The only user of setvarsafe is getopts. However, we can achieve the same +result by pre-setting the value of shellparam.optind. +--- + ChangeLog | 1 + + src/options.c | 48 +++++++++++++++++++++++------------------------- + src/var.c | 25 ------------------------- + src/var.h | 1 - + 4 files changed, 24 insertions(+), 51 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 11cdb67..ea54d84 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -2,6 +2,7 @@ + + * Add pushstackmark. + * Treat OPTIND=0 in the same way as OPTIND=1. ++ * Remove setvarsafe. + + 2007-10-05 Herbert Xu + +diff --git a/src/options.c b/src/options.c +index 045345a..568148a 100644 +--- a/src/options.c ++++ b/src/options.c +@@ -109,7 +109,7 @@ char optlist[NOPTS]; + STATIC void options(int); + STATIC void minus_o(char *, int); + STATIC void setoption(int, int); +-STATIC int getopts(char *, char *, char **, int *, int *); ++STATIC int getopts(char *, char *, char **); + + + /* +@@ -397,39 +397,40 @@ getoptscmd(int argc, char **argv) + sh_error("Usage: getopts optstring var [arg]"); + else if (argc == 3) { + optbase = shellparam.p; +- if (shellparam.optind > shellparam.nparam + 1) { ++ if ((unsigned)shellparam.optind > shellparam.nparam + 1) { + shellparam.optind = 1; + shellparam.optoff = -1; + } + } + else { + optbase = &argv[3]; +- if (shellparam.optind > argc - 2) { ++ if ((unsigned)shellparam.optind > argc - 2) { + shellparam.optind = 1; + shellparam.optoff = -1; + } + } + +- return getopts(argv[1], argv[2], optbase, &shellparam.optind, +- &shellparam.optoff); ++ return getopts(argv[1], argv[2], optbase); + } + + STATIC int +-getopts(char *optstr, char *optvar, char **optfirst, int *optind, int *optoff) ++getopts(char *optstr, char *optvar, char **optfirst) + { + char *p, *q; + char c = '?'; + int done = 0; +- int err = 0; + char s[12]; + char **optnext; ++ int ind = shellparam.optind; ++ int off = shellparam.optoff; + +- optnext = optfirst + *optind - 1; ++ shellparam.optind = -1; ++ optnext = optfirst + ind - 1; + +- if (*optind <= 1 || *optoff < 0 || strlen(optnext[-1]) < *optoff) ++ if (ind <= 1 || off < 0 || strlen(optnext[-1]) < off) + p = NULL; + else +- p = optnext[-1] + *optoff; ++ p = optnext[-1] + off; + if (p == NULL || *p == '\0') { + /* Current word is done, advance */ + p = *optnext; +@@ -450,7 +451,7 @@ atend: + if (optstr[0] == ':') { + s[0] = c; + s[1] = '\0'; +- err |= setvarsafe("OPTARG", s, 0); ++ setvar("OPTARG", s, 0); + } else { + outfmt(&errout, "Illegal option -%c\n", c); + (void) unsetvar("OPTARG"); +@@ -467,7 +468,7 @@ atend: + if (optstr[0] == ':') { + s[0] = c; + s[1] = '\0'; +- err |= setvarsafe("OPTARG", s, 0); ++ setvar("OPTARG", s, 0); + c = ':'; + } else { + outfmt(&errout, "No arg for -%c option\n", c); +@@ -479,25 +480,22 @@ atend: + + if (p == *optnext) + optnext++; +- err |= setvarsafe("OPTARG", p, 0); ++ setvar("OPTARG", p, 0); + p = NULL; + } else +- err |= setvarsafe("OPTARG", nullstr, 0); ++ setvar("OPTARG", nullstr, 0); + + out: +- *optoff = p ? p - *(optnext - 1) : -1; +- *optind = optnext - optfirst + 1; +- fmtstr(s, sizeof(s), "%d", *optind); +- err |= setvarsafe("OPTIND", s, VNOFUNC); ++ ind = optnext - optfirst + 1; ++ fmtstr(s, sizeof(s), "%d", ind); ++ setvar("OPTIND", s, VNOFUNC); + s[0] = c; + s[1] = '\0'; +- err |= setvarsafe(optvar, s, 0); +- if (err) { +- *optind = 1; +- *optoff = -1; +- flushall(); +- exraise(EXERROR); +- } ++ setvar(optvar, s, 0); ++ ++ shellparam.optoff = p ? p - *(optnext - 1) : -1; ++ shellparam.optind = ind; ++ + return done; + } + +diff --git a/src/var.c b/src/var.c +index 3263dc5..501a279 100644 +--- a/src/var.c ++++ b/src/var.c +@@ -168,31 +168,6 @@ initvar(void) + } + + /* +- * Safe version of setvar, returns 1 on success 0 on failure. +- */ +- +-int +-setvarsafe(const char *name, const char *val, int flags) +-{ +- int err; +- volatile int saveint; +- struct jmploc *volatile savehandler = handler; +- struct jmploc jmploc; +- +- SAVEINT(saveint); +- if (setjmp(jmploc.loc)) +- err = 1; +- else { +- handler = &jmploc; +- setvar(name, val, flags); +- err = 0; +- } +- handler = savehandler; +- RESTOREINT(saveint); +- return err; +-} +- +-/* + * Set the value of a variable. The flags argument is ored with the + * flags of the variable. If val is NULL, the variable is unset. + */ +diff --git a/src/var.h b/src/var.h +index c3c2ca7..ae58c6c 100644 +--- a/src/var.h ++++ b/src/var.h +@@ -138,7 +138,6 @@ int localcmd(int, char **); + void poplocalvars(void); + int unsetcmd(int, char **); + int unsetvar(const char *); +-int setvarsafe(const char *, const char *, int); + int varcmp(const char *, const char *); + + static inline int varequal(const char *a, const char *b) { +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0057--BUILTIN-Made-t_lex-reentrant.diff +++ dash-0.5.4/debian/diff/0057--BUILTIN-Made-t_lex-reentrant.diff @@ -0,0 +1,163 @@ +From 602e2fdacb1beaa2751795e21b9c1333624ca653 Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Sun, 13 Jul 2008 22:07:08 +0800 +Subject: [PATCH] [BUILTIN] Made t_lex reentrant + +The previous two changes were broken because t_lex uses global state. +This patch removes that by making t_wp local to t_lex. + +Signed-off-by: Herbert Xu +--- + ChangeLog | 1 + + src/bltin/test.c | 41 ++++++++++++++++++++--------------------- + 2 files changed, 21 insertions(+), 21 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index ef45102..5565e06 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -2,6 +2,7 @@ + + * Fixed 3,4-argument cases for test per POSIX. + * Made aexpr/oexpr non-recursive. ++ * Made t_lex reentrant. + + 2008-05-19 Herbert Xu + +diff --git a/src/bltin/test.c b/src/bltin/test.c +index 32a12fe..8e7077a 100644 +--- a/src/bltin/test.c ++++ b/src/bltin/test.c +@@ -142,8 +142,8 @@ static int nexpr(enum token); + static int primary(enum token); + static int binop(void); + static int filstat(char *, enum token); +-static enum token t_lex(char *); +-static int isoperand(void); ++static enum token t_lex(char **); ++static int isoperand(char **); + static int newerf(const char *, const char *); + static int olderf(const char *, const char *); + static int equalf(const char *, const char *); +@@ -207,7 +207,7 @@ testcmd(int argc, char **argv) + } + } + +- n = t_lex(*argv); ++ n = t_lex(argv); + + eval: + t_wp = argv; +@@ -236,10 +236,10 @@ oexpr(enum token n) + + for (;;) { + res |= aexpr(n); +- n = t_lex(t_wp[1]); ++ n = t_lex(t_wp + 1); + if (n != BOR) + break; +- n = t_lex(*(t_wp += 2)); ++ n = t_lex(t_wp += 2); + } + return res; + } +@@ -252,10 +252,10 @@ aexpr(enum token n) + for (;;) { + if (!nexpr(n)) + res = 0; +- n = t_lex(t_wp[1]); ++ n = t_lex(t_wp + 1); + if (n != BAND) + break; +- n = t_lex(*(t_wp += 2)); ++ n = t_lex(t_wp += 2); + } + return res; + } +@@ -264,7 +264,7 @@ static int + nexpr(enum token n) + { + if (n == UNOT) +- return !nexpr(t_lex(*++t_wp)); ++ return !nexpr(t_lex(++t_wp)); + return primary(n); + } + +@@ -277,10 +277,10 @@ primary(enum token n) + if (n == EOI) + return 0; /* missing expression */ + if (n == LPAREN) { +- if ((nn = t_lex(*++t_wp)) == RPAREN) ++ if ((nn = t_lex(++t_wp)) == RPAREN) + return 0; /* missing expression */ + res = oexpr(nn); +- if (t_lex(*++t_wp) != RPAREN) ++ if (t_lex(++t_wp) != RPAREN) + syntax(NULL, "closing paren expected"); + return res; + } +@@ -300,7 +300,7 @@ primary(enum token n) + } + } + +- if (t_lex(t_wp[1]), t_wp_op && t_wp_op->op_type == BINOP) { ++ if (t_lex(t_wp + 1), t_wp_op && t_wp_op->op_type == BINOP) { + return binop(); + } + +@@ -314,7 +314,7 @@ binop(void) + struct t_op const *op; + + opnd1 = *t_wp; +- (void) t_lex(*++t_wp); ++ (void) t_lex(++t_wp); + op = t_wp_op; + + if ((opnd2 = *++t_wp) == (char *)0) +@@ -403,10 +403,10 @@ filstat(char *nm, enum token mode) + } + } + +-static enum token +-t_lex(char *s) ++static enum token t_lex(char **tp) + { + struct t_op const *op; ++ char *s = *tp; + + if (s == 0) { + t_wp_op = (struct t_op *)0; +@@ -414,8 +414,8 @@ t_lex(char *s) + } + + op = getop(s); +- if (op && !(op->op_type == UNOP && isoperand()) && +- !(op->op_num == LPAREN && *(t_wp+1) == 0)) { ++ if (op && !(op->op_type == UNOP && isoperand(tp)) && ++ !(op->op_num == LPAREN && !tp[1])) { + t_wp_op = op; + return op->op_num; + } +@@ -424,15 +424,14 @@ t_lex(char *s) + return OPERAND; + } + +-static int +-isoperand(void) ++static int isoperand(char **tp) + { + struct t_op const *op; +- char *s, *t; ++ char *s; + +- if ((s = *(t_wp+1)) == 0) ++ if (!(s = tp[1])) + return 1; +- if ((t = *(t_wp+2)) == 0) ++ if (!tp[2]) + return 0; + + op = getop(s); +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0029--BUILTIN-Use-setvarint-to-set-OPTIND.diff +++ dash-0.5.4/debian/diff/0029--BUILTIN-Use-setvarint-to-set-OPTIND.diff @@ -0,0 +1,99 @@ +From 992add9857d3498e128f31c23a26f5504684e621 Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Thu, 11 Oct 2007 22:44:40 +0800 +Subject: [PATCH] [BUILTIN] Use setvarint to set OPTIND + +This patch adds a flag argument to setvarint and uses it to set the OPTIND +variable. +--- + ChangeLog | 1 + + src/arith_yacc.c | 2 +- + src/options.c | 5 ++--- + src/var.c | 4 ++-- + src/var.h | 2 +- + 5 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 98c546e..00c09c3 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -3,6 +3,7 @@ + * Add assignment support in arithmetic expansions. + * Size optimisations in arithmetic lexer. + * Add likely flags in expari. ++ * Use setvarint to set OPTIND. + + 2007-10-08 Herbert Xu + +diff --git a/src/arith_yacc.c b/src/arith_yacc.c +index ad653ed..e473594 100644 +--- a/src/arith_yacc.c ++++ b/src/arith_yacc.c +@@ -280,7 +280,7 @@ static intmax_t assignment(int var, int noeval) + + return setvarint(val.name, + op == ARITH_ASS ? result : +- do_binop(op - 11, lookupvarint(val.name), result)); ++ do_binop(op - 11, lookupvarint(val.name), result), 0); + } + + intmax_t arith(const char *s) +diff --git a/src/options.c b/src/options.c +index 568148a..f669117 100644 +--- a/src/options.c ++++ b/src/options.c +@@ -419,7 +419,7 @@ getopts(char *optstr, char *optvar, char **optfirst) + char *p, *q; + char c = '?'; + int done = 0; +- char s[12]; ++ char s[2]; + char **optnext; + int ind = shellparam.optind; + int off = shellparam.optoff; +@@ -487,8 +487,7 @@ atend: + + out: + ind = optnext - optfirst + 1; +- fmtstr(s, sizeof(s), "%d", ind); +- setvar("OPTIND", s, VNOFUNC); ++ setvarint("OPTIND", ind, VNOFUNC); + s[0] = c; + s[1] = '\0'; + setvar(optvar, s, 0); +diff --git a/src/var.c b/src/var.c +index 17d3637..7f9af9c 100644 +--- a/src/var.c ++++ b/src/var.c +@@ -207,13 +207,13 @@ setvar(const char *name, const char *val, int flags) + * ored with the flags of the variable. + */ + +-intmax_t setvarint(const char *name, intmax_t val) ++intmax_t setvarint(const char *name, intmax_t val, int flags) + { + int len = max_int_length(sizeof(val)); + char buf[len]; + + fmtstr(buf, len, "%jd", val); +- setvar(name, buf, 0); ++ setvar(name, buf, flags); + return val; + } + +diff --git a/src/var.h b/src/var.h +index 66443df..e4e2cff 100644 +--- a/src/var.h ++++ b/src/var.h +@@ -127,7 +127,7 @@ extern const char defpathvar[]; + + void initvar(void); + void setvar(const char *, const char *, int); +-intmax_t setvarint(const char *, intmax_t); ++intmax_t setvarint(const char *, intmax_t, int); + void setvareq(char *, int); + struct strlist; + void listsetvar(struct strlist *, int); +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0062-run-aclocal-autoconf-autoheader-automake.diff +++ dash-0.5.4/debian/diff/0062-run-aclocal-autoconf-autoheader-automake.diff @@ -0,0 +1,7107 @@ +From 9498e79fc69fcf37cd94aedf6cffb44fb6c24e60 Mon Sep 17 00:00:00 2001 +From: Gerrit Pape +Date: Wed, 16 Jul 2008 19:16:11 +0000 +Subject: [PATCH] run aclocal && autoconf && autoheader && automake + +--- + Makefile.in | 12 +- + aclocal.m4 | 4 +- + config.h.in | 9 + + configure | 4795 +++++++++++++++++++++++++++++++------------------------ + src/Makefile.in | 67 +- + 5 files changed, 2786 insertions(+), 2101 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index 943db1b..0dfbf29 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.9.5 from Makefile.am. ++# Makefile.in generated by automake 1.9.6 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -91,6 +91,7 @@ ECHO_N = @ECHO_N@ + ECHO_T = @ECHO_T@ + EGREP = @EGREP@ + EXEEXT = @EXEEXT@ ++GREP = @GREP@ + INSTALL_DATA = @INSTALL_DATA@ + INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ +@@ -113,8 +114,8 @@ SHELL = @SHELL@ + STRIP = @STRIP@ + VERSION = @VERSION@ + YACC = @YACC@ ++YFLAGS = @YFLAGS@ + ac_ct_CC = @ac_ct_CC@ +-ac_ct_STRIP = @ac_ct_STRIP@ + am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ + am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ + am__include = @am__include@ +@@ -125,19 +126,26 @@ am__untar = @am__untar@ + bindir = @bindir@ + build_alias = @build_alias@ + datadir = @datadir@ ++datarootdir = @datarootdir@ ++docdir = @docdir@ ++dvidir = @dvidir@ + exec_prefix = @exec_prefix@ + host_alias = @host_alias@ ++htmldir = @htmldir@ + includedir = @includedir@ + infodir = @infodir@ + install_sh = @install_sh@ + libdir = @libdir@ + libexecdir = @libexecdir@ ++localedir = @localedir@ + localstatedir = @localstatedir@ + mandir = @mandir@ + mkdir_p = @mkdir_p@ + oldincludedir = @oldincludedir@ ++pdfdir = @pdfdir@ + prefix = @prefix@ + program_transform_name = @program_transform_name@ ++psdir = @psdir@ + sbindir = @sbindir@ + sharedstatedir = @sharedstatedir@ + sysconfdir = @sysconfdir@ +diff --git a/aclocal.m4 b/aclocal.m4 +index 965df90..aef181a 100644 +--- a/aclocal.m4 ++++ b/aclocal.m4 +@@ -1,4 +1,4 @@ +-# generated automatically by aclocal 1.9.5 -*- Autoconf -*- ++# generated automatically by aclocal 1.9.6 -*- Autoconf -*- + + # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, + # 2005 Free Software Foundation, Inc. +@@ -28,7 +28,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) + # Call AM_AUTOMAKE_VERSION so it can be traced. + # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. + AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +- [AM_AUTOMAKE_VERSION([1.9.5])]) ++ [AM_AUTOMAKE_VERSION([1.9.6])]) + + # AM_AUX_DIR_EXPAND -*- Autoconf -*- + +diff --git a/config.h.in b/config.h.in +index 02523bc..3d94d1d 100644 +--- a/config.h.in ++++ b/config.h.in +@@ -3,12 +3,21 @@ + /* Define to 1 if you have the `bsearch' function. */ + #undef HAVE_BSEARCH + ++/* Define to 1 if you have the `fnmatch' function. */ ++#undef HAVE_FNMATCH ++ + /* Define to 1 if you have the `getpwnam' function. */ + #undef HAVE_GETPWNAM + + /* Define to 1 if you have the `getrlimit' function. */ + #undef HAVE_GETRLIMIT + ++/* Define to 1 if you have the `glob' function. */ ++#undef HAVE_GLOB ++ ++/* Define to 1 if you have the `imaxdiv' function. */ ++#undef HAVE_IMAXDIV ++ + /* Define to 1 if you have the header file. */ + #undef HAVE_INTTYPES_H + +diff --git a/configure b/configure +index 8290284..afb13ce 100755 +--- a/configure ++++ b/configure +@@ -1,25 +1,54 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.59 for dash 0.5.4. ++# Generated by GNU Autoconf 2.61 for dash 0.5.4. + # +-# Copyright (C) 2003 Free Software Foundation, Inc. ++# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, ++# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. + # This configure script is free software; the Free Software Foundation + # gives unlimited permission to copy, distribute and modify it. + ## --------------------- ## + ## M4sh Initialization. ## + ## --------------------- ## + +-# Be Bourne compatible ++# Be more Bourne compatible ++DUALCASE=1; export DUALCASE # for MKS sh + if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then +- set -o posix ++ setopt NO_GLOB_SUBST ++else ++ case `(set -o) 2>/dev/null` in ++ *posix*) set -o posix ;; ++esac ++ ++fi ++ ++ ++ ++ ++# PATH needs CR ++# Avoid depending upon Character Ranges. ++as_cr_letters='abcdefghijklmnopqrstuvwxyz' ++as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' ++as_cr_Letters=$as_cr_letters$as_cr_LETTERS ++as_cr_digits='0123456789' ++as_cr_alnum=$as_cr_Letters$as_cr_digits ++ ++# The user is always right. ++if test "${PATH_SEPARATOR+set}" != set; then ++ echo "#! /bin/sh" >conf$$.sh ++ echo "exit 0" >>conf$$.sh ++ chmod +x conf$$.sh ++ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then ++ PATH_SEPARATOR=';' ++ else ++ PATH_SEPARATOR=: ++ fi ++ rm -f conf$$.sh + fi +-DUALCASE=1; export DUALCASE # for MKS sh + + # Support unset when possible. + if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then +@@ -29,8 +58,43 @@ else + fi + + ++# IFS ++# We need space, tab and new line, in precisely that order. Quoting is ++# there to prevent editors from complaining about space-tab. ++# (If _AS_PATH_WALK were called with IFS unset, it would disable word ++# splitting by setting IFS to empty value.) ++as_nl=' ++' ++IFS=" "" $as_nl" ++ ++# Find who we are. Look in the path if we contain no directory separator. ++case $0 in ++ *[\\/]* ) as_myself=$0 ;; ++ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break ++done ++IFS=$as_save_IFS ++ ++ ;; ++esac ++# We did not find ourselves, most probably we were run as `sh COMMAND' ++# in which case we are not to be found in the path. ++if test "x$as_myself" = x; then ++ as_myself=$0 ++fi ++if test ! -f "$as_myself"; then ++ echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 ++ { (exit 1); exit 1; } ++fi ++ + # Work around bugs in pre-3.0 UWIN ksh. +-$as_unset ENV MAIL MAILPATH ++for as_var in ENV MAIL MAILPATH ++do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var ++done + PS1='$ ' + PS2='> ' + PS4='+ ' +@@ -44,18 +108,19 @@ do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else +- $as_unset $as_var ++ ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi + done + + # Required to use basename. +-if expr a : '\(a\)' >/dev/null 2>&1; then ++if expr a : '\(a\)' >/dev/null 2>&1 && ++ test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr + else + as_expr=false + fi + +-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then ++if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename + else + as_basename=false +@@ -63,157 +128,388 @@ fi + + + # Name of the executable. +-as_me=`$as_basename "$0" || ++as_me=`$as_basename -- "$0" || + $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ +- X"$0" : 'X\(/\)$' \| \ +- . : '\(.\)' 2>/dev/null || ++ X"$0" : 'X\(/\)' \| . 2>/dev/null || + echo X/"$0" | +- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } +- /^X\/\(\/\/\)$/{ s//\1/; q; } +- /^X\/\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` ++ sed '/^.*\/\([^/][^/]*\)\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\/\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\/\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'` + ++# CDPATH. ++$as_unset CDPATH + +-# PATH needs CR, and LINENO needs CR and PATH. +-# Avoid depending upon Character Ranges. +-as_cr_letters='abcdefghijklmnopqrstuvwxyz' +-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +-as_cr_Letters=$as_cr_letters$as_cr_LETTERS +-as_cr_digits='0123456789' +-as_cr_alnum=$as_cr_Letters$as_cr_digits + +-# The user is always right. +-if test "${PATH_SEPARATOR+set}" != set; then +- echo "#! /bin/sh" >conf$$.sh +- echo "exit 0" >>conf$$.sh +- chmod +x conf$$.sh +- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then +- PATH_SEPARATOR=';' +- else +- PATH_SEPARATOR=: +- fi +- rm -f conf$$.sh ++if test "x$CONFIG_SHELL" = x; then ++ if (eval ":") 2>/dev/null; then ++ as_have_required=yes ++else ++ as_have_required=no + fi + ++ if test $as_have_required = yes && (eval ": ++(as_func_return () { ++ (exit \$1) ++} ++as_func_success () { ++ as_func_return 0 ++} ++as_func_failure () { ++ as_func_return 1 ++} ++as_func_ret_success () { ++ return 0 ++} ++as_func_ret_failure () { ++ return 1 ++} + +- as_lineno_1=$LINENO +- as_lineno_2=$LINENO +- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` +- test "x$as_lineno_1" != "x$as_lineno_2" && +- test "x$as_lineno_3" = "x$as_lineno_2" || { +- # Find who we are. Look in the path if we contain no path at all +- # relative or not. +- case $0 in +- *[\\/]* ) as_myself=$0 ;; +- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +-done ++exitcode=0 ++if as_func_success; then ++ : ++else ++ exitcode=1 ++ echo as_func_success failed. ++fi + +- ;; +- esac +- # We did not find ourselves, most probably we were run as `sh COMMAND' +- # in which case we are not to be found in the path. +- if test "x$as_myself" = x; then +- as_myself=$0 +- fi +- if test ! -f "$as_myself"; then +- { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 +- { (exit 1); exit 1; }; } +- fi +- case $CONFIG_SHELL in +- '') ++if as_func_failure; then ++ exitcode=1 ++ echo as_func_failure succeeded. ++fi ++ ++if as_func_ret_success; then ++ : ++else ++ exitcode=1 ++ echo as_func_ret_success failed. ++fi ++ ++if as_func_ret_failure; then ++ exitcode=1 ++ echo as_func_ret_failure succeeded. ++fi ++ ++if ( set x; as_func_ret_success y && test x = \"\$1\" ); then ++ : ++else ++ exitcode=1 ++ echo positional parameters were not saved. ++fi ++ ++test \$exitcode = 0) || { (exit 1); exit 1; } ++ ++( ++ as_lineno_1=\$LINENO ++ as_lineno_2=\$LINENO ++ test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && ++ test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ++") 2> /dev/null; then ++ : ++else ++ as_candidate_shells= + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for as_base in sh bash ksh sh5; do +- case $as_dir in ++ case $as_dir in + /*) +- if ("$as_dir/$as_base" -c ' ++ for as_base in sh bash ksh sh5; do ++ as_candidate_shells="$as_candidate_shells $as_dir/$as_base" ++ done;; ++ esac ++done ++IFS=$as_save_IFS ++ ++ ++ for as_shell in $as_candidate_shells $SHELL; do ++ # Try only shells that exist, to save several forks. ++ if { test -f "$as_shell" || test -f "$as_shell.exe"; } && ++ { ("$as_shell") 2> /dev/null <<\_ASEOF ++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then ++ emulate sh ++ NULLCMD=: ++ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which ++ # is contrary to our usage. Disable this feature. ++ alias -g '${1+"$@"}'='"$@"' ++ setopt NO_GLOB_SUBST ++else ++ case `(set -o) 2>/dev/null` in ++ *posix*) set -o posix ;; ++esac ++ ++fi ++ ++ ++: ++_ASEOF ++}; then ++ CONFIG_SHELL=$as_shell ++ as_have_required=yes ++ if { "$as_shell" 2> /dev/null <<\_ASEOF ++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then ++ emulate sh ++ NULLCMD=: ++ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which ++ # is contrary to our usage. Disable this feature. ++ alias -g '${1+"$@"}'='"$@"' ++ setopt NO_GLOB_SUBST ++else ++ case `(set -o) 2>/dev/null` in ++ *posix*) set -o posix ;; ++esac ++ ++fi ++ ++ ++: ++(as_func_return () { ++ (exit $1) ++} ++as_func_success () { ++ as_func_return 0 ++} ++as_func_failure () { ++ as_func_return 1 ++} ++as_func_ret_success () { ++ return 0 ++} ++as_func_ret_failure () { ++ return 1 ++} ++ ++exitcode=0 ++if as_func_success; then ++ : ++else ++ exitcode=1 ++ echo as_func_success failed. ++fi ++ ++if as_func_failure; then ++ exitcode=1 ++ echo as_func_failure succeeded. ++fi ++ ++if as_func_ret_success; then ++ : ++else ++ exitcode=1 ++ echo as_func_ret_success failed. ++fi ++ ++if as_func_ret_failure; then ++ exitcode=1 ++ echo as_func_ret_failure succeeded. ++fi ++ ++if ( set x; as_func_ret_success y && test x = "$1" ); then ++ : ++else ++ exitcode=1 ++ echo positional parameters were not saved. ++fi ++ ++test $exitcode = 0) || { (exit 1); exit 1; } ++ ++( + as_lineno_1=$LINENO + as_lineno_2=$LINENO +- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && +- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then +- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } +- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } +- CONFIG_SHELL=$as_dir/$as_base +- export CONFIG_SHELL +- exec "$CONFIG_SHELL" "$0" ${1+"$@"} +- fi;; +- esac +- done +-done +-;; +- esac ++ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } ++ ++_ASEOF ++}; then ++ break ++fi ++ ++fi ++ ++ done ++ ++ if test "x$CONFIG_SHELL" != x; then ++ for as_var in BASH_ENV ENV ++ do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var ++ done ++ export CONFIG_SHELL ++ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} ++fi ++ ++ ++ if test $as_have_required = no; then ++ echo This script requires a shell more modern than all the ++ echo shells that I found on your system. Please install a ++ echo modern shell, or manually run the script under such a ++ echo shell if you do have one. ++ { (exit 1); exit 1; } ++fi ++ ++ ++fi ++ ++fi ++ ++ ++ ++(eval "as_func_return () { ++ (exit \$1) ++} ++as_func_success () { ++ as_func_return 0 ++} ++as_func_failure () { ++ as_func_return 1 ++} ++as_func_ret_success () { ++ return 0 ++} ++as_func_ret_failure () { ++ return 1 ++} ++ ++exitcode=0 ++if as_func_success; then ++ : ++else ++ exitcode=1 ++ echo as_func_success failed. ++fi ++ ++if as_func_failure; then ++ exitcode=1 ++ echo as_func_failure succeeded. ++fi ++ ++if as_func_ret_success; then ++ : ++else ++ exitcode=1 ++ echo as_func_ret_success failed. ++fi ++ ++if as_func_ret_failure; then ++ exitcode=1 ++ echo as_func_ret_failure succeeded. ++fi ++ ++if ( set x; as_func_ret_success y && test x = \"\$1\" ); then ++ : ++else ++ exitcode=1 ++ echo positional parameters were not saved. ++fi ++ ++test \$exitcode = 0") || { ++ echo No shell found that supports shell functions. ++ echo Please tell autoconf@gnu.org about your system, ++ echo including any error possibly output before this ++ echo message ++} ++ ++ ++ ++ as_lineno_1=$LINENO ++ as_lineno_2=$LINENO ++ test "x$as_lineno_1" != "x$as_lineno_2" && ++ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a +- # line-number line before each line; the second 'sed' does the real +- # work. The second script uses 'N' to pair each line-number line +- # with the numbered line, and appends trailing '-' during +- # substitution so that $LINENO is not a special case at line end. ++ # line-number line after each line using $LINENO; the second 'sed' ++ # does the real work. The second script uses 'N' to pair each ++ # line-number line with the line containing $LINENO, and appends ++ # trailing '-' during substitution so that $LINENO is not a special ++ # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the +- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) +- sed '=' <$as_myself | ++ # scripts with optimization help from Paolo Bonzini. Blame Lee ++ # E. McMahon (1931-1989) for sed's syntax. :-) ++ sed -n ' ++ p ++ /[$]LINENO/= ++ ' <$as_myself | + sed ' ++ s/[$]LINENO.*/&-/ ++ t lineno ++ b ++ :lineno + N +- s,$,-, +- : loop +- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, ++ :loop ++ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop +- s,-$,, +- s,^['$as_cr_digits']*\n,, ++ s/-\n.*// + ' >$as_me.lineno && +- chmod +x $as_me.lineno || ++ chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the +- # original and so on. Autoconf is especially sensible to this). +- . ./$as_me.lineno ++ # original and so on. Autoconf is especially sensitive to this). ++ . "./$as_me.lineno" + # Exit status is that of the last command. + exit + } + + +-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in +- *c*,-n*) ECHO_N= ECHO_C=' +-' ECHO_T=' ' ;; +- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; +- *) ECHO_N= ECHO_C='\c' ECHO_T= ;; ++if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then ++ as_dirname=dirname ++else ++ as_dirname=false ++fi ++ ++ECHO_C= ECHO_N= ECHO_T= ++case `echo -n x` in ++-n*) ++ case `echo 'x\c'` in ++ *c*) ECHO_T=' ';; # ECHO_T is single tab character. ++ *) ECHO_C='\c';; ++ esac;; ++*) ++ ECHO_N='-n';; + esac + +-if expr a : '\(a\)' >/dev/null 2>&1; then ++if expr a : '\(a\)' >/dev/null 2>&1 && ++ test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr + else + as_expr=false + fi + + rm -f conf$$ conf$$.exe conf$$.file ++if test -d conf$$.dir; then ++ rm -f conf$$.dir/conf$$.file ++else ++ rm -f conf$$.dir ++ mkdir conf$$.dir ++fi + echo >conf$$.file + if ln -s conf$$.file conf$$ 2>/dev/null; then +- # We could just check for DJGPP; but this test a) works b) is more generic +- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). +- if test -f conf$$.exe; then +- # Don't use ln at all; we don't have any links ++ as_ln_s='ln -s' ++ # ... but there are two gotchas: ++ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. ++ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. ++ # In both cases, we have to default to `cp -p'. ++ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' +- else +- as_ln_s='ln -s' +- fi + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +-rm -f conf$$ conf$$.exe conf$$.file ++rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file ++rmdir conf$$.dir 2>/dev/null + + if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +@@ -222,7 +518,28 @@ else + as_mkdir_p=false + fi + +-as_executable_p="test -f" ++if test -x / >/dev/null 2>&1; then ++ as_test_x='test -x' ++else ++ if ls -dL / >/dev/null 2>&1; then ++ as_ls_L_option=L ++ else ++ as_ls_L_option= ++ fi ++ as_test_x=' ++ eval sh -c '\'' ++ if test -d "$1"; then ++ test -d "$1/."; ++ else ++ case $1 in ++ -*)set "./$1";; ++ esac; ++ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ++ ???[sx]*):;;*)false;;esac;fi ++ '\'' sh ++ ' ++fi ++as_executable_p=$as_test_x + + # Sed expression to map a string onto a valid CPP name. + as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" +@@ -231,39 +548,27 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +-# IFS +-# We need space, tab and new line, in precisely that order. +-as_nl=' +-' +-IFS=" $as_nl" +- +-# CDPATH. +-$as_unset CDPATH + ++exec 7<&0 &1 + + # Name of the host. + # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, + # so uname gets run too. + ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +-exec 6>&1 +- + # + # Initializations. + # + ac_default_prefix=/usr/local ++ac_clean_files= + ac_config_libobj_dir=. ++LIBOBJS= + cross_compiling=no + subdirs= + MFLAGS= + MAKEFLAGS= + SHELL=${CONFIG_SHELL-/bin/sh} + +-# Maximum number of lines to put in a shell here document. +-# This variable seems obsolete. It should probably be removed, and +-# only ac_max_sed_lines should be used. +-: ${ac_max_here_lines=38} +- + # Identity of this package. + PACKAGE_NAME='dash' + PACKAGE_TARNAME='dash' +@@ -275,42 +580,134 @@ ac_unique_file="src/main.c" + # Factoring default headers for most tests. + ac_includes_default="\ + #include +-#if HAVE_SYS_TYPES_H ++#ifdef HAVE_SYS_TYPES_H + # include + #endif +-#if HAVE_SYS_STAT_H ++#ifdef HAVE_SYS_STAT_H + # include + #endif +-#if STDC_HEADERS ++#ifdef STDC_HEADERS + # include + # include + #else +-# if HAVE_STDLIB_H ++# ifdef HAVE_STDLIB_H + # include + # endif + #endif +-#if HAVE_STRING_H +-# if !STDC_HEADERS && HAVE_MEMORY_H ++#ifdef HAVE_STRING_H ++# if !defined STDC_HEADERS && defined HAVE_MEMORY_H + # include + # endif + # include + #endif +-#if HAVE_STRINGS_H ++#ifdef HAVE_STRINGS_H + # include + #endif +-#if HAVE_INTTYPES_H ++#ifdef HAVE_INTTYPES_H + # include +-#else +-# if HAVE_STDINT_H +-# include +-# endif + #endif +-#if HAVE_UNISTD_H ++#ifdef HAVE_STDINT_H ++# include ++#endif ++#ifdef HAVE_UNISTD_H + # include + #endif" + +-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE YACC CC_FOR_BUILD CPP EGREP LIBOBJS LTLIBOBJS' ++ac_subst_vars='SHELL ++PATH_SEPARATOR ++PACKAGE_NAME ++PACKAGE_TARNAME ++PACKAGE_VERSION ++PACKAGE_STRING ++PACKAGE_BUGREPORT ++exec_prefix ++prefix ++program_transform_name ++bindir ++sbindir ++libexecdir ++datarootdir ++datadir ++sysconfdir ++sharedstatedir ++localstatedir ++includedir ++oldincludedir ++docdir ++infodir ++htmldir ++dvidir ++pdfdir ++psdir ++libdir ++localedir ++mandir ++DEFS ++ECHO_C ++ECHO_N ++ECHO_T ++LIBS ++build_alias ++host_alias ++target_alias ++INSTALL_PROGRAM ++INSTALL_SCRIPT ++INSTALL_DATA ++CYGPATH_W ++PACKAGE ++VERSION ++ACLOCAL ++AUTOCONF ++AUTOMAKE ++AUTOHEADER ++MAKEINFO ++install_sh ++STRIP ++INSTALL_STRIP_PROGRAM ++mkdir_p ++AWK ++SET_MAKE ++am__leading_dot ++AMTAR ++am__tar ++am__untar ++CC ++CFLAGS ++LDFLAGS ++CPPFLAGS ++ac_ct_CC ++EXEEXT ++OBJEXT ++DEPDIR ++am__include ++am__quote ++AMDEP_TRUE ++AMDEP_FALSE ++AMDEPBACKSLASH ++CCDEPMODE ++am__fastdepCC_TRUE ++am__fastdepCC_FALSE ++YACC ++YFLAGS ++CC_FOR_BUILD ++CPP ++GREP ++EGREP ++LIBOBJS ++LTLIBOBJS' + ac_subst_files='' ++ ac_precious_vars='build_alias ++host_alias ++target_alias ++CC ++CFLAGS ++LDFLAGS ++LIBS ++CPPFLAGS ++YACC ++YFLAGS ++CPP' ++ + + # Initialize some variables set by options. + ac_init_help= +@@ -337,34 +734,48 @@ x_libraries=NONE + # and all the variables that are supposed to be based on exec_prefix + # by default will actually change. + # Use braces instead of parens because sh, perl, etc. also accept them. ++# (The list follows the same order as the GNU Coding Standards.) + bindir='${exec_prefix}/bin' + sbindir='${exec_prefix}/sbin' + libexecdir='${exec_prefix}/libexec' +-datadir='${prefix}/share' ++datarootdir='${prefix}/share' ++datadir='${datarootdir}' + sysconfdir='${prefix}/etc' + sharedstatedir='${prefix}/com' + localstatedir='${prefix}/var' +-libdir='${exec_prefix}/lib' + includedir='${prefix}/include' + oldincludedir='/usr/include' +-infodir='${prefix}/info' +-mandir='${prefix}/man' ++docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' ++infodir='${datarootdir}/info' ++htmldir='${docdir}' ++dvidir='${docdir}' ++pdfdir='${docdir}' ++psdir='${docdir}' ++libdir='${exec_prefix}/lib' ++localedir='${datarootdir}/locale' ++mandir='${datarootdir}/man' + + ac_prev= ++ac_dashdash= + for ac_option + do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then +- eval "$ac_prev=\$ac_option" ++ eval $ac_prev=\$ac_option + ac_prev= + continue + fi + +- ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` ++ case $ac_option in ++ *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; ++ *) ac_optarg=yes ;; ++ esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + +- case $ac_option in ++ case $ac_dashdash$ac_option in ++ --) ++ ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; +@@ -386,33 +797,45 @@ do + --config-cache | -C) + cache_file=config.cache ;; + +- -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ++ -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; +- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ +- | --da=*) ++ -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + ++ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ ++ | --dataroo | --dataro | --datar) ++ ac_prev=datarootdir ;; ++ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ ++ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) ++ datarootdir=$ac_optarg ;; ++ + -disable-* | --disable-*) + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. +- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && ++ expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } +- ac_feature=`echo $ac_feature | sed 's/-/_/g'` +- eval "enable_$ac_feature=no" ;; ++ ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` ++ eval enable_$ac_feature=no ;; ++ ++ -docdir | --docdir | --docdi | --doc | --do) ++ ac_prev=docdir ;; ++ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) ++ docdir=$ac_optarg ;; ++ ++ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ++ ac_prev=dvidir ;; ++ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) ++ dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. +- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && ++ expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } +- ac_feature=`echo $ac_feature | sed 's/-/_/g'` +- case $ac_option in +- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; +- *) ac_optarg=yes ;; +- esac +- eval "enable_$ac_feature='$ac_optarg'" ;; ++ ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` ++ eval enable_$ac_feature=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ +@@ -439,6 +862,12 @@ do + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + ++ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ++ ac_prev=htmldir ;; ++ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ ++ | --ht=*) ++ htmldir=$ac_optarg ;; ++ + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; +@@ -463,13 +892,16 @@ do + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + ++ -localedir | --localedir | --localedi | --localed | --locale) ++ ac_prev=localedir ;; ++ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) ++ localedir=$ac_optarg ;; ++ + -localstatedir | --localstatedir | --localstatedi | --localstated \ +- | --localstate | --localstat | --localsta | --localst \ +- | --locals | --local | --loca | --loc | --lo) ++ | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ +- | --localstate=* | --localstat=* | --localsta=* | --localst=* \ +- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) ++ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) +@@ -534,6 +966,16 @@ do + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + ++ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ++ ac_prev=pdfdir ;; ++ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) ++ pdfdir=$ac_optarg ;; ++ ++ -psdir | --psdir | --psdi | --psd | --ps) ++ ac_prev=psdir ;; ++ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) ++ psdir=$ac_optarg ;; ++ + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; +@@ -586,24 +1028,20 @@ do + -with-* | --with-*) + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. +- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && ++ expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } +- ac_package=`echo $ac_package| sed 's/-/_/g'` +- case $ac_option in +- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; +- *) ac_optarg=yes ;; +- esac +- eval "with_$ac_package='$ac_optarg'" ;; ++ ac_package=`echo $ac_package | sed 's/[-.]/_/g'` ++ eval with_$ac_package=\$ac_optarg ;; + + -without-* | --without-*) + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. +- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && ++ expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } +- ac_package=`echo $ac_package | sed 's/-/_/g'` +- eval "with_$ac_package=no" ;; ++ ac_package=`echo $ac_package | sed 's/[-.]/_/g'` ++ eval with_$ac_package=no ;; + + --x) + # Obsolete; use --with-x. +@@ -634,8 +1072,7 @@ Try \`$0 --help' for more information." >&2 + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } +- ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` +- eval "$ac_envvar='$ac_optarg'" ++ eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) +@@ -655,27 +1092,19 @@ if test -n "$ac_prev"; then + { (exit 1); exit 1; }; } + fi + +-# Be sure to have absolute paths. +-for ac_var in exec_prefix prefix +-do +- eval ac_val=$`echo $ac_var` +- case $ac_val in +- [\\/$]* | ?:[\\/]* | NONE | '' ) ;; +- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 +- { (exit 1); exit 1; }; };; +- esac +-done +- +-# Be sure to have absolute paths. +-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ +- localstatedir libdir includedir oldincludedir infodir mandir ++# Be sure to have absolute directory names. ++for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ ++ datadir sysconfdir sharedstatedir localstatedir includedir \ ++ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ ++ libdir localedir mandir + do +- eval ac_val=$`echo $ac_var` ++ eval ac_val=\$$ac_var + case $ac_val in +- [\\/$]* | ?:[\\/]* ) ;; +- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 +- { (exit 1); exit 1; }; };; ++ [\\/$]* | ?:[\\/]* ) continue;; ++ NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac ++ { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 ++ { (exit 1); exit 1; }; } + done + + # There might be people who depend on the old broken behavior: `$host' +@@ -702,74 +1131,76 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- + test "$silent" = yes && exec 6>/dev/null + + ++ac_pwd=`pwd` && test -n "$ac_pwd" && ++ac_ls_di=`ls -di .` && ++ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || ++ { echo "$as_me: error: Working directory cannot be determined" >&2 ++ { (exit 1); exit 1; }; } ++test "X$ac_ls_di" = "X$ac_pwd_ls_di" || ++ { echo "$as_me: error: pwd does not report name of working directory" >&2 ++ { (exit 1); exit 1; }; } ++ ++ + # Find the source files, if location was not specified. + if test -z "$srcdir"; then + ac_srcdir_defaulted=yes +- # Try the directory containing this script, then its parent. +- ac_confdir=`(dirname "$0") 2>/dev/null || ++ # Try the directory containing this script, then the parent directory. ++ ac_confdir=`$as_dirname -- "$0" || + $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ +- X"$0" : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || ++ X"$0" : 'X\(/\)' \| . 2>/dev/null || + echo X"$0" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` ++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)[^/].*/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'` + srcdir=$ac_confdir +- if test ! -r $srcdir/$ac_unique_file; then ++ if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi + else + ac_srcdir_defaulted=no + fi +-if test ! -r $srcdir/$ac_unique_file; then +- if test "$ac_srcdir_defaulted" = yes; then +- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 +- { (exit 1); exit 1; }; } +- else +- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 ++if test ! -r "$srcdir/$ac_unique_file"; then ++ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." ++ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } +- fi + fi +-(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || +- { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 ++ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ++ac_abs_confdir=`( ++ cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 + { (exit 1); exit 1; }; } +-srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +-ac_env_build_alias_set=${build_alias+set} +-ac_env_build_alias_value=$build_alias +-ac_cv_env_build_alias_set=${build_alias+set} +-ac_cv_env_build_alias_value=$build_alias +-ac_env_host_alias_set=${host_alias+set} +-ac_env_host_alias_value=$host_alias +-ac_cv_env_host_alias_set=${host_alias+set} +-ac_cv_env_host_alias_value=$host_alias +-ac_env_target_alias_set=${target_alias+set} +-ac_env_target_alias_value=$target_alias +-ac_cv_env_target_alias_set=${target_alias+set} +-ac_cv_env_target_alias_value=$target_alias +-ac_env_CC_set=${CC+set} +-ac_env_CC_value=$CC +-ac_cv_env_CC_set=${CC+set} +-ac_cv_env_CC_value=$CC +-ac_env_CFLAGS_set=${CFLAGS+set} +-ac_env_CFLAGS_value=$CFLAGS +-ac_cv_env_CFLAGS_set=${CFLAGS+set} +-ac_cv_env_CFLAGS_value=$CFLAGS +-ac_env_LDFLAGS_set=${LDFLAGS+set} +-ac_env_LDFLAGS_value=$LDFLAGS +-ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +-ac_cv_env_LDFLAGS_value=$LDFLAGS +-ac_env_CPPFLAGS_set=${CPPFLAGS+set} +-ac_env_CPPFLAGS_value=$CPPFLAGS +-ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +-ac_cv_env_CPPFLAGS_value=$CPPFLAGS +-ac_env_CPP_set=${CPP+set} +-ac_env_CPP_value=$CPP +-ac_cv_env_CPP_set=${CPP+set} +-ac_cv_env_CPP_value=$CPP ++ pwd)` ++# When building in place, set srcdir=. ++if test "$ac_abs_confdir" = "$ac_pwd"; then ++ srcdir=. ++fi ++# Remove unnecessary trailing slashes from srcdir. ++# Double slashes in file names in object file debugging info ++# mess up M-x gdb in Emacs. ++case $srcdir in ++*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; ++esac ++for ac_var in $ac_precious_vars; do ++ eval ac_env_${ac_var}_set=\${${ac_var}+set} ++ eval ac_env_${ac_var}_value=\$${ac_var} ++ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} ++ eval ac_cv_env_${ac_var}_value=\$${ac_var} ++done + + # + # Report the --help message. +@@ -798,9 +1229,6 @@ Configuration: + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +-_ACEOF +- +- cat <<_ACEOF + Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] +@@ -818,15 +1246,22 @@ Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] +- --datadir=DIR read-only architecture-independent data [PREFIX/share] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] +- --infodir=DIR info documentation [PREFIX/info] +- --mandir=DIR man documentation [PREFIX/man] ++ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] ++ --datadir=DIR read-only architecture-independent data [DATAROOTDIR] ++ --infodir=DIR info documentation [DATAROOTDIR/info] ++ --localedir=DIR locale-dependent data [DATAROOTDIR/locale] ++ --mandir=DIR man documentation [DATAROOTDIR/man] ++ --docdir=DIR documentation root [DATAROOTDIR/doc/dash] ++ --htmldir=DIR html documentation [DOCDIR] ++ --dvidir=DIR dvi documentation [DOCDIR] ++ --pdfdir=DIR pdf documentation [DOCDIR] ++ --psdir=DIR ps documentation [DOCDIR] + _ACEOF + + cat <<\_ACEOF +@@ -849,6 +1284,9 @@ Optional Features: + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors ++ --enable-static Build statical linked program ++ --enable-fnmatch Use fnmatch(3) from libc ++ --enable-glob Use glob(3) from libc + + Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] +@@ -860,128 +1298,100 @@ Some influential environment variables: + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory +- CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have +- headers in a nonstandard directory ++ LIBS libraries to pass to the linker, e.g. -l ++ CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if ++ you have headers in a nonstandard directory ++ YACC The `Yet Another C Compiler' implementation to use. Defaults to ++ the first program found out of: `bison -y', `byacc', `yacc'. ++ YFLAGS The list of arguments that will be passed by default to $YACC. ++ This script will default YFLAGS to the empty string to avoid a ++ default value of `-d' given by some make applications. + CPP C preprocessor + + Use these variables to override the choices made by `configure' or to help + it to find libraries and programs with nonstandard names/locations. + + _ACEOF ++ac_status=$? + fi + + if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. +- ac_popdir=`pwd` + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue +- test -d $ac_dir || continue ++ test -d "$ac_dir" || continue + ac_builddir=. + +-if test "$ac_dir" != .; then ++case "$ac_dir" in ++.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; ++*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` +- # A "../" for each directory in $ac_dir_suffix. +- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +-else +- ac_dir_suffix= ac_top_builddir= +-fi ++ # A ".." for each directory in $ac_dir_suffix. ++ ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` ++ case $ac_top_builddir_sub in ++ "") ac_top_builddir_sub=. ac_top_build_prefix= ;; ++ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; ++ esac ;; ++esac ++ac_abs_top_builddir=$ac_pwd ++ac_abs_builddir=$ac_pwd$ac_dir_suffix ++# for backward compatibility: ++ac_top_builddir=$ac_top_build_prefix + + case $srcdir in +- .) # No --srcdir option. We are building in place. ++ .) # We are building in place. + ac_srcdir=. +- if test -z "$ac_top_builddir"; then +- ac_top_srcdir=. +- else +- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` +- fi ;; +- [\\/]* | ?:[\\/]* ) # Absolute path. ++ ac_top_srcdir=$ac_top_builddir_sub ++ ac_abs_top_srcdir=$ac_pwd ;; ++ [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; +- ac_top_srcdir=$srcdir ;; +- *) # Relative path. +- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix +- ac_top_srcdir=$ac_top_builddir$srcdir ;; +-esac +- +-# Do not use `cd foo && pwd` to compute absolute paths, because +-# the directories may not exist. +-case `pwd` in +-.) ac_abs_builddir="$ac_dir";; +-*) +- case "$ac_dir" in +- .) ac_abs_builddir=`pwd`;; +- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; +- *) ac_abs_builddir=`pwd`/"$ac_dir";; +- esac;; ++ ac_top_srcdir=$srcdir ++ ac_abs_top_srcdir=$srcdir ;; ++ *) # Relative name. ++ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ++ ac_top_srcdir=$ac_top_build_prefix$srcdir ++ ac_abs_top_srcdir=$ac_pwd/$srcdir ;; + esac +-case $ac_abs_builddir in +-.) ac_abs_top_builddir=${ac_top_builddir}.;; +-*) +- case ${ac_top_builddir}. in +- .) ac_abs_top_builddir=$ac_abs_builddir;; +- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; +- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; +- esac;; +-esac +-case $ac_abs_builddir in +-.) ac_abs_srcdir=$ac_srcdir;; +-*) +- case $ac_srcdir in +- .) ac_abs_srcdir=$ac_abs_builddir;; +- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; +- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; +- esac;; +-esac +-case $ac_abs_builddir in +-.) ac_abs_top_srcdir=$ac_top_srcdir;; +-*) +- case $ac_top_srcdir in +- .) ac_abs_top_srcdir=$ac_abs_builddir;; +- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; +- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; +- esac;; +-esac +- +- cd $ac_dir +- # Check for guested configure; otherwise get Cygnus style configure. +- if test -f $ac_srcdir/configure.gnu; then +- echo +- $SHELL $ac_srcdir/configure.gnu --help=recursive +- elif test -f $ac_srcdir/configure; then +- echo +- $SHELL $ac_srcdir/configure --help=recursive +- elif test -f $ac_srcdir/configure.ac || +- test -f $ac_srcdir/configure.in; then +- echo +- $ac_configure --help ++ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix ++ ++ cd "$ac_dir" || { ac_status=$?; continue; } ++ # Check for guested configure. ++ if test -f "$ac_srcdir/configure.gnu"; then ++ echo && ++ $SHELL "$ac_srcdir/configure.gnu" --help=recursive ++ elif test -f "$ac_srcdir/configure"; then ++ echo && ++ $SHELL "$ac_srcdir/configure" --help=recursive + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 +- fi +- cd "$ac_popdir" ++ fi || ac_status=$? ++ cd "$ac_pwd" || { ac_status=$?; break; } + done + fi + +-test -n "$ac_init_help" && exit 0 ++test -n "$ac_init_help" && exit $ac_status + if $ac_init_version; then + cat <<\_ACEOF + dash configure 0.5.4 +-generated by GNU Autoconf 2.59 ++generated by GNU Autoconf 2.61 + +-Copyright (C) 2003 Free Software Foundation, Inc. ++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, ++2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. + This configure script is free software; the Free Software Foundation + gives unlimited permission to copy, distribute and modify it. + _ACEOF +- exit 0 ++ exit + fi +-exec 5>config.log +-cat >&5 <<_ACEOF ++cat >config.log <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + + It was created by dash $as_me 0.5.4, which was +-generated by GNU Autoconf 2.59. Invocation command line was ++generated by GNU Autoconf 2.61. Invocation command line was + + $ $0 $@ + + _ACEOF ++exec 5>>config.log + { + cat <<_ASUNAME + ## --------- ## +@@ -1000,7 +1410,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown` + /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` + /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` + /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +-hostinfo = `(hostinfo) 2>/dev/null || echo unknown` ++/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` + /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` + /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` + /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` +@@ -1014,6 +1424,7 @@ do + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" + done ++IFS=$as_save_IFS + + } >&5 + +@@ -1035,7 +1446,6 @@ _ACEOF + ac_configure_args= + ac_configure_args0= + ac_configure_args1= +-ac_sep= + ac_must_keep_next=false + for ac_pass in 1 2 + do +@@ -1046,7 +1456,7 @@ do + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; +- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ++ *\'*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in +@@ -1068,9 +1478,7 @@ do + -* ) ac_must_keep_next=true ;; + esac + fi +- ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" +- # Get rid of the leading space. +- ac_sep=" " ++ ac_configure_args="$ac_configure_args '$ac_arg'" + ;; + esac + done +@@ -1081,8 +1489,8 @@ $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_ + # When interrupted or exit'd, cleanup temporary files, and complete + # config.log. We remove comments because anyway the quotes in there + # would cause problems or look ugly. +-# WARNING: Be sure not to use single quotes in there, as some shells, +-# such as our DU 5.0 friend, will then `close' the trap. ++# WARNING: Use '\'' to represent an apostrophe within the trap. ++# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. + trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { +@@ -1095,20 +1503,34 @@ trap 'exit_status=$? + _ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +-{ ++( ++ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do ++ eval ac_val=\$$ac_var ++ case $ac_val in #( ++ *${as_nl}*) ++ case $ac_var in #( ++ *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 ++echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; ++ esac ++ case $ac_var in #( ++ _ | IFS | as_nl) ;; #( ++ *) $as_unset $ac_var ;; ++ esac ;; ++ esac ++ done + (set) 2>&1 | +- case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in +- *ac_space=\ *) ++ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( ++ *${as_nl}ac_space=\ *) + sed -n \ +- "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; +- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" +- ;; ++ "s/'\''/'\''\\\\'\'''\''/g; ++ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ++ ;; #( + *) +- sed -n \ +- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ++ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; +- esac; +-} ++ esac | ++ sort ++) + echo + + cat <<\_ASBOX +@@ -1119,22 +1541,28 @@ _ASBOX + echo + for ac_var in $ac_subst_vars + do +- eval ac_val=$`echo $ac_var` +- echo "$ac_var='"'"'$ac_val'"'"'" ++ eval ac_val=\$$ac_var ++ case $ac_val in ++ *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; ++ esac ++ echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +-## ------------- ## +-## Output files. ## +-## ------------- ## ++## ------------------- ## ++## File substitutions. ## ++## ------------------- ## + _ASBOX + echo + for ac_var in $ac_subst_files + do +- eval ac_val=$`echo $ac_var` +- echo "$ac_var='"'"'$ac_val'"'"'" ++ eval ac_val=\$$ac_var ++ case $ac_val in ++ *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; ++ esac ++ echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi +@@ -1146,26 +1574,24 @@ _ASBOX + ## ----------- ## + _ASBOX + echo +- sed "/^$/d" confdefs.h | sort ++ cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 +- rm -f core *.core && +- rm -rf conftest* confdefs* conf$$* $ac_clean_files && ++ rm -f core *.core core.conftest.* && ++ rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +- ' 0 ++' 0 + for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal + done + ac_signal=0 + + # confdefs.h avoids OS command line length limits that DEFS can exceed. +-rm -rf conftest* confdefs.h +-# AIX cpp loses on an empty file, so make sure it contains at least a newline. +-echo >confdefs.h ++rm -f -r conftest* confdefs.h + + # Predefined preprocessor variables. + +@@ -1196,14 +1622,17 @@ _ACEOF + + # Let the site file select an alternate cache file if it wants to. + # Prefer explicitly selected file to automatically selected ones. +-if test -z "$CONFIG_SITE"; then +- if test "x$prefix" != xNONE; then +- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" +- else +- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" +- fi ++if test -n "$CONFIG_SITE"; then ++ set x "$CONFIG_SITE" ++elif test "x$prefix" != xNONE; then ++ set x "$prefix/share/config.site" "$prefix/etc/config.site" ++else ++ set x "$ac_default_prefix/share/config.site" \ ++ "$ac_default_prefix/etc/config.site" + fi +-for ac_site_file in $CONFIG_SITE; do ++shift ++for ac_site_file ++do + if test -r "$ac_site_file"; then + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 + echo "$as_me: loading site script $ac_site_file" >&6;} +@@ -1219,8 +1648,8 @@ if test -r "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 + echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in +- [\\/]* | ?:[\\/]* ) . $cache_file;; +- *) . ./$cache_file;; ++ [\\/]* | ?:[\\/]* ) . "$cache_file";; ++ *) . "./$cache_file";; + esac + fi + else +@@ -1232,12 +1661,11 @@ fi + # Check that the precious variables saved in the cache have kept the same + # value. + ac_cache_corrupted=false +-for ac_var in `(set) 2>&1 | +- sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do ++for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set +- eval ac_old_val="\$ac_cv_env_${ac_var}_value" +- eval ac_new_val="\$ac_env_${ac_var}_value" ++ eval ac_old_val=\$ac_cv_env_${ac_var}_value ++ eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +@@ -1262,8 +1690,7 @@ echo "$as_me: current value: $ac_new_val" >&2;} + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in +- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) +- ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; ++ *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in +@@ -1280,12 +1707,6 @@ echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start ov + { (exit 1); exit 1; }; } + fi + +-ac_ext=c +-ac_cpp='$CPP $CPPFLAGS' +-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +-ac_compiler_gnu=$ac_cv_c_compiler_gnu +- + + + +@@ -1310,33 +1731,44 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + ++ac_ext=c ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ++ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + am__api_version="1.9" + ac_aux_dir= +-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do +- if test -f $ac_dir/install-sh; then ++for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do ++ if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break +- elif test -f $ac_dir/install.sh; then ++ elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break +- elif test -f $ac_dir/shtool; then ++ elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi + done + if test -z "$ac_aux_dir"; then +- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 +-echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} ++ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 ++echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} + { (exit 1); exit 1; }; } + fi +-ac_config_guess="$SHELL $ac_aux_dir/config.guess" +-ac_config_sub="$SHELL $ac_aux_dir/config.sub" +-ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. ++ ++# These three variables are undocumented and unsupported, ++# and are intended to be withdrawn in a future Autoconf release. ++# They can cause serious problems if a builder's source tree is in a directory ++# whose full name contains unusual characters. ++ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ++ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ++ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. ++ + + # Find a good install program. We prefer a C program (faster), + # so one script is as good as another. But avoid the broken or +@@ -1351,8 +1783,8 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. + # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" + # OS/2's system install, which has a completely different semantic + # ./install, which can be erroneously created by make from ./install.sh. +-echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 ++echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } + if test -z "$INSTALL"; then + if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +@@ -1374,7 +1806,7 @@ case $as_dir/ in + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. +@@ -1393,21 +1825,22 @@ case $as_dir/ in + ;; + esac + done ++IFS=$as_save_IFS + + + fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else +- # As a last resort, use the slow shell script. We don't cache a +- # path for INSTALL within a source directory, because that will ++ # As a last resort, use the slow shell script. Don't cache a ++ # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is +- # removed, or if the path is relative. ++ # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi + fi +-echo "$as_me:$LINENO: result: $INSTALL" >&5 +-echo "${ECHO_T}$INSTALL" >&6 ++{ echo "$as_me:$LINENO: result: $INSTALL" >&5 ++echo "${ECHO_T}$INSTALL" >&6; } + + # Use test -z because SunOS4 sh mishandles braces in ${var-val}. + # It thinks the first close brace ends the variable substitution. +@@ -1417,8 +1850,8 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + + test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +-echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +-echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5 ++echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } + # Just in case + sleep 1 + echo timestamp > conftest.file +@@ -1460,20 +1893,20 @@ echo "$as_me: error: newly created file is older than distributed files! + Check your system clock" >&2;} + { (exit 1); exit 1; }; } + fi +-echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6 ++{ echo "$as_me:$LINENO: result: yes" >&5 ++echo "${ECHO_T}yes" >&6; } + test "$program_prefix" != NONE && +- program_transform_name="s,^,$program_prefix,;$program_transform_name" ++ program_transform_name="s&^&$program_prefix&;$program_transform_name" + # Use a double $ so make ignores it. + test "$program_suffix" != NONE && +- program_transform_name="s,\$,$program_suffix,;$program_transform_name" ++ program_transform_name="s&\$&$program_suffix&;$program_transform_name" + # Double any \ or $. echo might interpret backslashes. + # By default was `s,x,x', remove it if useless. + cat <<\_ACEOF >conftest.sed + s/[\\$]/&&/g;s/;s,x,x,$// + _ACEOF + program_transform_name=`echo $program_transform_name | sed -f conftest.sed` +-rm conftest.sed ++rm -f conftest.sed + + # expand $ac_aux_dir to an absolute path + am_aux_dir=`cd $ac_aux_dir && pwd` +@@ -1525,8 +1958,8 @@ for ac_prog in gawk mawk nawk awk + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_AWK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -1539,54 +1972,57 @@ do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + AWK=$ac_cv_prog_AWK + if test -n "$AWK"; then +- echo "$as_me:$LINENO: result: $AWK" >&5 +-echo "${ECHO_T}$AWK" >&6 ++ { echo "$as_me:$LINENO: result: $AWK" >&5 ++echo "${ECHO_T}$AWK" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + ++ + test -n "$AWK" && break + done + +-echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 +-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` +-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then ++{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 ++echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } ++set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` ++if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.make <<\_ACEOF ++SHELL = /bin/sh + all: +- @echo 'ac_maketemp="$(MAKE)"' ++ @echo '@@@%%%=$(MAKE)=@@@%%%' + _ACEOF + # GNU make sometimes prints "make[1]: Entering...", which would confuse us. +-eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` +-if test -n "$ac_maketemp"; then +- eval ac_cv_prog_make_${ac_make}_set=yes +-else +- eval ac_cv_prog_make_${ac_make}_set=no +-fi ++case `${MAKE-make} -f conftest.make 2>/dev/null` in ++ *@@@%%%=?*=@@@%%%*) ++ eval ac_cv_prog_make_${ac_make}_set=yes;; ++ *) ++ eval ac_cv_prog_make_${ac_make}_set=no;; ++esac + rm -f conftest.make + fi +-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then +- echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6 ++if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then ++ { echo "$as_me:$LINENO: result: yes" >&5 ++echo "${ECHO_T}yes" >&6; } + SET_MAKE= + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" + fi + +@@ -1657,8 +2093,8 @@ if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. + set dummy ${ac_tool_prefix}strip; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -1671,32 +2107,34 @@ do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + STRIP=$ac_cv_prog_STRIP + if test -n "$STRIP"; then +- echo "$as_me:$LINENO: result: $STRIP" >&5 +-echo "${ECHO_T}$STRIP" >&6 ++ { echo "$as_me:$LINENO: result: $STRIP" >&5 ++echo "${ECHO_T}$STRIP" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + ++ + fi + if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. + set dummy strip; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -1709,27 +2147,41 @@ do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + +- test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" + fi + fi + ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP + if test -n "$ac_ct_STRIP"; then +- echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +-echo "${ECHO_T}$ac_ct_STRIP" >&6 ++ { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 ++echo "${ECHO_T}$ac_ct_STRIP" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + +- STRIP=$ac_ct_STRIP ++ if test "x$ac_ct_STRIP" = x; then ++ STRIP=":" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&5 ++echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&2;} ++ac_tool_warned=yes ;; ++esac ++ STRIP=$ac_ct_STRIP ++ fi + else + STRIP="$ac_cv_prog_STRIP" + fi +@@ -1751,7 +2203,7 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + + +- ac_config_headers="$ac_config_headers config.h" ++ac_config_headers="$ac_config_headers config.h" + + + ac_ext=c +@@ -1762,8 +2214,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. + set dummy ${ac_tool_prefix}gcc; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -1776,32 +2228,34 @@ do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + CC=$ac_cv_prog_CC + if test -n "$CC"; then +- echo "$as_me:$LINENO: result: $CC" >&5 +-echo "${ECHO_T}$CC" >&6 ++ { echo "$as_me:$LINENO: result: $CC" >&5 ++echo "${ECHO_T}$CC" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + ++ + fi + if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. + set dummy gcc; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -1814,36 +2268,51 @@ do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + ac_ct_CC=$ac_cv_prog_ac_ct_CC + if test -n "$ac_ct_CC"; then +- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +-echo "${ECHO_T}$ac_ct_CC" >&6 ++ { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 ++echo "${ECHO_T}$ac_ct_CC" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + +- CC=$ac_ct_CC ++ if test "x$ac_ct_CC" = x; then ++ CC="" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&5 ++echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&2;} ++ac_tool_warned=yes ;; ++esac ++ CC=$ac_ct_CC ++ fi + else + CC="$ac_cv_prog_CC" + fi + + if test -z "$CC"; then +- if test -n "$ac_tool_prefix"; then +- # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. ++ if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + set dummy ${ac_tool_prefix}cc; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -1856,74 +2325,34 @@ do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + CC=$ac_cv_prog_CC + if test -n "$CC"; then +- echo "$as_me:$LINENO: result: $CC" >&5 +-echo "${ECHO_T}$CC" >&6 +-else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 +-fi +- +-fi +-if test -z "$ac_cv_prog_CC"; then +- ac_ct_CC=$CC +- # Extract the first word of "cc", so it can be a program name with args. +-set dummy cc; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then +- echo $ECHO_N "(cached) $ECHO_C" >&6 +-else +- if test -n "$ac_ct_CC"; then +- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +-else +-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then +- ac_cv_prog_ac_ct_CC="cc" +- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 +- break 2 +- fi +-done +-done +- +-fi +-fi +-ac_ct_CC=$ac_cv_prog_ac_ct_CC +-if test -n "$ac_ct_CC"; then +- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +-echo "${ECHO_T}$ac_ct_CC" >&6 ++ { echo "$as_me:$LINENO: result: $CC" >&5 ++echo "${ECHO_T}$CC" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + +- CC=$ac_ct_CC +-else +- CC="$ac_cv_prog_CC" +-fi + ++ fi + fi + if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. + set dummy cc; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -1937,7 +2366,7 @@ do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue +@@ -1948,6 +2377,7 @@ do + fi + done + done ++IFS=$as_save_IFS + + if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. +@@ -1965,22 +2395,23 @@ fi + fi + CC=$ac_cv_prog_CC + if test -n "$CC"; then +- echo "$as_me:$LINENO: result: $CC" >&5 +-echo "${ECHO_T}$CC" >&6 ++ { echo "$as_me:$LINENO: result: $CC" >&5 ++echo "${ECHO_T}$CC" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + ++ + fi + if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then +- for ac_prog in cl ++ for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. + set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -1993,36 +2424,38 @@ do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + CC=$ac_cv_prog_CC + if test -n "$CC"; then +- echo "$as_me:$LINENO: result: $CC" >&5 +-echo "${ECHO_T}$CC" >&6 ++ { echo "$as_me:$LINENO: result: $CC" >&5 ++echo "${ECHO_T}$CC" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + ++ + test -n "$CC" && break + done + fi + if test -z "$CC"; then + ac_ct_CC=$CC +- for ac_prog in cl ++ for ac_prog in cl.exe + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -2035,29 +2468,45 @@ do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + ac_ct_CC=$ac_cv_prog_ac_ct_CC + if test -n "$ac_ct_CC"; then +- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +-echo "${ECHO_T}$ac_ct_CC" >&6 ++ { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 ++echo "${ECHO_T}$ac_ct_CC" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + ++ + test -n "$ac_ct_CC" && break + done + +- CC=$ac_ct_CC ++ if test "x$ac_ct_CC" = x; then ++ CC="" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&5 ++echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&2;} ++ac_tool_warned=yes ;; ++esac ++ CC=$ac_ct_CC ++ fi + fi + + fi +@@ -2070,21 +2519,35 @@ See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + + # Provide some information about the compiler. +-echo "$as_me:$LINENO:" \ +- "checking for C compiler version" >&5 ++echo "$as_me:$LINENO: checking for C compiler version" >&5 + ac_compiler=`set X $ac_compile; echo $2` +-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 +- (eval $ac_compiler --version &5) 2>&5 ++{ (ac_try="$ac_compiler --version >&5" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 +- (eval $ac_compiler -v &5) 2>&5 ++{ (ac_try="$ac_compiler -v >&5" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 +- (eval $ac_compiler -V &5) 2>&5 ++{ (ac_try="$ac_compiler -V >&5" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +@@ -2109,47 +2572,77 @@ ac_clean_files="$ac_clean_files a.out a.exe b.out" + # Try to create an executable without -o first, disregard a.out. + # It will help us diagnose broken compilers, and finding out an intuition + # of exeext. +-echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 ++echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } + ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +-if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 +- (eval $ac_link_default) 2>&5 ++# ++# List of possible output files, starting from the most likely. ++# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) ++# only as a last resort. b.out is created by i960 compilers. ++ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' ++# ++# The IRIX 6 linker writes into existing files which may not be ++# executable, retaining their permissions. Remove them first so a ++# subsequent execution test works. ++ac_rmfiles= ++for ac_file in $ac_files ++do ++ case $ac_file in ++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; ++ * ) ac_rmfiles="$ac_rmfiles $ac_file";; ++ esac ++done ++rm -f $ac_rmfiles ++ ++if { (ac_try="$ac_link_default" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link_default") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then +- # Find the output, starting from the most likely. This scheme is +-# not robust to junk in `.', hence go to wildcards (a.*) only as a last +-# resort. +- +-# Be careful to initialize this variable, since it used to be cached. +-# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +-ac_cv_exeext= +-# b.out is created by i960 compilers. +-for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out ++ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. ++# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' ++# in a Makefile. We should not override ac_cv_exeext if it was cached, ++# so that the user can short-circuit this test for compilers unknown to ++# Autoconf. ++for ac_file in $ac_files '' + do + test -f "$ac_file" || continue + case $ac_file in +- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) +- ;; +- conftest.$ac_ext ) +- # This is the source file. ++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) +- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` +- # FIXME: I believe we export ac_cv_exeext for Libtool, +- # but it would be cool to find out if it's true. Does anybody +- # maintain Libtool? --akim. +- export ac_cv_exeext ++ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; ++ then :; else ++ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` ++ fi ++ # We set ac_cv_exeext here because the later test for it is not ++ # safe: cross compilers may not add the suffix if given an `-o' ++ # argument, so we may need to know it at that point already. ++ # Even if this section looks crufty: it has the advantage of ++ # actually working. + break;; + * ) + break;; + esac + done ++test "$ac_cv_exeext" = no && ac_cv_exeext= ++ + else ++ ac_file='' ++fi ++ ++{ echo "$as_me:$LINENO: result: $ac_file" >&5 ++echo "${ECHO_T}$ac_file" >&6; } ++if test -z "$ac_file"; then + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +@@ -2161,19 +2654,21 @@ See \`config.log' for more details." >&2;} + fi + + ac_exeext=$ac_cv_exeext +-echo "$as_me:$LINENO: result: $ac_file" >&5 +-echo "${ECHO_T}$ac_file" >&6 + +-# Check the compiler produces executables we can run. If not, either ++# Check that the compiler produces executables we can run. If not, either + # the compiler is broken, or we cross compile. +-echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 ++echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } + # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 + # If not cross compiling, check that we can run a simple program. + if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++ { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then +@@ -2192,22 +2687,27 @@ See \`config.log' for more details." >&2;} + fi + fi + fi +-echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6 ++{ echo "$as_me:$LINENO: result: yes" >&5 ++echo "${ECHO_T}yes" >&6; } + + rm -f a.out a.exe conftest$ac_cv_exeext b.out + ac_clean_files=$ac_clean_files_save +-# Check the compiler produces executables we can run. If not, either ++# Check that the compiler produces executables we can run. If not, either + # the compiler is broken, or we cross compile. +-echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +-echo "$as_me:$LINENO: result: $cross_compiling" >&5 +-echo "${ECHO_T}$cross_compiling" >&6 +- +-echo "$as_me:$LINENO: checking for suffix of executables" >&5 +-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 ++{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 ++echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } ++{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 ++echo "${ECHO_T}$cross_compiling" >&6; } ++ ++{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 ++echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then +@@ -2218,9 +2718,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in +- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; ++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` +- export ac_cv_exeext + break;; + * ) break;; + esac +@@ -2234,14 +2733,14 @@ See \`config.log' for more details." >&2;} + fi + + rm -f conftest$ac_cv_exeext +-echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +-echo "${ECHO_T}$ac_cv_exeext" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 ++echo "${ECHO_T}$ac_cv_exeext" >&6; } + + rm -f conftest.$ac_ext + EXEEXT=$ac_cv_exeext + ac_exeext=$EXEEXT +-echo "$as_me:$LINENO: checking for suffix of object files" >&5 +-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 ++echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } + if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -2261,14 +2760,20 @@ main () + } + _ACEOF + rm -f conftest.o conftest.obj +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>&5 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then +- for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do ++ for ac_file in conftest.o conftest.obj conftest.*; do ++ test -f "$ac_file" || continue; + case $ac_file in +- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; ++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +@@ -2286,12 +2791,12 @@ fi + + rm -f conftest.$ac_cv_objext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +-echo "${ECHO_T}$ac_cv_objext" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 ++echo "${ECHO_T}$ac_cv_objext" >&6; } + OBJEXT=$ac_cv_objext + ac_objext=$OBJEXT +-echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 ++echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } + if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -2314,49 +2819,49 @@ main () + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_compiler_gnu=no ++ ac_compiler_gnu=no + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_c_compiler_gnu=$ac_compiler_gnu + + fi +-echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 ++echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } + GCC=`test $ac_compiler_gnu = yes && echo yes` + ac_test_CFLAGS=${CFLAGS+set} + ac_save_CFLAGS=$CFLAGS +-CFLAGS="-g" +-echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 ++echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } + if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- cat >conftest.$ac_ext <<_ACEOF ++ ac_save_c_werror_flag=$ac_c_werror_flag ++ ac_c_werror_flag=yes ++ ac_cv_prog_cc_g=no ++ CFLAGS="-g" ++ cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -2372,37 +2877,118 @@ main () + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ ac_cv_prog_cc_g=yes ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ CFLAGS="" ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++ ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ : ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ac_c_werror_flag=$ac_save_c_werror_flag ++ CFLAGS="-g" ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++ ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_prog_cc_g=no ++ + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ac_c_werror_flag=$ac_save_c_werror_flag ++fi ++{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 ++echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } + if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS + elif test $ac_cv_prog_cc_g = yes; then +@@ -2418,12 +3004,12 @@ else + CFLAGS= + fi + fi +-echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +-if test "${ac_cv_prog_cc_stdc+set}" = set; then ++{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 ++echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } ++if test "${ac_cv_prog_cc_c89+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- ac_cv_prog_cc_stdc=no ++ ac_cv_prog_cc_c89=no + ac_save_CC=$CC + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -2457,12 +3043,17 @@ static char *f (char * (*g) (char **, int), char **p, ...) + /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated +- as 'x'. The following induces an error, until -std1 is added to get ++ as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something +- that's true only with -std1. */ ++ that's true only with -std. */ + int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + ++/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters ++ inside strings and character constants. */ ++#define FOO(x) 'x' ++int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; ++ + int test (int i, double x); + struct s1 {int (*f) (int a);}; + struct s2 {int (*f) (double a);}; +@@ -2477,201 +3068,57 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + return 0; + } + _ACEOF +-# Don't try gcc -ansi; that turns off useful extensions and +-# breaks some systems' header files. +-# AIX -qlanglvl=ansi +-# Ultrix and OSF/1 -std1 +-# HP-UX 10.20 and later -Ae +-# HP-UX older versions -Aa -D_HPUX_SOURCE +-# SVR4 -Xc -D__EXTENSIONS__ +-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" ++for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ ++ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" + do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- ac_cv_prog_cc_stdc=$ac_arg +-break ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ ac_cv_prog_cc_c89=$ac_arg + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ++ + fi +-rm -f conftest.err conftest.$ac_objext ++ ++rm -f core conftest.err conftest.$ac_objext ++ test "x$ac_cv_prog_cc_c89" != "xno" && break + done +-rm -f conftest.$ac_ext conftest.$ac_objext ++rm -f conftest.$ac_ext + CC=$ac_save_CC + + fi +- +-case "x$ac_cv_prog_cc_stdc" in +- x|xno) +- echo "$as_me:$LINENO: result: none needed" >&5 +-echo "${ECHO_T}none needed" >&6 ;; ++# AC_CACHE_VAL ++case "x$ac_cv_prog_cc_c89" in ++ x) ++ { echo "$as_me:$LINENO: result: none needed" >&5 ++echo "${ECHO_T}none needed" >&6; } ;; ++ xno) ++ { echo "$as_me:$LINENO: result: unsupported" >&5 ++echo "${ECHO_T}unsupported" >&6; } ;; + *) +- echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 +- CC="$CC $ac_cv_prog_cc_stdc" ;; ++ CC="$CC $ac_cv_prog_cc_c89" ++ { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 ++echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; + esac + +-# Some people use a C++ compiler to compile C. Since we use `exit', +-# in C++ we need to declare it. In case someone uses the same compiler +-# for both compiling C and C++ we need to have the C++ compiler decide +-# the declaration of exit, since it's the most demanding environment. +-cat >conftest.$ac_ext <<_ACEOF +-#ifndef __cplusplus +- choke me +-#endif +-_ACEOF +-rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- for ac_declaration in \ +- '' \ +- 'extern "C" void std::exit (int) throw (); using std::exit;' \ +- 'extern "C" void std::exit (int); using std::exit;' \ +- 'extern "C" void exit (int) throw ();' \ +- 'extern "C" void exit (int);' \ +- 'void exit (int);' +-do +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_declaration +-#include +-int +-main () +-{ +-exit (42); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- : +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-continue +-fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_declaration +-int +-main () +-{ +-exit (42); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- break +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +-done +-rm -f conftest* +-if test -n "$ac_declaration"; then +- echo '#ifdef __cplusplus' >>confdefs.h +- echo $ac_declaration >>confdefs.h +- echo '#endif' >>confdefs.h +-fi +- +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +-fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +@@ -2679,7 +3126,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ + ac_compiler_gnu=$ac_cv_c_compiler_gnu + DEPDIR="${am__leading_dot}deps" + +- ac_config_commands="$ac_config_commands depfiles" ++ac_config_commands="$ac_config_commands depfiles" + + + am_make=${MAKE-make} +@@ -2689,8 +3136,8 @@ am__doit: + .PHONY: am__doit + END + # If we don't find an include directive, just comment out the code. +-echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +-echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 ++echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } + am__include="#" + am__quote= + _am_result=none +@@ -2717,15 +3164,15 @@ if test "$am__include" = "#"; then + fi + + +-echo "$as_me:$LINENO: result: $_am_result" >&5 +-echo "${ECHO_T}$_am_result" >&6 ++{ echo "$as_me:$LINENO: result: $_am_result" >&5 ++echo "${ECHO_T}$_am_result" >&6; } + rm -f confinc confmf + +-# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. ++# Check whether --enable-dependency-tracking was given. + if test "${enable_dependency_tracking+set}" = set; then +- enableval="$enable_dependency_tracking" ++ enableval=$enable_dependency_tracking; ++fi + +-fi; + if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +@@ -2745,8 +3192,8 @@ fi + + depcc="$CC" am_compiler_list= + +-echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +-echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 ++echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } + if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -2835,8 +3282,8 @@ else + fi + + fi +-echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +-echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 ++{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 ++echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } + CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + +@@ -2862,8 +3309,8 @@ for ac_prog in 'bison -y' byacc + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_YACC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -2876,39 +3323,61 @@ do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do +- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_YACC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + YACC=$ac_cv_prog_YACC + if test -n "$YACC"; then +- echo "$as_me:$LINENO: result: $YACC" >&5 +-echo "${ECHO_T}$YACC" >&6 ++ { echo "$as_me:$LINENO: result: $YACC" >&5 ++echo "${ECHO_T}$YACC" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + ++ + test -n "$YACC" && break + done + test -n "$YACC" || YACC="yacc" + + +-echo "$as_me:$LINENO: checking for build system compiler" >&5 +-echo $ECHO_N "checking for build system compiler... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for build system compiler" >&5 ++echo $ECHO_N "checking for build system compiler... $ECHO_C" >&6; } + if test "$cross_compiling" = yes; then + CC_FOR_BUILD=${CC_FOR_BUILD-cc} + else + CC_FOR_BUILD=${CC} + fi +-echo "$as_me:$LINENO: result: ${CC_FOR_BUILD}" >&5 +-echo "${ECHO_T}${CC_FOR_BUILD}" >&6 ++{ echo "$as_me:$LINENO: result: ${CC_FOR_BUILD}" >&5 ++echo "${ECHO_T}${CC_FOR_BUILD}" >&6; } ++ ++ ++# Check whether --enable-static was given. ++if test "${enable_static+set}" = set; then ++ enableval=$enable_static; ++fi ++ ++if test "$enable_static" = "yes"; then ++ export LDFLAGS="-static -Wl,--fatal-warnings" ++fi ++ ++# Check whether --enable-fnmatch was given. ++if test "${enable_fnmatch+set}" = set; then ++ enableval=$enable_fnmatch; ++fi ++ ++# Check whether --enable-glob was given. ++if test "${enable_glob+set}" = set; then ++ enableval=$enable_glob; ++fi + + + +@@ -2928,13 +3397,15 @@ echo "${ECHO_T}${CC_FOR_BUILD}" >&6 + + + +-for ac_func in bsearch getpwnam getrlimit isalpha killpg mempcpy sigsetmask \ +- stpcpy strchrnul strsignal strtod strtoimax strtoumax sysconf ++ ++for ac_func in bsearch getpwnam getrlimit imaxdiv isalpha killpg mempcpy \ ++ sigsetmask stpcpy strchrnul strsignal strtod strtoimax \ ++ strtoumax sysconf + do + as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +-echo "$as_me:$LINENO: checking for $ac_func" >&5 +-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +-if eval "test \"\${$as_ac_var+set}\" = set"; then ++{ echo "$as_me:$LINENO: checking for $ac_func" >&5 ++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } ++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF +@@ -2960,67 +3431,254 @@ cat >>conftest.$ac_ext <<_ACEOF + + #undef $ac_func + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" +-{ + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char $ac_func (); + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +-#if defined (__stub_$ac_func) || defined (__stub___$ac_func) ++#if defined __stub_$ac_func || defined __stub___$ac_func + choke me ++#endif ++ ++int ++main () ++{ ++return $ac_func (); ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then ++ eval "$as_ac_var=yes" ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ eval "$as_ac_var=no" ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext ++fi ++ac_res=`eval echo '${'$as_ac_var'}'` ++ { echo "$as_me:$LINENO: result: $ac_res" >&5 ++echo "${ECHO_T}$ac_res" >&6; } ++if test `eval echo '${'$as_ac_var'}'` = yes; then ++ cat >>confdefs.h <<_ACEOF ++#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++_ACEOF ++ ++fi ++done ++ ++ ++if test "$enable_fnmatch" = yes; then ++ use_fnmatch= ++ ++for ac_func in fnmatch ++do ++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` ++{ echo "$as_me:$LINENO: checking for $ac_func" >&5 ++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } ++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++/* Define $ac_func to an innocuous variant, in case declares $ac_func. ++ For example, HP-UX 11i declares gettimeofday. */ ++#define $ac_func innocuous_$ac_func ++ ++/* System header to define __stub macros and hopefully few prototypes, ++ which can conflict with char $ac_func (); below. ++ Prefer to if __STDC__ is defined, since ++ exists even on freestanding compilers. */ ++ ++#ifdef __STDC__ ++# include + #else +-char (*f) () = $ac_func; ++# include + #endif ++ ++#undef $ac_func ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus +-} ++extern "C" ++#endif ++char $ac_func (); ++/* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++#if defined __stub_$ac_func || defined __stub___$ac_func ++choke me + #endif + + int + main () + { +-return f != $ac_func; ++return $ac_func (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then ++ eval "$as_ac_var=yes" ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ eval "$as_ac_var=no" ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext ++fi ++ac_res=`eval echo '${'$as_ac_var'}'` ++ { echo "$as_me:$LINENO: result: $ac_res" >&5 ++echo "${ECHO_T}$ac_res" >&6; } ++if test `eval echo '${'$as_ac_var'}'` = yes; then ++ cat >>confdefs.h <<_ACEOF ++#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++_ACEOF ++ use_fnmatch=yes ++fi ++done ++ ++fi ++ ++if test "$use_fnmatch" = yes && test "$enable_glob" = yes; then ++ ++for ac_func in glob ++do ++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` ++{ echo "$as_me:$LINENO: checking for $ac_func" >&5 ++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } ++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++/* Define $ac_func to an innocuous variant, in case declares $ac_func. ++ For example, HP-UX 11i declares gettimeofday. */ ++#define $ac_func innocuous_$ac_func ++ ++/* System header to define __stub macros and hopefully few prototypes, ++ which can conflict with char $ac_func (); below. ++ Prefer to if __STDC__ is defined, since ++ exists even on freestanding compilers. */ ++ ++#ifdef __STDC__ ++# include ++#else ++# include ++#endif ++ ++#undef $ac_func ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char $ac_func (); ++/* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++#if defined __stub_$ac_func || defined __stub___$ac_func ++choke me ++#endif ++ ++int ++main () ++{ ++return $ac_func (); ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-eval "$as_ac_var=no" ++ eval "$as_ac_var=no" + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 ++ac_res=`eval echo '${'$as_ac_var'}'` ++ { echo "$as_me:$LINENO: result: $ac_res" >&5 ++echo "${ECHO_T}$ac_res" >&6; } + if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF + #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +@@ -3029,9 +3687,10 @@ _ACEOF + fi + done + ++fi + +-echo "$as_me:$LINENO: checking for signal" >&5 +-echo $ECHO_N "checking for signal... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for signal" >&5 ++echo $ECHO_N "checking for signal... $ECHO_C" >&6; } + if test "${ac_cv_func_signal+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -3058,71 +3717,63 @@ cat >>conftest.$ac_ext <<_ACEOF + + #undef signal + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" +-{ + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char signal (); + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +-#if defined (__stub_signal) || defined (__stub___signal) ++#if defined __stub_signal || defined __stub___signal + choke me +-#else +-char (*f) () = signal; +-#endif +-#ifdef __cplusplus +-} + #endif + + int + main () + { +-return f != signal; ++return signal (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_func_signal=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_func_signal=no ++ ac_cv_func_signal=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: $ac_cv_func_signal" >&5 +-echo "${ECHO_T}$ac_cv_func_signal" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_func_signal" >&5 ++echo "${ECHO_T}$ac_cv_func_signal" >&6; } + + if test "$ac_cv_func_signal" != yes; then +- echo "$as_me:$LINENO: checking for bsd_signal" >&5 +-echo $ECHO_N "checking for bsd_signal... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for bsd_signal" >&5 ++echo $ECHO_N "checking for bsd_signal... $ECHO_C" >&6; } + if test "${ac_cv_func_bsd_signal+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -3149,67 +3800,59 @@ cat >>conftest.$ac_ext <<_ACEOF + + #undef bsd_signal + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" +-{ + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char bsd_signal (); + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +-#if defined (__stub_bsd_signal) || defined (__stub___bsd_signal) ++#if defined __stub_bsd_signal || defined __stub___bsd_signal + choke me +-#else +-char (*f) () = bsd_signal; +-#endif +-#ifdef __cplusplus +-} + #endif + + int + main () + { +-return f != bsd_signal; ++return bsd_signal (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_func_bsd_signal=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_func_bsd_signal=no ++ ac_cv_func_bsd_signal=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: $ac_cv_func_bsd_signal" >&5 +-echo "${ECHO_T}$ac_cv_func_bsd_signal" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_func_bsd_signal" >&5 ++echo "${ECHO_T}$ac_cv_func_bsd_signal" >&6; } + if test $ac_cv_func_bsd_signal = yes; then + + cat >>confdefs.h <<\_ACEOF +@@ -3220,8 +3863,8 @@ fi + + fi + +-echo "$as_me:$LINENO: checking for stat64" >&5 +-echo $ECHO_N "checking for stat64... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for stat64" >&5 ++echo $ECHO_N "checking for stat64... $ECHO_C" >&6; } + if test "${ac_cv_func_stat64+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -3248,67 +3891,59 @@ cat >>conftest.$ac_ext <<_ACEOF + + #undef stat64 + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" +-{ + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char stat64 (); + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +-#if defined (__stub_stat64) || defined (__stub___stat64) ++#if defined __stub_stat64 || defined __stub___stat64 + choke me +-#else +-char (*f) () = stat64; +-#endif +-#ifdef __cplusplus +-} + #endif + + int + main () + { +-return f != stat64; ++return stat64 (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_func_stat64=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_func_stat64=no ++ ac_cv_func_stat64=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: $ac_cv_func_stat64" >&5 +-echo "${ECHO_T}$ac_cv_func_stat64" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_func_stat64" >&5 ++echo "${ECHO_T}$ac_cv_func_stat64" >&6; } + if test $ac_cv_func_stat64 = yes; then + : + else +@@ -3338,11 +3973,11 @@ fi + + + +-# Check whether --with-libedit or --without-libedit was given. ++# Check whether --with-libedit was given. + if test "${with_libedit+set}" = set; then +- withval="$with_libedit" ++ withval=$with_libedit; ++fi + +-fi; + use_libedit= + if test "$with_libedit" = "yes"; then + ac_ext=c +@@ -3350,8 +3985,8 @@ ac_cpp='$CPP $CPPFLAGS' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu +-echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 ++echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } + # On Suns, sometimes $CPP names a directory. + if test -n "$CPP" && test -d "$CPP"; then + CPP= +@@ -3385,24 +4020,22 @@ cat >>conftest.$ac_ext <<_ACEOF + #endif + Syntax error + _ACEOF +-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 +- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null; then +- if test -s conftest.err; then +- ac_cpp_err=$ac_c_preproc_warn_flag +- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag +- else +- ac_cpp_err= +- fi +-else +- ac_cpp_err=yes +-fi +-if test -z "$ac_cpp_err"; then ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || ++ test ! -s conftest.err ++ }; then + : + else + echo "$as_me: failed program was:" >&5 +@@ -3411,9 +4044,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 + # Broken: fails on valid input. + continue + fi ++ + rm -f conftest.err conftest.$ac_ext + +- # OK, works on sane cases. Now check whether non-existent headers ++ # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -3423,24 +4057,22 @@ cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include + _ACEOF +-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 +- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null; then +- if test -s conftest.err; then +- ac_cpp_err=$ac_c_preproc_warn_flag +- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag +- else +- ac_cpp_err= +- fi +-else +- ac_cpp_err=yes +-fi +-if test -z "$ac_cpp_err"; then ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || ++ test ! -s conftest.err ++ }; then + # Broken: success on invalid input. + continue + else +@@ -3451,6 +4083,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 + ac_preproc_ok=: + break + fi ++ + rm -f conftest.err conftest.$ac_ext + + done +@@ -3468,8 +4101,8 @@ fi + else + ac_cv_prog_CPP=$CPP + fi +-echo "$as_me:$LINENO: result: $CPP" >&5 +-echo "${ECHO_T}$CPP" >&6 ++{ echo "$as_me:$LINENO: result: $CPP" >&5 ++echo "${ECHO_T}$CPP" >&6; } + ac_preproc_ok=false + for ac_c_preproc_warn_flag in '' yes + do +@@ -3492,24 +4125,22 @@ cat >>conftest.$ac_ext <<_ACEOF + #endif + Syntax error + _ACEOF +-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 +- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null; then +- if test -s conftest.err; then +- ac_cpp_err=$ac_c_preproc_warn_flag +- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag +- else +- ac_cpp_err= +- fi +-else +- ac_cpp_err=yes +-fi +-if test -z "$ac_cpp_err"; then ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || ++ test ! -s conftest.err ++ }; then + : + else + echo "$as_me: failed program was:" >&5 +@@ -3518,9 +4149,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 + # Broken: fails on valid input. + continue + fi ++ + rm -f conftest.err conftest.$ac_ext + +- # OK, works on sane cases. Now check whether non-existent headers ++ # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -3530,24 +4162,22 @@ cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include + _ACEOF +-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 +- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null; then +- if test -s conftest.err; then +- ac_cpp_err=$ac_c_preproc_warn_flag +- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag +- else +- ac_cpp_err= +- fi +-else +- ac_cpp_err=yes +-fi +-if test -z "$ac_cpp_err"; then ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || ++ test ! -s conftest.err ++ }; then + # Broken: success on invalid input. + continue + else +@@ -3558,6 +4188,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 + ac_preproc_ok=: + break + fi ++ + rm -f conftest.err conftest.$ac_ext + + done +@@ -3580,23 +4211,170 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ + ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +-echo "$as_me:$LINENO: checking for egrep" >&5 +-echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +-if test "${ac_cv_prog_egrep+set}" = set; then ++{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 ++echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } ++if test "${ac_cv_path_GREP+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ # Extract the first word of "grep ggrep" to use in msg output ++if test -z "$GREP"; then ++set dummy grep ggrep; ac_prog_name=$2 ++if test "${ac_cv_path_GREP+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ ac_path_GREP_found=false ++# Loop through the user's path and test for each of PROGNAME-LIST ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_prog in grep ggrep; do ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" ++ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue ++ # Check for GNU ac_path_GREP and select it if it is found. ++ # Check for GNU $ac_path_GREP ++case `"$ac_path_GREP" --version 2>&1` in ++*GNU*) ++ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; ++*) ++ ac_count=0 ++ echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" ++ while : ++ do ++ cat "conftest.in" "conftest.in" >"conftest.tmp" ++ mv "conftest.tmp" "conftest.in" ++ cp "conftest.in" "conftest.nl" ++ echo 'GREP' >> "conftest.nl" ++ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break ++ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ++ ac_count=`expr $ac_count + 1` ++ if test $ac_count -gt ${ac_path_GREP_max-0}; then ++ # Best one so far, save it but keep looking for a better one ++ ac_cv_path_GREP="$ac_path_GREP" ++ ac_path_GREP_max=$ac_count ++ fi ++ # 10*(2^10) chars as input seems more than enough ++ test $ac_count -gt 10 && break ++ done ++ rm -f conftest.in conftest.tmp conftest.nl conftest.out;; ++esac ++ ++ ++ $ac_path_GREP_found && break 3 ++ done ++done ++ ++done ++IFS=$as_save_IFS ++ ++ ++fi ++ ++GREP="$ac_cv_path_GREP" ++if test -z "$GREP"; then ++ { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 ++echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} ++ { (exit 1); exit 1; }; } ++fi ++ ++else ++ ac_cv_path_GREP=$GREP ++fi ++ ++ ++fi ++{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 ++echo "${ECHO_T}$ac_cv_path_GREP" >&6; } ++ GREP="$ac_cv_path_GREP" ++ ++ ++{ echo "$as_me:$LINENO: checking for egrep" >&5 ++echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } ++if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- if echo a | (grep -E '(a|b)') >/dev/null 2>&1 +- then ac_cv_prog_egrep='grep -E' +- else ac_cv_prog_egrep='egrep' ++ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 ++ then ac_cv_path_EGREP="$GREP -E" ++ else ++ # Extract the first word of "egrep" to use in msg output ++if test -z "$EGREP"; then ++set dummy egrep; ac_prog_name=$2 ++if test "${ac_cv_path_EGREP+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ ac_path_EGREP_found=false ++# Loop through the user's path and test for each of PROGNAME-LIST ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_prog in egrep; do ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" ++ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue ++ # Check for GNU ac_path_EGREP and select it if it is found. ++ # Check for GNU $ac_path_EGREP ++case `"$ac_path_EGREP" --version 2>&1` in ++*GNU*) ++ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; ++*) ++ ac_count=0 ++ echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" ++ while : ++ do ++ cat "conftest.in" "conftest.in" >"conftest.tmp" ++ mv "conftest.tmp" "conftest.in" ++ cp "conftest.in" "conftest.nl" ++ echo 'EGREP' >> "conftest.nl" ++ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break ++ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ++ ac_count=`expr $ac_count + 1` ++ if test $ac_count -gt ${ac_path_EGREP_max-0}; then ++ # Best one so far, save it but keep looking for a better one ++ ac_cv_path_EGREP="$ac_path_EGREP" ++ ac_path_EGREP_max=$ac_count + fi ++ # 10*(2^10) chars as input seems more than enough ++ test $ac_count -gt 10 && break ++ done ++ rm -f conftest.in conftest.tmp conftest.nl conftest.out;; ++esac ++ ++ ++ $ac_path_EGREP_found && break 3 ++ done ++done ++ ++done ++IFS=$as_save_IFS ++ ++ ++fi ++ ++EGREP="$ac_cv_path_EGREP" ++if test -z "$EGREP"; then ++ { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 ++echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} ++ { (exit 1); exit 1; }; } ++fi ++ ++else ++ ac_cv_path_EGREP=$EGREP ++fi ++ ++ ++ fi + fi +-echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +-echo "${ECHO_T}$ac_cv_prog_egrep" >&6 +- EGREP=$ac_cv_prog_egrep ++{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 ++echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } ++ EGREP="$ac_cv_path_EGREP" + + +-echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 ++echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } + if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -3620,34 +4398,31 @@ main () + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_cv_header_stdc=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_header_stdc=no ++ ac_cv_header_stdc=no + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. +@@ -3703,6 +4478,7 @@ cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include ++#include + #if ((' ' & 0x0FF) == 0x020) + # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') + # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +@@ -3722,18 +4498,27 @@ main () + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) +- exit(2); +- exit (0); ++ return 2; ++ return 0; + } + _ACEOF + rm -f conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++ { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then +@@ -3746,12 +4531,14 @@ sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) + ac_cv_header_stdc=no + fi +-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi ++ ++ + fi + fi +-echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +-echo "${ECHO_T}$ac_cv_header_stdc" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 ++echo "${ECHO_T}$ac_cv_header_stdc" >&6; } + if test $ac_cv_header_stdc = yes; then + + cat >>confdefs.h <<\_ACEOF +@@ -3774,9 +4561,9 @@ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h + do + as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +-echo "$as_me:$LINENO: checking for $ac_header" >&5 +-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +-if eval "test \"\${$as_ac_Header+set}\" = set"; then ++{ echo "$as_me:$LINENO: checking for $ac_header" >&5 ++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } ++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF +@@ -3790,37 +4577,35 @@ $ac_includes_default + #include <$ac_header> + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-eval "$as_ac_Header=no" ++ eval "$as_ac_Header=no" + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ++ac_res=`eval echo '${'$as_ac_Header'}'` ++ { echo "$as_me:$LINENO: result: $ac_res" >&5 ++echo "${ECHO_T}$ac_res" >&6; } + if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF + #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +@@ -3831,8 +4616,8 @@ fi + done + + +-echo "$as_me:$LINENO: checking for history_init in -ledit" >&5 +-echo $ECHO_N "checking for history_init in -ledit... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for history_init in -ledit" >&5 ++echo $ECHO_N "checking for history_init in -ledit... $ECHO_C" >&6; } + if test "${ac_cv_lib_edit_history_init+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -3845,69 +4630,67 @@ cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + +-/* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif +-/* We use char because int might match the return type of a gcc2 +- builtin and then its argument prototype would still apply. */ + char history_init (); + int + main () + { +-history_init (); ++return history_init (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_lib_edit_history_init=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_lib_edit_history_init=no ++ ac_cv_lib_edit_history_init=no + fi +-rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-echo "$as_me:$LINENO: result: $ac_cv_lib_edit_history_init" >&5 +-echo "${ECHO_T}$ac_cv_lib_edit_history_init" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_lib_edit_history_init" >&5 ++echo "${ECHO_T}$ac_cv_lib_edit_history_init" >&6; } + if test $ac_cv_lib_edit_history_init = yes; then + + if test "${ac_cv_header_histedit_h+set}" = set; then +- echo "$as_me:$LINENO: checking for histedit.h" >&5 +-echo $ECHO_N "checking for histedit.h... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for histedit.h" >&5 ++echo $ECHO_N "checking for histedit.h... $ECHO_C" >&6; } + if test "${ac_cv_header_histedit_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + fi +-echo "$as_me:$LINENO: result: $ac_cv_header_histedit_h" >&5 +-echo "${ECHO_T}$ac_cv_header_histedit_h" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_header_histedit_h" >&5 ++echo "${ECHO_T}$ac_cv_header_histedit_h" >&6; } + else + # Is the header compilable? +-echo "$as_me:$LINENO: checking histedit.h usability" >&5 +-echo $ECHO_N "checking histedit.h usability... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking histedit.h usability" >&5 ++echo $ECHO_N "checking histedit.h usability... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF +@@ -3918,40 +4701,37 @@ $ac_includes_default + #include + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>conftest.er1 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 +- ac_status=$? +- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_header_compiler=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_header_compiler=no ++ ac_header_compiler=no + fi +-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-echo "${ECHO_T}$ac_header_compiler" >&6 ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 ++echo "${ECHO_T}$ac_header_compiler" >&6; } + + # Is the header present? +-echo "$as_me:$LINENO: checking histedit.h presence" >&5 +-echo $ECHO_N "checking histedit.h presence... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking histedit.h presence" >&5 ++echo $ECHO_N "checking histedit.h presence... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF +@@ -3960,24 +4740,22 @@ cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include + _ACEOF +-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 +- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null; then +- if test -s conftest.err; then +- ac_cpp_err=$ac_c_preproc_warn_flag +- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag +- else +- ac_cpp_err= +- fi +-else +- ac_cpp_err=yes +-fi +-if test -z "$ac_cpp_err"; then ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || ++ test ! -s conftest.err ++ }; then + ac_header_preproc=yes + else + echo "$as_me: failed program was:" >&5 +@@ -3985,9 +4763,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no + fi ++ + rm -f conftest.err conftest.$ac_ext +-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-echo "${ECHO_T}$ac_header_preproc" >&6 ++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 ++echo "${ECHO_T}$ac_header_preproc" >&6; } + + # So? What about this header? + case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +@@ -4011,25 +4790,18 @@ echo "$as_me: WARNING: histedit.h: section \"Present But Cannot Be Compiled\ + echo "$as_me: WARNING: histedit.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: histedit.h: in the future, the compiler will take precedence" >&5 + echo "$as_me: WARNING: histedit.h: in the future, the compiler will take precedence" >&2;} +- ( +- cat <<\_ASBOX +-## ------------------------------- ## +-## Report this to the dash lists. ## +-## ------------------------------- ## +-_ASBOX +- ) | +- sed "s/^/$as_me: WARNING: /" >&2 ++ + ;; + esac +-echo "$as_me:$LINENO: checking for histedit.h" >&5 +-echo $ECHO_N "checking for histedit.h... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for histedit.h" >&5 ++echo $ECHO_N "checking for histedit.h... $ECHO_C" >&6; } + if test "${ac_cv_header_histedit_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_cv_header_histedit_h=$ac_header_preproc + fi +-echo "$as_me:$LINENO: result: $ac_cv_header_histedit_h" >&5 +-echo "${ECHO_T}$ac_cv_header_histedit_h" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_header_histedit_h" >&5 ++echo "${ECHO_T}$ac_cv_header_histedit_h" >&6; } + + fi + if test $ac_cv_header_histedit_h = yes; then +@@ -4053,7 +4825,7 @@ _ACEOF + else + export LIBS="$LIBS -ledit" + fi +- ac_config_files="$ac_config_files Makefile src/Makefile" ++ac_config_files="$ac_config_files Makefile src/Makefile" + + cat >confcache <<\_ACEOF + # This file is a shell script that caches the results of configure +@@ -4073,39 +4845,58 @@ _ACEOF + + # The following way of writing the cache mishandles newlines in values, + # but we know of no workaround that is simple, portable, and efficient. +-# So, don't put newlines in cache variables' values. ++# So, we kill variables containing newlines. + # Ultrix sh set writes to stderr and can't be redirected directly, + # and sets the high bit in the cache file unless we assign to the vars. +-{ ++( ++ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do ++ eval ac_val=\$$ac_var ++ case $ac_val in #( ++ *${as_nl}*) ++ case $ac_var in #( ++ *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 ++echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; ++ esac ++ case $ac_var in #( ++ _ | IFS | as_nl) ;; #( ++ *) $as_unset $ac_var ;; ++ esac ;; ++ esac ++ done ++ + (set) 2>&1 | +- case `(ac_space=' '; set | grep ac_space) 2>&1` in +- *ac_space=\ *) ++ case $as_nl`(ac_space=' '; set) 2>&1` in #( ++ *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" +- ;; ++ ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. +- sed -n \ +- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ++ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; +- esac; +-} | ++ esac | ++ sort ++) | + sed ' ++ /^ac_cv_env_/b end + t clear +- : clear ++ :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end +- /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ +- : end' >>confcache +-if diff $cache_file confcache >/dev/null 2>&1; then :; else +- if test -w $cache_file; then +- test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" ++ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ ++ :end' >>confcache ++if diff "$cache_file" confcache >/dev/null 2>&1; then :; else ++ if test -w "$cache_file"; then ++ test "x$cache_file" != "x/dev/null" && ++ { echo "$as_me:$LINENO: updating cache $cache_file" >&5 ++echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file + else +- echo "not updating unwritable cache $cache_file" ++ { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 ++echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi + fi + rm -f confcache +@@ -4114,32 +4905,18 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix + # Let make expand exec_prefix. + test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +-# VPATH may cause trouble with some makes, so we remove $(srcdir), +-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +-# trailing colons and then remove the whole line if VPATH becomes empty +-# (actually we leave an empty line to preserve line numbers). +-if test "x$srcdir" = x.; then +- ac_vpsub='/^[ ]*VPATH[ ]*=/{ +-s/:*\$(srcdir):*/:/; +-s/:*\${srcdir}:*/:/; +-s/:*@srcdir@:*/:/; +-s/^\([^=]*=[ ]*\):*/\1/; +-s/:*$//; +-s/^[^=]*=[ ]*$//; +-}' +-fi +- + DEFS=-DHAVE_CONFIG_H + + ac_libobjs= + ac_ltlibobjs= + for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. +- ac_i=`echo "$ac_i" | +- sed 's/\$U\././;s/\.o$//;s/\.obj$//'` +- # 2. Add them. +- ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" +- ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' ++ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ++ ac_i=`echo "$ac_i" | sed "$ac_script"` ++ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR ++ # will be set to the directory where LIBOBJS objects are built. ++ ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ++ ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' + done + LIBOBJS=$ac_libobjs + +@@ -4184,17 +4961,45 @@ cat >>$CONFIG_STATUS <<\_ACEOF + ## M4sh Initialization. ## + ## --------------------- ## + +-# Be Bourne compatible ++# Be more Bourne compatible ++DUALCASE=1; export DUALCASE # for MKS sh + if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then +- set -o posix ++ setopt NO_GLOB_SUBST ++else ++ case `(set -o) 2>/dev/null` in ++ *posix*) set -o posix ;; ++esac ++ ++fi ++ ++ ++ ++ ++# PATH needs CR ++# Avoid depending upon Character Ranges. ++as_cr_letters='abcdefghijklmnopqrstuvwxyz' ++as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' ++as_cr_Letters=$as_cr_letters$as_cr_LETTERS ++as_cr_digits='0123456789' ++as_cr_alnum=$as_cr_Letters$as_cr_digits ++ ++# The user is always right. ++if test "${PATH_SEPARATOR+set}" != set; then ++ echo "#! /bin/sh" >conf$$.sh ++ echo "exit 0" >>conf$$.sh ++ chmod +x conf$$.sh ++ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then ++ PATH_SEPARATOR=';' ++ else ++ PATH_SEPARATOR=: ++ fi ++ rm -f conf$$.sh + fi +-DUALCASE=1; export DUALCASE # for MKS sh + + # Support unset when possible. + if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then +@@ -4204,8 +5009,43 @@ else + fi + + ++# IFS ++# We need space, tab and new line, in precisely that order. Quoting is ++# there to prevent editors from complaining about space-tab. ++# (If _AS_PATH_WALK were called with IFS unset, it would disable word ++# splitting by setting IFS to empty value.) ++as_nl=' ++' ++IFS=" "" $as_nl" ++ ++# Find who we are. Look in the path if we contain no directory separator. ++case $0 in ++ *[\\/]* ) as_myself=$0 ;; ++ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break ++done ++IFS=$as_save_IFS ++ ++ ;; ++esac ++# We did not find ourselves, most probably we were run as `sh COMMAND' ++# in which case we are not to be found in the path. ++if test "x$as_myself" = x; then ++ as_myself=$0 ++fi ++if test ! -f "$as_myself"; then ++ echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 ++ { (exit 1); exit 1; } ++fi ++ + # Work around bugs in pre-3.0 UWIN ksh. +-$as_unset ENV MAIL MAILPATH ++for as_var in ENV MAIL MAILPATH ++do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var ++done + PS1='$ ' + PS2='> ' + PS4='+ ' +@@ -4219,18 +5059,19 @@ do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else +- $as_unset $as_var ++ ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi + done + + # Required to use basename. +-if expr a : '\(a\)' >/dev/null 2>&1; then ++if expr a : '\(a\)' >/dev/null 2>&1 && ++ test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr + else + as_expr=false + fi + +-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then ++if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename + else + as_basename=false +@@ -4238,159 +5079,120 @@ fi + + + # Name of the executable. +-as_me=`$as_basename "$0" || ++as_me=`$as_basename -- "$0" || + $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ +- X"$0" : 'X\(/\)$' \| \ +- . : '\(.\)' 2>/dev/null || ++ X"$0" : 'X\(/\)' \| . 2>/dev/null || + echo X/"$0" | +- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } +- /^X\/\(\/\/\)$/{ s//\1/; q; } +- /^X\/\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` +- ++ sed '/^.*\/\([^/][^/]*\)\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\/\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\/\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'` + +-# PATH needs CR, and LINENO needs CR and PATH. +-# Avoid depending upon Character Ranges. +-as_cr_letters='abcdefghijklmnopqrstuvwxyz' +-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +-as_cr_Letters=$as_cr_letters$as_cr_LETTERS +-as_cr_digits='0123456789' +-as_cr_alnum=$as_cr_Letters$as_cr_digits +- +-# The user is always right. +-if test "${PATH_SEPARATOR+set}" != set; then +- echo "#! /bin/sh" >conf$$.sh +- echo "exit 0" >>conf$$.sh +- chmod +x conf$$.sh +- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then +- PATH_SEPARATOR=';' +- else +- PATH_SEPARATOR=: +- fi +- rm -f conf$$.sh +-fi ++# CDPATH. ++$as_unset CDPATH + + +- as_lineno_1=$LINENO +- as_lineno_2=$LINENO +- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` +- test "x$as_lineno_1" != "x$as_lineno_2" && +- test "x$as_lineno_3" = "x$as_lineno_2" || { +- # Find who we are. Look in the path if we contain no path at all +- # relative or not. +- case $0 in +- *[\\/]* ) as_myself=$0 ;; +- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +-done + +- ;; +- esac +- # We did not find ourselves, most probably we were run as `sh COMMAND' +- # in which case we are not to be found in the path. +- if test "x$as_myself" = x; then +- as_myself=$0 +- fi +- if test ! -f "$as_myself"; then +- { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} +- { (exit 1); exit 1; }; } +- fi +- case $CONFIG_SHELL in +- '') +- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- for as_base in sh bash ksh sh5; do +- case $as_dir in +- /*) +- if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO +- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && +- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then +- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } +- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } +- CONFIG_SHELL=$as_dir/$as_base +- export CONFIG_SHELL +- exec "$CONFIG_SHELL" "$0" ${1+"$@"} +- fi;; +- esac +- done +-done +-;; +- esac ++ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a +- # line-number line before each line; the second 'sed' does the real +- # work. The second script uses 'N' to pair each line-number line +- # with the numbered line, and appends trailing '-' during +- # substitution so that $LINENO is not a special case at line end. ++ # line-number line after each line using $LINENO; the second 'sed' ++ # does the real work. The second script uses 'N' to pair each ++ # line-number line with the line containing $LINENO, and appends ++ # trailing '-' during substitution so that $LINENO is not a special ++ # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the +- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) +- sed '=' <$as_myself | ++ # scripts with optimization help from Paolo Bonzini. Blame Lee ++ # E. McMahon (1931-1989) for sed's syntax. :-) ++ sed -n ' ++ p ++ /[$]LINENO/= ++ ' <$as_myself | + sed ' ++ s/[$]LINENO.*/&-/ ++ t lineno ++ b ++ :lineno + N +- s,$,-, +- : loop +- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, ++ :loop ++ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop +- s,-$,, +- s,^['$as_cr_digits']*\n,, ++ s/-\n.*// + ' >$as_me.lineno && +- chmod +x $as_me.lineno || +- { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +-echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} ++ chmod +x "$as_me.lineno" || ++ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the +- # original and so on. Autoconf is especially sensible to this). +- . ./$as_me.lineno ++ # original and so on. Autoconf is especially sensitive to this). ++ . "./$as_me.lineno" + # Exit status is that of the last command. + exit + } + + +-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in +- *c*,-n*) ECHO_N= ECHO_C=' +-' ECHO_T=' ' ;; +- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; +- *) ECHO_N= ECHO_C='\c' ECHO_T= ;; ++if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then ++ as_dirname=dirname ++else ++ as_dirname=false ++fi ++ ++ECHO_C= ECHO_N= ECHO_T= ++case `echo -n x` in ++-n*) ++ case `echo 'x\c'` in ++ *c*) ECHO_T=' ';; # ECHO_T is single tab character. ++ *) ECHO_C='\c';; ++ esac;; ++*) ++ ECHO_N='-n';; + esac + +-if expr a : '\(a\)' >/dev/null 2>&1; then ++if expr a : '\(a\)' >/dev/null 2>&1 && ++ test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr + else + as_expr=false + fi + + rm -f conf$$ conf$$.exe conf$$.file ++if test -d conf$$.dir; then ++ rm -f conf$$.dir/conf$$.file ++else ++ rm -f conf$$.dir ++ mkdir conf$$.dir ++fi + echo >conf$$.file + if ln -s conf$$.file conf$$ 2>/dev/null; then +- # We could just check for DJGPP; but this test a) works b) is more generic +- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). +- if test -f conf$$.exe; then +- # Don't use ln at all; we don't have any links ++ as_ln_s='ln -s' ++ # ... but there are two gotchas: ++ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. ++ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. ++ # In both cases, we have to default to `cp -p'. ++ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' +- else +- as_ln_s='ln -s' +- fi + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +-rm -f conf$$ conf$$.exe conf$$.file ++rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file ++rmdir conf$$.dir 2>/dev/null + + if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +@@ -4399,7 +5201,28 @@ else + as_mkdir_p=false + fi + +-as_executable_p="test -f" ++if test -x / >/dev/null 2>&1; then ++ as_test_x='test -x' ++else ++ if ls -dL / >/dev/null 2>&1; then ++ as_ls_L_option=L ++ else ++ as_ls_L_option= ++ fi ++ as_test_x=' ++ eval sh -c '\'' ++ if test -d "$1"; then ++ test -d "$1/."; ++ else ++ case $1 in ++ -*)set "./$1";; ++ esac; ++ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ++ ???[sx]*):;;*)false;;esac;fi ++ '\'' sh ++ ' ++fi ++as_executable_p=$as_test_x + + # Sed expression to map a string onto a valid CPP name. + as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" +@@ -4408,31 +5231,14 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +-# IFS +-# We need space, tab and new line, in precisely that order. +-as_nl=' +-' +-IFS=" $as_nl" +- +-# CDPATH. +-$as_unset CDPATH +- + exec 6>&1 + +-# Open the log real soon, to keep \$[0] and so on meaningful, and to ++# Save the log message, to keep $[0] and so on meaningful, and to + # report actual input values of CONFIG_FILES etc. instead of their +-# values after options handling. Logging --version etc. is OK. +-exec 5>>config.log +-{ +- echo +- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +-## Running $as_me. ## +-_ASBOX +-} >&5 +-cat >&5 <<_CSEOF +- ++# values after options handling. ++ac_log=" + This file was extended by dash $as_me 0.5.4, which was +-generated by GNU Autoconf 2.59. Invocation command line was ++generated by GNU Autoconf 2.61. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS +@@ -4440,30 +5246,20 @@ generated by GNU Autoconf 2.59. Invocation command line was + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +-_CSEOF +-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +-echo >&5 ++on `(hostname || uname -n) 2>/dev/null | sed 1q` ++" ++ + _ACEOF + ++cat >>$CONFIG_STATUS <<_ACEOF + # Files that config.status was made for. +-if test -n "$ac_config_files"; then +- echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +-fi +- +-if test -n "$ac_config_headers"; then +- echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +-fi ++config_files="$ac_config_files" ++config_headers="$ac_config_headers" ++config_commands="$ac_config_commands" + +-if test -n "$ac_config_links"; then +- echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +-fi +- +-if test -n "$ac_config_commands"; then +- echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +-fi ++_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF +- + ac_cs_usage="\ + \`$as_me' instantiates files from templates according to the + current configuration. +@@ -4471,7 +5267,7 @@ current configuration. + Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit +- -V, --version print version number, then exit ++ -V, --version print version number and configuration settings, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions +@@ -4490,19 +5286,21 @@ Configuration commands: + $config_commands + + Report bugs to ." +-_ACEOF + ++_ACEOF + cat >>$CONFIG_STATUS <<_ACEOF + ac_cs_version="\\ + dash config.status 0.5.4 +-configured by $0, generated by GNU Autoconf 2.59, +- with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" ++configured by $0, generated by GNU Autoconf 2.61, ++ with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" + +-Copyright (C) 2003 Free Software Foundation, Inc. ++Copyright (C) 2006 Free Software Foundation, Inc. + This config.status script is free software; the Free Software Foundation + gives unlimited permission to copy, distribute and modify it." +-srcdir=$srcdir +-INSTALL="$INSTALL" ++ ++ac_pwd='$ac_pwd' ++srcdir='$srcdir' ++INSTALL='$INSTALL' + _ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF +@@ -4513,39 +5311,24 @@ while test $# != 0 + do + case $1 in + --*=*) +- ac_option=`expr "x$1" : 'x\([^=]*\)='` +- ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ++ ac_option=`expr "X$1" : 'X\([^=]*\)='` ++ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; +- -*) ++ *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; +- *) # This is not an option, so the user has probably given explicit +- # arguments. +- ac_option=$1 +- ac_need_defaults=false;; + esac + + case $ac_option in + # Handling of the options. +-_ACEOF +-cat >>$CONFIG_STATUS <<\_ACEOF + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; +- --version | --vers* | -V ) +- echo "$ac_cs_version"; exit 0 ;; +- --he | --h) +- # Conflict between --help and --header +- { { echo "$as_me:$LINENO: error: ambiguous option: $1 +-Try \`$0 --help' for more information." >&5 +-echo "$as_me: error: ambiguous option: $1 +-Try \`$0 --help' for more information." >&2;} +- { (exit 1); exit 1; }; };; +- --help | --hel | -h ) +- echo "$ac_cs_usage"; exit 0 ;; +- --debug | --d* | -d ) ++ --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) ++ echo "$ac_cs_version"; exit ;; ++ --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift +@@ -4555,18 +5338,24 @@ Try \`$0 --help' for more information." >&2;} + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; ++ --he | --h) ++ # Conflict between --help and --header ++ { echo "$as_me: error: ambiguous option: $1 ++Try \`$0 --help' for more information." >&2 ++ { (exit 1); exit 1; }; };; ++ --help | --hel | -h ) ++ echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. +- -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +-Try \`$0 --help' for more information." >&5 +-echo "$as_me: error: unrecognized option: $1 +-Try \`$0 --help' for more information." >&2;} ++ -*) { echo "$as_me: error: unrecognized option: $1 ++Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + +- *) ac_config_targets="$ac_config_targets $1" ;; ++ *) ac_config_targets="$ac_config_targets $1" ++ ac_need_defaults=false ;; + + esac + shift +@@ -4582,38 +5371,50 @@ fi + _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF + if \$ac_cs_recheck; then +- echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 +- exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion ++ echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 ++ CONFIG_SHELL=$SHELL ++ export CONFIG_SHELL ++ exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + fi + + _ACEOF ++cat >>$CONFIG_STATUS <<\_ACEOF ++exec 5>>config.log ++{ ++ echo ++ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ++## Running $as_me. ## ++_ASBOX ++ echo "$ac_log" ++} >&5 + ++_ACEOF + cat >>$CONFIG_STATUS <<_ACEOF + # +-# INIT-COMMANDS section. ++# INIT-COMMANDS + # +- + AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + + _ACEOF + +- +- + cat >>$CONFIG_STATUS <<\_ACEOF ++ ++# Handling of arguments. + for ac_config_target in $ac_config_targets + do +- case "$ac_config_target" in +- # Handling of arguments. +- "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; +- "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; +- "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; +- "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; ++ case $ac_config_target in ++ "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; ++ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; ++ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; ++ "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; ++ + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 + echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac + done + ++ + # If the user did not use the arguments to specify the items to instantiate, + # then the envvar interface is used. Set only those that are not. + # We use the long form for the default assignment because of an extremely +@@ -4625,578 +5426,527 @@ if $ac_need_defaults; then + fi + + # Have a temporary directory for convenience. Make it in the build tree +-# simply because there is no reason to put it here, and in addition, ++# simply because there is no reason against having it here, and in addition, + # creating and moving files from /tmp can sometimes cause problems. +-# Create a temporary directory, and hook for its removal unless debugging. ++# Hook for its removal unless debugging. ++# Note that there is a small window in which the directory will not be cleaned: ++# after its creation but before its name has been assigned to `$tmp'. + $debug || + { +- trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 ++ tmp= ++ trap 'exit_status=$? ++ { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ++' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 + } +- + # Create a (secure) tmp directory for tmp files. + + { +- tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && ++ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" + } || + { +- tmp=./confstat$$-$RANDOM +- (umask 077 && mkdir $tmp) ++ tmp=./conf$$-$RANDOM ++ (umask 077 && mkdir "$tmp") + } || + { + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } + } + +-_ACEOF +- +-cat >>$CONFIG_STATUS <<_ACEOF +- + # +-# CONFIG_FILES section. ++# Set up the sed scripts for CONFIG_FILES section. + # + + # No need to generate the scripts if there are no CONFIG_FILES. + # This happens for instance when ./config.status config.h +-if test -n "\$CONFIG_FILES"; then +- # Protect against being on the right side of a sed subst in config.status. +- sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; +- s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +-s,@SHELL@,$SHELL,;t t +-s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +-s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +-s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +-s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +-s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +-s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +-s,@exec_prefix@,$exec_prefix,;t t +-s,@prefix@,$prefix,;t t +-s,@program_transform_name@,$program_transform_name,;t t +-s,@bindir@,$bindir,;t t +-s,@sbindir@,$sbindir,;t t +-s,@libexecdir@,$libexecdir,;t t +-s,@datadir@,$datadir,;t t +-s,@sysconfdir@,$sysconfdir,;t t +-s,@sharedstatedir@,$sharedstatedir,;t t +-s,@localstatedir@,$localstatedir,;t t +-s,@libdir@,$libdir,;t t +-s,@includedir@,$includedir,;t t +-s,@oldincludedir@,$oldincludedir,;t t +-s,@infodir@,$infodir,;t t +-s,@mandir@,$mandir,;t t +-s,@build_alias@,$build_alias,;t t +-s,@host_alias@,$host_alias,;t t +-s,@target_alias@,$target_alias,;t t +-s,@DEFS@,$DEFS,;t t +-s,@ECHO_C@,$ECHO_C,;t t +-s,@ECHO_N@,$ECHO_N,;t t +-s,@ECHO_T@,$ECHO_T,;t t +-s,@LIBS@,$LIBS,;t t +-s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t +-s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t +-s,@INSTALL_DATA@,$INSTALL_DATA,;t t +-s,@CYGPATH_W@,$CYGPATH_W,;t t +-s,@PACKAGE@,$PACKAGE,;t t +-s,@VERSION@,$VERSION,;t t +-s,@ACLOCAL@,$ACLOCAL,;t t +-s,@AUTOCONF@,$AUTOCONF,;t t +-s,@AUTOMAKE@,$AUTOMAKE,;t t +-s,@AUTOHEADER@,$AUTOHEADER,;t t +-s,@MAKEINFO@,$MAKEINFO,;t t +-s,@install_sh@,$install_sh,;t t +-s,@STRIP@,$STRIP,;t t +-s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t +-s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t +-s,@mkdir_p@,$mkdir_p,;t t +-s,@AWK@,$AWK,;t t +-s,@SET_MAKE@,$SET_MAKE,;t t +-s,@am__leading_dot@,$am__leading_dot,;t t +-s,@AMTAR@,$AMTAR,;t t +-s,@am__tar@,$am__tar,;t t +-s,@am__untar@,$am__untar,;t t +-s,@CC@,$CC,;t t +-s,@CFLAGS@,$CFLAGS,;t t +-s,@LDFLAGS@,$LDFLAGS,;t t +-s,@CPPFLAGS@,$CPPFLAGS,;t t +-s,@ac_ct_CC@,$ac_ct_CC,;t t +-s,@EXEEXT@,$EXEEXT,;t t +-s,@OBJEXT@,$OBJEXT,;t t +-s,@DEPDIR@,$DEPDIR,;t t +-s,@am__include@,$am__include,;t t +-s,@am__quote@,$am__quote,;t t +-s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t +-s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t +-s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t +-s,@CCDEPMODE@,$CCDEPMODE,;t t +-s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t +-s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t +-s,@YACC@,$YACC,;t t +-s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t +-s,@CPP@,$CPP,;t t +-s,@EGREP@,$EGREP,;t t +-s,@LIBOBJS@,$LIBOBJS,;t t +-s,@LTLIBOBJS@,$LTLIBOBJS,;t t +-CEOF ++if test -n "$CONFIG_FILES"; then + + _ACEOF + +- cat >>$CONFIG_STATUS <<\_ACEOF +- # Split the substitutions into bite-sized pieces for seds with +- # small command number limits, like on Digital OSF/1 and HP-UX. +- ac_max_sed_lines=48 +- ac_sed_frag=1 # Number of current file. +- ac_beg=1 # First line for current file. +- ac_end=$ac_max_sed_lines # Line after last line for current file. +- ac_more_lines=: +- ac_sed_cmds= +- while $ac_more_lines; do +- if test $ac_beg -gt 1; then +- sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag +- else +- sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag +- fi +- if test ! -s $tmp/subs.frag; then +- ac_more_lines=false +- else +- # The purpose of the label and of the branching condition is to +- # speed up the sed processing (if there are no `@' at all, there +- # is no need to browse any of the substitutions). +- # These are the two extra sed commands mentioned above. +- (echo ':t +- /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed +- if test -z "$ac_sed_cmds"; then +- ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" +- else +- ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" +- fi +- ac_sed_frag=`expr $ac_sed_frag + 1` +- ac_beg=$ac_end +- ac_end=`expr $ac_end + $ac_max_sed_lines` +- fi +- done +- if test -z "$ac_sed_cmds"; then +- ac_sed_cmds=cat ++ ++ ++ac_delim='%!_!# ' ++for ac_last_try in false false false false false :; do ++ cat >conf$$subs.sed <<_ACEOF ++SHELL!$SHELL$ac_delim ++PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim ++PACKAGE_NAME!$PACKAGE_NAME$ac_delim ++PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim ++PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim ++PACKAGE_STRING!$PACKAGE_STRING$ac_delim ++PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim ++exec_prefix!$exec_prefix$ac_delim ++prefix!$prefix$ac_delim ++program_transform_name!$program_transform_name$ac_delim ++bindir!$bindir$ac_delim ++sbindir!$sbindir$ac_delim ++libexecdir!$libexecdir$ac_delim ++datarootdir!$datarootdir$ac_delim ++datadir!$datadir$ac_delim ++sysconfdir!$sysconfdir$ac_delim ++sharedstatedir!$sharedstatedir$ac_delim ++localstatedir!$localstatedir$ac_delim ++includedir!$includedir$ac_delim ++oldincludedir!$oldincludedir$ac_delim ++docdir!$docdir$ac_delim ++infodir!$infodir$ac_delim ++htmldir!$htmldir$ac_delim ++dvidir!$dvidir$ac_delim ++pdfdir!$pdfdir$ac_delim ++psdir!$psdir$ac_delim ++libdir!$libdir$ac_delim ++localedir!$localedir$ac_delim ++mandir!$mandir$ac_delim ++DEFS!$DEFS$ac_delim ++ECHO_C!$ECHO_C$ac_delim ++ECHO_N!$ECHO_N$ac_delim ++ECHO_T!$ECHO_T$ac_delim ++LIBS!$LIBS$ac_delim ++build_alias!$build_alias$ac_delim ++host_alias!$host_alias$ac_delim ++target_alias!$target_alias$ac_delim ++INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim ++INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim ++INSTALL_DATA!$INSTALL_DATA$ac_delim ++CYGPATH_W!$CYGPATH_W$ac_delim ++PACKAGE!$PACKAGE$ac_delim ++VERSION!$VERSION$ac_delim ++ACLOCAL!$ACLOCAL$ac_delim ++AUTOCONF!$AUTOCONF$ac_delim ++AUTOMAKE!$AUTOMAKE$ac_delim ++AUTOHEADER!$AUTOHEADER$ac_delim ++MAKEINFO!$MAKEINFO$ac_delim ++install_sh!$install_sh$ac_delim ++STRIP!$STRIP$ac_delim ++INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim ++mkdir_p!$mkdir_p$ac_delim ++AWK!$AWK$ac_delim ++SET_MAKE!$SET_MAKE$ac_delim ++am__leading_dot!$am__leading_dot$ac_delim ++AMTAR!$AMTAR$ac_delim ++am__tar!$am__tar$ac_delim ++am__untar!$am__untar$ac_delim ++CC!$CC$ac_delim ++CFLAGS!$CFLAGS$ac_delim ++LDFLAGS!$LDFLAGS$ac_delim ++CPPFLAGS!$CPPFLAGS$ac_delim ++ac_ct_CC!$ac_ct_CC$ac_delim ++EXEEXT!$EXEEXT$ac_delim ++OBJEXT!$OBJEXT$ac_delim ++DEPDIR!$DEPDIR$ac_delim ++am__include!$am__include$ac_delim ++am__quote!$am__quote$ac_delim ++AMDEP_TRUE!$AMDEP_TRUE$ac_delim ++AMDEP_FALSE!$AMDEP_FALSE$ac_delim ++AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim ++CCDEPMODE!$CCDEPMODE$ac_delim ++am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim ++am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim ++YACC!$YACC$ac_delim ++YFLAGS!$YFLAGS$ac_delim ++CC_FOR_BUILD!$CC_FOR_BUILD$ac_delim ++CPP!$CPP$ac_delim ++GREP!$GREP$ac_delim ++EGREP!$EGREP$ac_delim ++LIBOBJS!$LIBOBJS$ac_delim ++LTLIBOBJS!$LTLIBOBJS$ac_delim ++_ACEOF ++ ++ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 82; then ++ break ++ elif $ac_last_try; then ++ { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 ++echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} ++ { (exit 1); exit 1; }; } ++ else ++ ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +-fi # test -n "$CONFIG_FILES" ++done ++ ++ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` ++if test -n "$ac_eof"; then ++ ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ++ ac_eof=`expr $ac_eof + 1` ++fi + ++cat >>$CONFIG_STATUS <<_ACEOF ++cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof ++/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end ++_ACEOF ++sed ' ++s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g ++s/^/s,@/; s/!/@,|#_!!_#|/ ++:n ++t n ++s/'"$ac_delim"'$/,g/; t ++s/$/\\/; p ++N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ++' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF ++:end ++s/|#_!!_#|//g ++CEOF$ac_eof + _ACEOF ++ ++ ++# VPATH may cause trouble with some makes, so we remove $(srcdir), ++# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and ++# trailing colons and then remove the whole line if VPATH becomes empty ++# (actually we leave an empty line to preserve line numbers). ++if test "x$srcdir" = x.; then ++ ac_vpsub='/^[ ]*VPATH[ ]*=/{ ++s/:*\$(srcdir):*/:/ ++s/:*\${srcdir}:*/:/ ++s/:*@srcdir@:*/:/ ++s/^\([^=]*=[ ]*\):*/\1/ ++s/:*$// ++s/^[^=]*=[ ]*$// ++}' ++fi ++ + cat >>$CONFIG_STATUS <<\_ACEOF +-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue +- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". +- case $ac_file in +- - | *:- | *:-:* ) # input from stdin +- cat >$tmp/stdin +- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` +- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; +- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` +- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; +- * ) ac_file_in=$ac_file.in ;; ++fi # test -n "$CONFIG_FILES" ++ ++ ++for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS ++do ++ case $ac_tag in ++ :[FHLC]) ac_mode=$ac_tag; continue;; + esac ++ case $ac_mode$ac_tag in ++ :[FHL]*:*);; ++ :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 ++echo "$as_me: error: Invalid tag $ac_tag." >&2;} ++ { (exit 1); exit 1; }; };; ++ :[FH]-) ac_tag=-:-;; ++ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; ++ esac ++ ac_save_IFS=$IFS ++ IFS=: ++ set x $ac_tag ++ IFS=$ac_save_IFS ++ shift ++ ac_file=$1 ++ shift ++ ++ case $ac_mode in ++ :L) ac_source=$1;; ++ :[FH]) ++ ac_file_inputs= ++ for ac_f ++ do ++ case $ac_f in ++ -) ac_f="$tmp/stdin";; ++ *) # Look for the file first in the build tree, then in the source tree ++ # (if the path is not absolute). The absolute path cannot be DOS-style, ++ # because $ac_f cannot contain `:'. ++ test -f "$ac_f" || ++ case $ac_f in ++ [\\/$]*) false;; ++ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; ++ esac || ++ { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 ++echo "$as_me: error: cannot find input file: $ac_f" >&2;} ++ { (exit 1); exit 1; }; };; ++ esac ++ ac_file_inputs="$ac_file_inputs $ac_f" ++ done + +- # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. +- ac_dir=`(dirname "$ac_file") 2>/dev/null || ++ # Let's still pretend it is `configure' which instantiates (i.e., don't ++ # use $as_me), people would be surprised to read: ++ # /* config.h. Generated by config.status. */ ++ configure_input="Generated from "`IFS=: ++ echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." ++ if test x"$ac_file" != x-; then ++ configure_input="$ac_file. $configure_input" ++ { echo "$as_me:$LINENO: creating $ac_file" >&5 ++echo "$as_me: creating $ac_file" >&6;} ++ fi ++ ++ case $ac_tag in ++ *:-:* | *:-) cat >"$tmp/stdin";; ++ esac ++ ;; ++ esac ++ ++ ac_dir=`$as_dirname -- "$ac_file" || + $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ +- X"$ac_file" : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || ++ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || + echo X"$ac_file" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` +- { if $as_mkdir_p; then +- mkdir -p "$ac_dir" +- else +- as_dir="$ac_dir" ++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)[^/].*/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'` ++ { as_dir="$ac_dir" ++ case $as_dir in #( ++ -*) as_dir=./$as_dir;; ++ esac ++ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= +- while test ! -d "$as_dir"; do +- as_dirs="$as_dir $as_dirs" +- as_dir=`(dirname "$as_dir") 2>/dev/null || ++ while :; do ++ case $as_dir in #( ++ *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( ++ *) as_qdir=$as_dir;; ++ esac ++ as_dirs="'$as_qdir' $as_dirs" ++ as_dir=`$as_dirname -- "$as_dir" || + $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ +- X"$as_dir" : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || ++ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || + echo X"$as_dir" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` ++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)[^/].*/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'` ++ test -d "$as_dir" && break + done +- test ! -n "$as_dirs" || mkdir $as_dirs +- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} ++ test -z "$as_dirs" || eval "mkdir $as_dirs" ++ } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 ++echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } +- + ac_builddir=. + +-if test "$ac_dir" != .; then ++case "$ac_dir" in ++.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; ++*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` +- # A "../" for each directory in $ac_dir_suffix. +- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +-else +- ac_dir_suffix= ac_top_builddir= +-fi ++ # A ".." for each directory in $ac_dir_suffix. ++ ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` ++ case $ac_top_builddir_sub in ++ "") ac_top_builddir_sub=. ac_top_build_prefix= ;; ++ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; ++ esac ;; ++esac ++ac_abs_top_builddir=$ac_pwd ++ac_abs_builddir=$ac_pwd$ac_dir_suffix ++# for backward compatibility: ++ac_top_builddir=$ac_top_build_prefix + + case $srcdir in +- .) # No --srcdir option. We are building in place. ++ .) # We are building in place. + ac_srcdir=. +- if test -z "$ac_top_builddir"; then +- ac_top_srcdir=. +- else +- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` +- fi ;; +- [\\/]* | ?:[\\/]* ) # Absolute path. ++ ac_top_srcdir=$ac_top_builddir_sub ++ ac_abs_top_srcdir=$ac_pwd ;; ++ [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; +- ac_top_srcdir=$srcdir ;; +- *) # Relative path. +- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix +- ac_top_srcdir=$ac_top_builddir$srcdir ;; ++ ac_top_srcdir=$srcdir ++ ac_abs_top_srcdir=$srcdir ;; ++ *) # Relative name. ++ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ++ ac_top_srcdir=$ac_top_build_prefix$srcdir ++ ac_abs_top_srcdir=$ac_pwd/$srcdir ;; + esac ++ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + +-# Do not use `cd foo && pwd` to compute absolute paths, because +-# the directories may not exist. +-case `pwd` in +-.) ac_abs_builddir="$ac_dir";; +-*) +- case "$ac_dir" in +- .) ac_abs_builddir=`pwd`;; +- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; +- *) ac_abs_builddir=`pwd`/"$ac_dir";; +- esac;; +-esac +-case $ac_abs_builddir in +-.) ac_abs_top_builddir=${ac_top_builddir}.;; +-*) +- case ${ac_top_builddir}. in +- .) ac_abs_top_builddir=$ac_abs_builddir;; +- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; +- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; +- esac;; +-esac +-case $ac_abs_builddir in +-.) ac_abs_srcdir=$ac_srcdir;; +-*) +- case $ac_srcdir in +- .) ac_abs_srcdir=$ac_abs_builddir;; +- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; +- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; +- esac;; +-esac +-case $ac_abs_builddir in +-.) ac_abs_top_srcdir=$ac_top_srcdir;; +-*) +- case $ac_top_srcdir in +- .) ac_abs_top_srcdir=$ac_abs_builddir;; +- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; +- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; +- esac;; +-esac + ++ case $ac_mode in ++ :F) ++ # ++ # CONFIG_FILE ++ # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; +- *) ac_INSTALL=$ac_top_builddir$INSTALL ;; ++ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac ++_ACEOF + +- # Let's still pretend it is `configure' which instantiates (i.e., don't +- # use $as_me), people would be surprised to read: +- # /* config.h. Generated by config.status. */ +- if test x"$ac_file" = x-; then +- configure_input= +- else +- configure_input="$ac_file. " +- fi +- configure_input=$configure_input"Generated from `echo $ac_file_in | +- sed 's,.*/,,'` by configure." +- +- # First look for the input files in the build tree, otherwise in the +- # src tree. +- ac_file_inputs=`IFS=: +- for f in $ac_file_in; do +- case $f in +- -) echo $tmp/stdin ;; +- [\\/$]*) +- # Absolute (can't be DOS-style, as IFS=:) +- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +-echo "$as_me: error: cannot find input file: $f" >&2;} +- { (exit 1); exit 1; }; } +- echo "$f";; +- *) # Relative +- if test -f "$f"; then +- # Build tree +- echo "$f" +- elif test -f "$srcdir/$f"; then +- # Source tree +- echo "$srcdir/$f" +- else +- # /dev/null tree +- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +-echo "$as_me: error: cannot find input file: $f" >&2;} +- { (exit 1); exit 1; }; } +- fi;; +- esac +- done` || { (exit 1); exit 1; } ++cat >>$CONFIG_STATUS <<\_ACEOF ++# If the template does not know about datarootdir, expand it. ++# FIXME: This hack should be removed a few years after 2.60. ++ac_datarootdir_hack=; ac_datarootdir_seen= + +- if test x"$ac_file" != x-; then +- { echo "$as_me:$LINENO: creating $ac_file" >&5 +-echo "$as_me: creating $ac_file" >&6;} +- rm -f "$ac_file" +- fi ++case `sed -n '/datarootdir/ { ++ p ++ q ++} ++/@datadir@/p ++/@docdir@/p ++/@infodir@/p ++/@localedir@/p ++/@mandir@/p ++' $ac_file_inputs` in ++*datarootdir*) ac_datarootdir_seen=yes;; ++*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) ++ { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 ++echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF ++ ac_datarootdir_hack=' ++ s&@datadir@&$datadir&g ++ s&@docdir@&$docdir&g ++ s&@infodir@&$infodir&g ++ s&@localedir@&$localedir&g ++ s&@mandir@&$mandir&g ++ s&\\\${datarootdir}&$datarootdir&g' ;; ++esac ++_ACEOF ++ ++# Neutralize VPATH when `$srcdir' = `.'. ++# Shell code in configure.ac might set extrasub. ++# FIXME: do we really want to maintain this feature? ++cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub + $extrasub + _ACEOF + cat >>$CONFIG_STATUS <<\_ACEOF + :t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b +-s,@configure_input@,$configure_input,;t t +-s,@srcdir@,$ac_srcdir,;t t +-s,@abs_srcdir@,$ac_abs_srcdir,;t t +-s,@top_srcdir@,$ac_top_srcdir,;t t +-s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +-s,@builddir@,$ac_builddir,;t t +-s,@abs_builddir@,$ac_abs_builddir,;t t +-s,@top_builddir@,$ac_top_builddir,;t t +-s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +-s,@INSTALL@,$ac_INSTALL,;t t +-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out +- rm -f $tmp/stdin +- if test x"$ac_file" != x-; then +- mv $tmp/out $ac_file +- else +- cat $tmp/out +- rm -f $tmp/out +- fi +- +-done +-_ACEOF +-cat >>$CONFIG_STATUS <<\_ACEOF +- +-# +-# CONFIG_HEADER section. +-# +- +-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +-# NAME is the cpp macro being defined and VALUE is the value it is being given. +-# +-# ac_d sets the value in "#define NAME VALUE" lines. +-ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +-ac_dB='[ ].*$,\1#\2' +-ac_dC=' ' +-ac_dD=',;t' +-# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +-ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +-ac_uB='$,\1#\2define\3' +-ac_uC=' ' +-ac_uD=',;t' +- +-for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue +- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". ++s&@configure_input@&$configure_input&;t t ++s&@top_builddir@&$ac_top_builddir_sub&;t t ++s&@srcdir@&$ac_srcdir&;t t ++s&@abs_srcdir@&$ac_abs_srcdir&;t t ++s&@top_srcdir@&$ac_top_srcdir&;t t ++s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t ++s&@builddir@&$ac_builddir&;t t ++s&@abs_builddir@&$ac_abs_builddir&;t t ++s&@abs_top_builddir@&$ac_abs_top_builddir&;t t ++s&@INSTALL@&$ac_INSTALL&;t t ++$ac_datarootdir_hack ++" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out ++ ++test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && ++ { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && ++ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && ++ { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' ++which seems to be undefined. Please make sure it is defined." >&5 ++echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' ++which seems to be undefined. Please make sure it is defined." >&2;} ++ ++ rm -f "$tmp/stdin" + case $ac_file in +- - | *:- | *:-:* ) # input from stdin +- cat >$tmp/stdin +- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` +- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; +- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` +- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; +- * ) ac_file_in=$ac_file.in ;; ++ -) cat "$tmp/out"; rm -f "$tmp/out";; ++ *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; + esac +- +- test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 +-echo "$as_me: creating $ac_file" >&6;} +- +- # First look for the input files in the build tree, otherwise in the +- # src tree. +- ac_file_inputs=`IFS=: +- for f in $ac_file_in; do +- case $f in +- -) echo $tmp/stdin ;; +- [\\/$]*) +- # Absolute (can't be DOS-style, as IFS=:) +- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +-echo "$as_me: error: cannot find input file: $f" >&2;} +- { (exit 1); exit 1; }; } +- # Do quote $f, to prevent DOS paths from being IFS'd. +- echo "$f";; +- *) # Relative +- if test -f "$f"; then +- # Build tree +- echo "$f" +- elif test -f "$srcdir/$f"; then +- # Source tree +- echo "$srcdir/$f" +- else +- # /dev/null tree +- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +-echo "$as_me: error: cannot find input file: $f" >&2;} +- { (exit 1); exit 1; }; } +- fi;; +- esac +- done` || { (exit 1); exit 1; } +- # Remove the trailing spaces. +- sed 's/[ ]*$//' $ac_file_inputs >$tmp/in +- ++ ;; ++ :H) ++ # ++ # CONFIG_HEADER ++ # + _ACEOF + +-# Transform confdefs.h into two sed scripts, `conftest.defines' and +-# `conftest.undefs', that substitutes the proper values into +-# config.h.in to produce config.h. The first handles `#define' +-# templates, and the second `#undef' templates. +-# And first: Protect against being on the right side of a sed subst in +-# config.status. Protect against being in an unquoted here document +-# in config.status. +-rm -f conftest.defines conftest.undefs +-# Using a here document instead of a string reduces the quoting nightmare. +-# Putting comments in sed scripts is not portable. +-# +-# `end' is used to avoid that the second main sed command (meant for +-# 0-ary CPP macros) applies to n-ary macro definitions. +-# See the Autoconf documentation for `clear'. +-cat >confdef2sed.sed <<\_ACEOF +-s/[\\&,]/\\&/g +-s,[\\$`],\\&,g +-t clear +-: clear +-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp +-t end +-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp +-: end +-_ACEOF +-# If some macros were called several times there might be several times +-# the same #defines, which is useless. Nevertheless, we may not want to +-# sort them, since we want the *last* AC-DEFINE to be honored. +-uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines +-sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs +-rm -f confdef2sed.sed +- +-# This sed command replaces #undef with comments. This is necessary, for ++# Transform confdefs.h into a sed script `conftest.defines', that ++# substitutes the proper values into config.h.in to produce config.h. ++rm -f conftest.defines conftest.tail ++# First, append a space to every undef/define line, to ease matching. ++echo 's/$/ /' >conftest.defines ++# Then, protect against being on the right side of a sed subst, or in ++# an unquoted here document, in config.status. If some macros were ++# called several times there might be several #defines for the same ++# symbol, which is useless. But do not sort them, since the last ++# AC_DEFINE must be honored. ++ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* ++# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where ++# NAME is the cpp macro being defined, VALUE is the value it is being given. ++# PARAMS is the parameter list in the macro definition--in most cases, it's ++# just an empty string. ++ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' ++ac_dB='\\)[ (].*,\\1define\\2' ++ac_dC=' ' ++ac_dD=' ,' ++ ++uniq confdefs.h | ++ sed -n ' ++ t rset ++ :rset ++ s/^[ ]*#[ ]*define[ ][ ]*// ++ t ok ++ d ++ :ok ++ s/[\\&,]/\\&/g ++ s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p ++ s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p ++ ' >>conftest.defines ++ ++# Remove the space that was appended to ease matching. ++# Then replace #undef with comments. This is necessary, for + # example, in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. +-cat >>conftest.undefs <<\_ACEOF +-s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, +-_ACEOF +- +-# Break up conftest.defines because some shells have a limit on the size +-# of here documents, and old seds have small limits too (100 cmds). +-echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS +-echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS +-echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS +-echo ' :' >>$CONFIG_STATUS +-rm -f conftest.tail +-while grep . conftest.defines >/dev/null ++# (The regexp can be short, since the line contains either #define or #undef.) ++echo 's/ $// ++s,^[ #]*u.*,/* & */,' >>conftest.defines ++ ++# Break up conftest.defines: ++ac_max_sed_lines=50 ++ ++# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" ++# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" ++# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" ++# et cetera. ++ac_in='$ac_file_inputs' ++ac_out='"$tmp/out1"' ++ac_nxt='"$tmp/out2"' ++ ++while : + do +- # Write a limited-size here document to $tmp/defines.sed. +- echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS +- # Speed up: don't consider the non `#define' lines. +- echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS +- # Work around the forget-to-reset-the-flag bug. +- echo 't clr' >>$CONFIG_STATUS +- echo ': clr' >>$CONFIG_STATUS +- sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS ++ # Write a here document: ++ cat >>$CONFIG_STATUS <<_ACEOF ++ # First, check the format of the line: ++ cat >"\$tmp/defines.sed" <<\\CEOF ++/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def ++/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def ++b ++:def ++_ACEOF ++ sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF +- sed -f $tmp/defines.sed $tmp/in >$tmp/out +- rm -f $tmp/in +- mv $tmp/out $tmp/in +-' >>$CONFIG_STATUS +- sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail ++ sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS ++ ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in ++ sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail ++ grep . conftest.tail >/dev/null || break + rm -f conftest.defines + mv conftest.tail conftest.defines + done +-rm -f conftest.defines +-echo ' fi # grep' >>$CONFIG_STATUS +-echo >>$CONFIG_STATUS +- +-# Break up conftest.undefs because some shells have a limit on the size +-# of here documents, and old seds have small limits too (100 cmds). +-echo ' # Handle all the #undef templates' >>$CONFIG_STATUS +-rm -f conftest.tail +-while grep . conftest.undefs >/dev/null +-do +- # Write a limited-size here document to $tmp/undefs.sed. +- echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS +- # Speed up: don't consider the non `#undef' +- echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS +- # Work around the forget-to-reset-the-flag bug. +- echo 't clr' >>$CONFIG_STATUS +- echo ': clr' >>$CONFIG_STATUS +- sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS +- echo 'CEOF +- sed -f $tmp/undefs.sed $tmp/in >$tmp/out +- rm -f $tmp/in +- mv $tmp/out $tmp/in +-' >>$CONFIG_STATUS +- sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail +- rm -f conftest.undefs +- mv conftest.tail conftest.undefs +-done +-rm -f conftest.undefs ++rm -f conftest.defines conftest.tail + ++echo "ac_result=$ac_in" >>$CONFIG_STATUS + cat >>$CONFIG_STATUS <<\_ACEOF +- # Let's still pretend it is `configure' which instantiates (i.e., don't +- # use $as_me), people would be surprised to read: +- # /* config.h. Generated by config.status. */ +- if test x"$ac_file" = x-; then +- echo "/* Generated by configure. */" >$tmp/config.h +- else +- echo "/* $ac_file. Generated by configure. */" >$tmp/config.h +- fi +- cat $tmp/in >>$tmp/config.h +- rm -f $tmp/in + if test x"$ac_file" != x-; then +- if diff $ac_file $tmp/config.h >/dev/null 2>&1; then ++ echo "/* $configure_input */" >"$tmp/config.h" ++ cat "$ac_result" >>"$tmp/config.h" ++ if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 + echo "$as_me: $ac_file is unchanged" >&6;} + else +- ac_dir=`(dirname "$ac_file") 2>/dev/null || +-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ +- X"$ac_file" : 'X\(//\)[^/]' \| \ +- X"$ac_file" : 'X\(//\)$' \| \ +- X"$ac_file" : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || +-echo X"$ac_file" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` +- { if $as_mkdir_p; then +- mkdir -p "$ac_dir" +- else +- as_dir="$ac_dir" +- as_dirs= +- while test ! -d "$as_dir"; do +- as_dirs="$as_dir $as_dirs" +- as_dir=`(dirname "$as_dir") 2>/dev/null || +-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ +- X"$as_dir" : 'X\(//\)[^/]' \| \ +- X"$as_dir" : 'X\(//\)$' \| \ +- X"$as_dir" : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || +-echo X"$as_dir" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` +- done +- test ! -n "$as_dirs" || mkdir $as_dirs +- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} +- { (exit 1); exit 1; }; }; } +- + rm -f $ac_file +- mv $tmp/config.h $ac_file ++ mv "$tmp/config.h" $ac_file + fi + else +- cat $tmp/config.h +- rm -f $tmp/config.h ++ echo "/* $configure_input */" ++ cat "$ac_result" + fi ++ rm -f "$tmp/out12" + # Compute $ac_file's index in $config_headers. + _am_stamp_count=1 + for _am_header in $config_headers :; do +@@ -5207,135 +5957,39 @@ for _am_header in $config_headers :; do + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac + done +-echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || ++echo "timestamp for $ac_file" >`$as_dirname -- $ac_file || + $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X$ac_file : 'X\(//\)[^/]' \| \ + X$ac_file : 'X\(//\)$' \| \ +- X$ac_file : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || ++ X$ac_file : 'X\(/\)' \| . 2>/dev/null || + echo X$ac_file | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'`/stamp-h$_am_stamp_count +-done +-_ACEOF +-cat >>$CONFIG_STATUS <<\_ACEOF +- +-# +-# CONFIG_COMMANDS section. +-# +-for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue +- ac_dest=`echo "$ac_file" | sed 's,:.*,,'` +- ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` +- ac_dir=`(dirname "$ac_dest") 2>/dev/null || +-$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ +- X"$ac_dest" : 'X\(//\)[^/]' \| \ +- X"$ac_dest" : 'X\(//\)$' \| \ +- X"$ac_dest" : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || +-echo X"$ac_dest" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` +- { if $as_mkdir_p; then +- mkdir -p "$ac_dir" +- else +- as_dir="$ac_dir" +- as_dirs= +- while test ! -d "$as_dir"; do +- as_dirs="$as_dir $as_dirs" +- as_dir=`(dirname "$as_dir") 2>/dev/null || +-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ +- X"$as_dir" : 'X\(//\)[^/]' \| \ +- X"$as_dir" : 'X\(//\)$' \| \ +- X"$as_dir" : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || +-echo X"$as_dir" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` +- done +- test ! -n "$as_dirs" || mkdir $as_dirs +- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} +- { (exit 1); exit 1; }; }; } +- +- ac_builddir=. +- +-if test "$ac_dir" != .; then +- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` +- # A "../" for each directory in $ac_dir_suffix. +- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +-else +- ac_dir_suffix= ac_top_builddir= +-fi +- +-case $srcdir in +- .) # No --srcdir option. We are building in place. +- ac_srcdir=. +- if test -z "$ac_top_builddir"; then +- ac_top_srcdir=. +- else +- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` +- fi ;; +- [\\/]* | ?:[\\/]* ) # Absolute path. +- ac_srcdir=$srcdir$ac_dir_suffix; +- ac_top_srcdir=$srcdir ;; +- *) # Relative path. +- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix +- ac_top_srcdir=$ac_top_builddir$srcdir ;; +-esac ++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)[^/].*/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'`/stamp-h$_am_stamp_count ++ ;; + +-# Do not use `cd foo && pwd` to compute absolute paths, because +-# the directories may not exist. +-case `pwd` in +-.) ac_abs_builddir="$ac_dir";; +-*) +- case "$ac_dir" in +- .) ac_abs_builddir=`pwd`;; +- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; +- *) ac_abs_builddir=`pwd`/"$ac_dir";; +- esac;; +-esac +-case $ac_abs_builddir in +-.) ac_abs_top_builddir=${ac_top_builddir}.;; +-*) +- case ${ac_top_builddir}. in +- .) ac_abs_top_builddir=$ac_abs_builddir;; +- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; +- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; +- esac;; +-esac +-case $ac_abs_builddir in +-.) ac_abs_srcdir=$ac_srcdir;; +-*) +- case $ac_srcdir in +- .) ac_abs_srcdir=$ac_abs_builddir;; +- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; +- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; +- esac;; +-esac +-case $ac_abs_builddir in +-.) ac_abs_top_srcdir=$ac_top_srcdir;; +-*) +- case $ac_top_srcdir in +- .) ac_abs_top_srcdir=$ac_abs_builddir;; +- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; +- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; +- esac;; +-esac ++ :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 ++echo "$as_me: executing $ac_file commands" >&6;} ++ ;; ++ esac + + +- { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 +-echo "$as_me: executing $ac_dest commands" >&6;} +- case $ac_dest in +- depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do ++ case $ac_file$ac_mode in ++ "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. +@@ -5345,18 +5999,29 @@ echo "$as_me: executing $ac_dest commands" >&6;} + # each Makefile.in and add a new line on top of each file to say so. + # So let's grep whole file. + if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then +- dirpart=`(dirname "$mf") 2>/dev/null || ++ dirpart=`$as_dirname -- "$mf" || + $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ +- X"$mf" : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || ++ X"$mf" : 'X\(/\)' \| . 2>/dev/null || + echo X"$mf" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` ++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)[^/].*/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'` + else + continue + fi +@@ -5378,53 +6043,79 @@ echo X"$mf" | + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue +- fdir=`(dirname "$file") 2>/dev/null || ++ fdir=`$as_dirname -- "$file" || + $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ +- X"$file" : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || ++ X"$file" : 'X\(/\)' \| . 2>/dev/null || + echo X"$file" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` +- { if $as_mkdir_p; then +- mkdir -p $dirpart/$fdir +- else +- as_dir=$dirpart/$fdir ++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)[^/].*/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'` ++ { as_dir=$dirpart/$fdir ++ case $as_dir in #( ++ -*) as_dir=./$as_dir;; ++ esac ++ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= +- while test ! -d "$as_dir"; do +- as_dirs="$as_dir $as_dirs" +- as_dir=`(dirname "$as_dir") 2>/dev/null || ++ while :; do ++ case $as_dir in #( ++ *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( ++ *) as_qdir=$as_dir;; ++ esac ++ as_dirs="'$as_qdir' $as_dirs" ++ as_dir=`$as_dirname -- "$as_dir" || + $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ +- X"$as_dir" : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || ++ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || + echo X"$as_dir" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` ++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)[^/].*/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'` ++ test -d "$as_dir" && break + done +- test ! -n "$as_dirs" || mkdir $as_dirs +- fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 +-echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} ++ test -z "$as_dirs" || eval "mkdir $as_dirs" ++ } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 ++echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } +- + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done + ;; ++ + esac +-done +-_ACEOF ++done # for ac_tag + +-cat >>$CONFIG_STATUS <<\_ACEOF + + { (exit 0); exit 0; } + _ACEOF +diff --git a/src/Makefile.in b/src/Makefile.in +index d5fb876..e71c884 100644 +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.9.5 from Makefile.am. ++# Makefile.in generated by automake 1.9.6 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -14,8 +14,6 @@ + + @SET_MAKE@ + +-SOURCES = $(dash_SOURCES) +- + srcdir = @srcdir@ + top_srcdir = @top_srcdir@ + VPATH = @srcdir@ +@@ -38,8 +36,7 @@ PRE_UNINSTALL = : + POST_UNINSTALL = : + bin_PROGRAMS = dash$(EXEEXT) + subdir = src +-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in arith.c \ +- arith.h ++DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/configure.ac + am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ +@@ -50,15 +47,16 @@ CONFIG_CLEAN_FILES = + am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" + binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) + PROGRAMS = $(bin_PROGRAMS) +-am__objects_1 = alias.$(OBJEXT) arith_yylex.$(OBJEXT) cd.$(OBJEXT) \ +- error.$(OBJEXT) eval.$(OBJEXT) exec.$(OBJEXT) expand.$(OBJEXT) \ ++am__objects_1 = alias.$(OBJEXT) arith_yacc.$(OBJEXT) \ ++ arith_yylex.$(OBJEXT) cd.$(OBJEXT) error.$(OBJEXT) \ ++ eval.$(OBJEXT) exec.$(OBJEXT) expand.$(OBJEXT) \ + histedit.$(OBJEXT) input.$(OBJEXT) jobs.$(OBJEXT) \ + mail.$(OBJEXT) main.$(OBJEXT) memalloc.$(OBJEXT) \ + miscbltin.$(OBJEXT) mystring.$(OBJEXT) options.$(OBJEXT) \ + parser.$(OBJEXT) redir.$(OBJEXT) show.$(OBJEXT) trap.$(OBJEXT) \ + output.$(OBJEXT) printf.$(OBJEXT) system.$(OBJEXT) \ + test.$(OBJEXT) times.$(OBJEXT) var.$(OBJEXT) +-am_dash_OBJECTS = $(am__objects_1) arith.$(OBJEXT) ++am_dash_OBJECTS = $(am__objects_1) + dash_OBJECTS = $(am_dash_OBJECTS) + dash_DEPENDENCIES = builtins.o init.o nodes.o signames.o syntax.o + DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +@@ -68,7 +66,6 @@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) + CCLD = $(CC) + LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +-YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS) + SOURCES = $(dash_SOURCES) + DIST_SOURCES = $(dash_SOURCES) + man1dir = $(mandir)/man1 +@@ -99,6 +96,7 @@ ECHO_N = @ECHO_N@ + ECHO_T = @ECHO_T@ + EGREP = @EGREP@ + EXEEXT = @EXEEXT@ ++GREP = @GREP@ + INSTALL_DATA = @INSTALL_DATA@ + INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ +@@ -121,8 +119,8 @@ SHELL = @SHELL@ + STRIP = @STRIP@ + VERSION = @VERSION@ + YACC = @YACC@ ++YFLAGS = @YFLAGS@ + ac_ct_CC = @ac_ct_CC@ +-ac_ct_STRIP = @ac_ct_STRIP@ + am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ + am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ + am__include = @am__include@ +@@ -133,19 +131,26 @@ am__untar = @am__untar@ + bindir = @bindir@ + build_alias = @build_alias@ + datadir = @datadir@ ++datarootdir = @datarootdir@ ++docdir = @docdir@ ++dvidir = @dvidir@ + exec_prefix = @exec_prefix@ + host_alias = @host_alias@ ++htmldir = @htmldir@ + includedir = @includedir@ + infodir = @infodir@ + install_sh = @install_sh@ + libdir = @libdir@ + libexecdir = @libexecdir@ ++localedir = @localedir@ + localstatedir = @localstatedir@ + mandir = @mandir@ + mkdir_p = @mkdir_p@ + oldincludedir = @oldincludedir@ ++pdfdir = @pdfdir@ + prefix = @prefix@ + program_transform_name = @program_transform_name@ ++psdir = @psdir@ + sbindir = @sbindir@ + sharedstatedir = @sharedstatedir@ + sysconfdir = @sysconfdir@ +@@ -155,7 +160,7 @@ COMMON_CFLAGS = -Wall + COMMON_CPPFLAGS = \ + -include $(top_builddir)/config.h \ + -DBSD=1 -DSHELL \ +- -DGLOB_BROKEN -DFNMATCH_BROKEN -DIFS_BROKEN ++ -DIFS_BROKEN + + AM_CFLAGS = $(COMMON_CFLAGS) + AM_CPPFLAGS = $(COMMON_CPPFLAGS) +@@ -166,13 +171,13 @@ COMPILE_FOR_BUILD = \ + $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) + + dash_CFILES = \ +- alias.c arith_yylex.c cd.c error.c eval.c exec.c expand.c \ ++ alias.c arith_yacc.c arith_yylex.c cd.c error.c eval.c exec.c expand.c \ + histedit.c input.c jobs.c mail.c main.c memalloc.c miscbltin.c \ + mystring.c options.c parser.c redir.c show.c trap.c output.c \ + bltin/printf.c system.c bltin/test.c bltin/times.c var.c + + dash_SOURCES = \ +- $(dash_CFILES) arith.y \ ++ $(dash_CFILES) \ + alias.h bltin/bltin.h cd.h error.h eval.h exec.h expand.h hetio.h \ + init.h input.h jobs.h machdep.h mail.h main.h memalloc.h miscbltin.h \ + myhistedit.h mystring.h options.h output.h parser.h redir.h shell.h \ +@@ -180,10 +185,10 @@ dash_SOURCES = \ + + dash_LDADD = builtins.o init.o nodes.o signames.o syntax.o + HELPERS = mkinit mksyntax mknodes mksignames +-BUILT_SOURCES = arith.h builtins.h nodes.h syntax.h token.h ++BUILT_SOURCES = builtins.h nodes.h syntax.h token.h + CLEANFILES = \ + $(BUILT_SOURCES) $(patsubst %.o,%.c,$(dash_LDADD)) \ +- arith.c $(HELPERS) builtins.def ++ $(HELPERS) builtins.def + + man_MANS = dash.1 + EXTRA_DIST = \ +@@ -195,7 +200,7 @@ all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + + .SUFFIXES: +-.SUFFIXES: .c .o .obj .y ++.SUFFIXES: .c .o .obj + $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ +@@ -248,11 +253,6 @@ uninstall-binPROGRAMS: + + clean-binPROGRAMS: + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) +-arith.h: arith.c +- @if test ! -f $@; then \ +- rm -f arith.c; \ +- $(MAKE) arith.c; \ +- else :; fi + dash$(EXEEXT): $(dash_OBJECTS) $(dash_DEPENDENCIES) + @rm -f dash$(EXEEXT) + $(LINK) $(dash_LDFLAGS) $(dash_OBJECTS) $(dash_LDADD) $(LIBS) +@@ -264,7 +264,7 @@ distclean-compile: + -rm -f *.tab.c + + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alias.Po@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arith.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arith_yacc.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arith_yylex.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cd.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Po@am__quote@ +@@ -346,27 +346,6 @@ times.obj: bltin/times.c + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bltin/times.c' object='times.obj' libtool=no @AMDEPBACKSLASH@ + @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o times.obj `if test -f 'bltin/times.c'; then $(CYGPATH_W) 'bltin/times.c'; else $(CYGPATH_W) '$(srcdir)/bltin/times.c'; fi` +- +-.y.c: +- $(YACCCOMPILE) $< +- if test -f y.tab.h; then \ +- to=`echo "$*_H" | sed \ +- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ +- -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`; \ +- sed -e "/^#/!b" -e "s/Y_TAB_H/$$to/g" -e "s|y\.tab\.h|$*.h|" \ +- y.tab.h >$*.ht; \ +- rm -f y.tab.h; \ +- if cmp -s $*.ht $*.h; then \ +- rm -f $*.ht ;\ +- else \ +- mv $*.ht $*.h; \ +- fi; \ +- fi +- if test -f y.output; then \ +- mv y.output $*.output; \ +- fi +- sed '/^#/ s|y\.tab\.c|$@|' y.tab.c >$@t && mv $@t $@ +- rm -f y.tab.c + uninstall-info-am: + install-man1: $(man1_MANS) $(man_MANS) + @$(NORMAL_INSTALL) +@@ -523,8 +502,6 @@ distclean-generic: + maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +- -rm -f arith.c +- -rm -f arith.h + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) + clean: clean-am + +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0041--PARSER-Add-FAKEEOFMARK-for-expandstr.diff +++ dash-0.5.4/debian/diff/0041--PARSER-Add-FAKEEOFMARK-for-expandstr.diff @@ -0,0 +1,84 @@ +From 0b5648e3e626ee6f0b516a3d81aa82720937f34c Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Thu, 27 Dec 2007 13:54:16 +1100 +Subject: [PATCH] [PARSER] Add FAKEEOFMARK for expandstr + +Previously expandstr used the string "" to indicate that it needs to be +treated just like a here-doc except that there is no terminator. However, +the string "" is in fact a valid here-doc terminator so now that we deal +with it correctly expandstr no longer works in the presence of new-lines +in the prompt. + +This patch introduces the FAKEEOFMARK macro which does not equal any +real EOF marker but is distinct from the NULL pointer which is used to +indicate non-here-doc contexts. + +Thanks to Markus Triska for reporting this regression. + +Signed-off-by: Herbert Xu +--- + ChangeLog | 4 ++++ + src/parser.c | 14 ++++++++++++-- + 2 files changed, 16 insertions(+), 2 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 56acd66..8b392f4 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++2007-12-27 Herbert Xu ++ ++ * Add FAKEEOFMARK for expandstr. ++ + 2007-12-23 Gerrit Pape + + * If imaxdiv() isn't available, use / and % operators. +diff --git a/src/parser.c b/src/parser.c +index 2d20b00..3206328 100644 +--- a/src/parser.c ++++ b/src/parser.c +@@ -64,6 +64,11 @@ + + + ++/* Used by expandstr to get here-doc like behaviour. */ ++#define FAKEEOFMARK (char *)1 ++ ++ ++ + struct heredoc { + struct heredoc *next; /* next here document in list */ + union node *here; /* redirection node */ +@@ -113,6 +118,11 @@ isassignment(const char *p) + return *q == '='; + } + ++static inline int realeofmark(const char *eofmark) ++{ ++ return eofmark && eofmark != FAKEEOFMARK; ++} ++ + + /* + * Read and parse a command. Returns NEOF on end of file. (NULL is a +@@ -1030,7 +1040,7 @@ endword: + */ + + checkend: { +- if (eofmark) { ++ if (realeofmark(eofmark)) { + int markloc; + char *p; + +@@ -1492,7 +1502,7 @@ expandstr(const char *ps) + + /* XXX Fix (char *) cast. */ + setinputstring((char *)ps); +- readtoken1(pgetc(), DQSYNTAX, nullstr, 0); ++ readtoken1(pgetc(), DQSYNTAX, FAKEEOFMARK, 0); + popfile(); + + n.narg.type = NARG; +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0027--ARITH-Size-optimisations-in-arithmetic-lexer.diff +++ dash-0.5.4/debian/diff/0027--ARITH-Size-optimisations-in-arithmetic-lexer.diff @@ -0,0 +1,158 @@ +From bf358f676e1214ab926d17406a01cd0ca6aca9a8 Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Thu, 11 Oct 2007 22:38:46 +0800 +Subject: [PATCH] [ARITH] Size optimisations in arithmetic lexer + +Use += instead of straight assignment for token value. +--- + ChangeLog | 1 + + src/arith_yylex.c | 52 ++++++++++++++++++++++++++-------------------------- + 2 files changed, 27 insertions(+), 26 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 895c607..1f26b83 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,6 +1,7 @@ + 2007-10-11 Herbert Xu + + * Add assignment support in arithmetic expansions. ++ * Size optimisations in arithmetic lexer. + + 2007-10-08 Herbert Xu + +diff --git a/src/arith_yylex.c b/src/arith_yylex.c +index 0f46990..2c15657 100644 +--- a/src/arith_yylex.c ++++ b/src/arith_yylex.c +@@ -56,7 +56,8 @@ yylex() + const char *p; + + for (;;) { +- switch (*buf) { ++ value = *buf; ++ switch (value) { + case ' ': + case '\t': + case '\n': +@@ -137,7 +138,7 @@ yylex() + value = ARITH_VAR; + goto out; + case '=': +- value = ARITH_ASS; ++ value += ARITH_ASS - '='; + checkeq: + if (*++buf != '=') + goto out; +@@ -146,85 +147,84 @@ checkeq: + case '>': + switch (*++buf) { + case '=': +- value = ARITH_GE; ++ value += ARITH_GE - '>'; + break; + case '>': +- value = ARITH_RSHIFT; ++ value += ARITH_RSHIFT - '>'; + goto checkeq; + default: +- value = ARITH_GT; ++ value += ARITH_GT - '>'; + goto out; + } + break; + case '<': + switch (*++buf) { + case '=': +- value = ARITH_LE; ++ value += ARITH_LE - '<'; + break; + case '<': +- value = ARITH_LSHIFT; ++ value += ARITH_LSHIFT - '<'; + goto checkeq; + default: +- value = ARITH_LT; ++ value += ARITH_LT - '<'; + goto out; + } + break; + case '|': + if (*++buf != '|') { +- value = ARITH_BOR; ++ value += ARITH_BOR - '|'; + goto checkeq; + } +- value = ARITH_OR; ++ value += ARITH_OR - '|'; + break; + case '&': + if (*++buf != '&') { +- value = ARITH_BAND; ++ value += ARITH_BAND - '&'; + goto checkeq; + } +- value = ARITH_AND; ++ value += ARITH_AND - '&'; + break; + case '!': + if (*++buf != '=') { +- value = ARITH_NOT; ++ value += ARITH_NOT - '!'; + goto out; + } +- value = ARITH_NE; ++ value += ARITH_NE - '!'; + break; + case 0: +- value = 0; + goto out; + case '(': +- value = ARITH_LPAREN; ++ value += ARITH_LPAREN - '('; + break; + case ')': +- value = ARITH_RPAREN; ++ value += ARITH_RPAREN - ')'; + break; + case '*': +- value = ARITH_MUL; ++ value += ARITH_MUL - '*'; + goto checkeq; + case '/': +- value = ARITH_DIV; ++ value += ARITH_DIV - '/'; + goto checkeq; + case '%': +- value = ARITH_REM; ++ value += ARITH_REM - '%'; + goto checkeq; + case '+': +- value = ARITH_ADD; ++ value += ARITH_ADD - '+'; + goto checkeq; + case '-': +- value = ARITH_SUB; ++ value += ARITH_SUB - '-'; + goto checkeq; + case '~': +- value = ARITH_BNOT; ++ value += ARITH_BNOT - '~'; + break; + case '^': +- value = ARITH_BXOR; ++ value += ARITH_BXOR - '^'; + goto checkeq; + case '?': +- value = ARITH_QMARK; ++ value += ARITH_QMARK - '?'; + break; + case ':': +- value = ARITH_COLON; ++ value += ARITH_COLON - ':'; + break; + } + break; +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0017--BUILD-Add-enable-static-option-to-configure.diff +++ dash-0.5.4/debian/diff/0017--BUILD-Add-enable-static-option-to-configure.diff @@ -0,0 +1,43 @@ +From e8edb8f8a4098977944050ce322c76dcc4557b80 Mon Sep 17 00:00:00 2001 +From: Alexey Gladkov +Date: Thu, 4 Oct 2007 14:21:44 +0800 +Subject: [PATCH] [BUILD] Add --enable-static option to configure. + +Add new option to build statical linked dash. +--- + ChangeLog | 4 ++++ + configure.ac | 6 ++++++ + 2 files changed, 10 insertions(+), 0 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index cf56c9a..ac717c5 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++2007-10-04 Alexey Gladkov ++ ++ * Add --enable-static option to configure. ++ + 2007-09-26 Herbert Xu + + * Recognise here-doc delimiters terminated by EOF. +diff --git a/configure.ac b/configure.ac +index e0a94a8..5e8f17d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -18,6 +18,12 @@ fi + AC_MSG_RESULT(${CC_FOR_BUILD}) + AC_SUBST(CC_FOR_BUILD) + ++AC_ARG_ENABLE(static, AS_HELP_STRING(--enable-static, \ ++ [Build statical linked program])) ++if test "$enable_static" = "yes"; then ++ export LDFLAGS="-static -Wl,--fatal-warnings" ++fi ++ + dnl Checks for libraries. + + dnl Checks for header files. +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0001--SHELL-Restore-foreground-process-group-on-exit.diff +++ dash-0.5.4/debian/diff/0001--SHELL-Restore-foreground-process-group-on-exit.diff @@ -0,0 +1,65 @@ +From 3da9eb42cd07708128c3ecfd59375b44d3946ee1 Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Sat, 22 Sep 2007 20:49:42 +0800 +Subject: [PATCH] [SHELL] Restore foreground process group on exit + +On Thu, Jun 07, 2007 at 12:20:27PM +0200, Denis Vlasenko wrote: +> +> When I start dash under Midnight Commander and then type 'exit', dash +> exits all right, but then MC is sent to background. It happens because +> dash does not restore current process group on exit. +> +> Attached patch fixes this. It also fixes another bug: setjobctl(0) +> must ignore tcsetpgrp errors, because there are cases when tty is +> destroyed under dash. +> +> Patch is run-tested. + +I've fixed this slightly differently so that we don't need the +xtcsetpgrp change. +--- + ChangeLog | 4 ++++ + src/trap.c | 8 +++++++- + 2 files changed, 11 insertions(+), 1 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 6ce16c6..295fa66 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++2007-09-21 Denis Vlasenko ++ ++ * Restore foreground process group on exit. ++ + 2007-07-12 Herbert Xu + + * Release 0.5.4. +diff --git a/src/trap.c b/src/trap.c +index eae6186..c386db7 100644 +--- a/src/trap.c ++++ b/src/trap.c +@@ -357,7 +357,7 @@ exitshell(void) + TRACE(("pid %d, exitshell(%d)\n", getpid(), status)); + if (setjmp(loc.loc)) { + if (exception == EXEXIT) +- _exit(exitstatus); ++ status = exitstatus; + goto out; + } + handler = &loc; +@@ -367,6 +367,12 @@ exitshell(void) + } + flushall(); + out: ++ /* ++ * Disable job control so that whoever had the foreground before we ++ * started can get it back. ++ */ ++ if (likely(!setjmp(loc.loc))) ++ setjobctl(0); + _exit(status); + /* NOTREACHED */ + } +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0059--SHELL-Expand-ENV-before-using-it.diff +++ dash-0.5.4/debian/diff/0059--SHELL-Expand-ENV-before-using-it.diff @@ -0,0 +1,57 @@ +From 5a1b6b570ede39ddc80b837cda6e0622920a4660 Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Sun, 13 Jul 2008 21:51:52 +0800 +Subject: [PATCH] [SHELL] Expand ENV before using it + +Per POSIX ENV needs to undergo parameter expansion. + +Signed-off-by: Herbert Xu +--- + ChangeLog | 1 + + src/main.c | 4 +++- + 2 files changed, 4 insertions(+), 1 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 53d5b7c..58bed78 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -4,6 +4,7 @@ + * Made aexpr/oexpr non-recursive. + * Made t_lex reentrant. + * Made setinputfd static. ++ * Expand ENV before using it. + + 2008-05-19 Herbert Xu + +diff --git a/src/main.c b/src/main.c +index b421e4f..cf34931 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -154,7 +154,7 @@ main(int argc, char **argv) + read_profile("/etc/profile"); + state1: + state = 2; +- read_profile(".profile"); ++ read_profile("$HOME/.profile"); + } + state2: + state = 3; +@@ -168,6 +168,7 @@ state2: + read_profile(shinit); + } + } ++ popstackmark(&smark); + state3: + state = 4; + if (minusc) +@@ -259,6 +260,7 @@ read_profile(const char *name) + { + int skip; + ++ name = expandstr(name); + if (setinputfile(name, INPUT_PUSH_FILE | INPUT_NOFILE_OK) < 0) + return; + +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0019--PARSER-Size-optimisations-in-parameter-expansion-pa.diff +++ dash-0.5.4/debian/diff/0019--PARSER-Size-optimisations-in-parameter-expansion-pa.diff @@ -0,0 +1,94 @@ +From bc46e866d18baf90de0ebf128a8f7ba964c2b138 Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Thu, 4 Oct 2007 22:20:38 +0800 +Subject: [PATCH] [PARSER] Size optimisations in parameter expansion parser + +Merge flags into subtype. +Do not write subtype out twice. +Add likely flag on ${ vs. $NAME. +Kill unnecessary (and bogus) PEOA check. +--- + ChangeLog | 1 + + src/parser.c | 16 +++++++--------- + 2 files changed, 8 insertions(+), 9 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 3352429..940e4b0 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,6 +1,7 @@ + 2007-10-04 Herbert Xu + + * Fix parsing of ${##1}. ++ * Size optimisations in parameter expansion parser. + + 2007-10-04 Alexey Gladkov + +diff --git a/src/parser.c b/src/parser.c +index 9edb824..f49ee7d 100644 +--- a/src/parser.c ++++ b/src/parser.c +@@ -1142,7 +1142,6 @@ parseredir: { + parsesub: { + int subtype; + int typeloc; +- int flags; + char *p; + static const char types[] = "}-+?="; + +@@ -1163,18 +1162,18 @@ parsesub: { + } else { + USTPUTC(CTLVAR, out); + typeloc = out - (char *)stackblock(); +- USTPUTC(VSNORMAL, out); ++ STADJUST(1, out); + subtype = VSNORMAL; +- if (c == '{') { ++ if (likely(c == '{')) { + c = pgetc(); + subtype = 0; + } + varname: +- if (c > PEOA && is_name(c)) { ++ if (is_name(c)) { + do { + STPUTC(c, out); + c = pgetc(); +- } while (c > PEOA && is_in_name(c)); ++ } while (is_in_name(c)); + } else if (is_digit(c)) { + do { + STPUTC(c, out); +@@ -1208,18 +1207,17 @@ varname: + badsub: synerror("Bad substitution"); + + STPUTC('=', out); +- flags = 0; + if (subtype == 0) { + switch (c) { + case ':': +- flags = VSNUL; ++ subtype = VSNUL; + c = pgetc(); + /*FALLTHROUGH*/ + default: + p = strchr(types, c); + if (p == NULL) + goto badsub; +- subtype = p - types + VSNORMAL; ++ subtype |= p - types + VSNORMAL; + break; + case '%': + case '#': +@@ -1238,7 +1236,7 @@ badsub: synerror("Bad substitution"); + } else { + pungetc(); + } +- *((char *)stackblock() + typeloc) = subtype | flags; ++ *((char *)stackblock() + typeloc) = subtype; + if (subtype != VSNORMAL) { + varnest++; + if (dblquote) +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0045--CD-Restored-non-glibc-getcwd-support.diff +++ dash-0.5.4/debian/diff/0045--CD-Restored-non-glibc-getcwd-support.diff @@ -0,0 +1,59 @@ +From 832b9a61ef683671cfcfc737fde24378c19b3ce0 Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Fri, 2 May 2008 14:23:47 +0800 +Subject: [PATCH] [CD] Restored non-glibc getcwd support + +These days dash is expected to build with libraries other than +glibc so we need to support the old way of calling getcwd again. + +Thanks to Dan McGee for reporting this bug when dash is built with +klibc. + +Signed-off-by: Herbert Xu +--- + ChangeLog | 4 ++++ + src/cd.c | 7 +++++-- + 2 files changed, 9 insertions(+), 2 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index f5e0dbc..5216521 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++2008-05-02 Herbert Xu ++ ++ * Restored non-glibc getcwd support. ++ + 2008-03-07 Larry Doolittle + + * Fix cmdtxt crash on if statements. +diff --git a/src/cd.c b/src/cd.c +index 1849c69..cb6e24d 100644 +--- a/src/cd.c ++++ b/src/cd.c +@@ -241,8 +241,6 @@ updatepwd(const char *dir) + } + + +-#define MAXPWD 256 +- + /* + * Find out what the current directory is. If we already know the current + * directory, this routine returns immediately. +@@ -251,8 +249,13 @@ inline + STATIC char * + getpwd() + { ++#ifdef _GNU_SOURCE + char *dir = getcwd(0, 0); + return dir ? dir : nullstr; ++#else ++ char buf[PATH_MAX]; ++ return getcwd(buf, sizeof(buf)) ? savestr(buf) : nullstr; ++#endif + } + + int +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0044--JOBS-Fix-cmdtxt-crash-on-if-statements.diff +++ dash-0.5.4/debian/diff/0044--JOBS-Fix-cmdtxt-crash-on-if-statements.diff @@ -0,0 +1,57 @@ +From 1ace536aa75eec20105a05d73bd2576ae783de6e Mon Sep 17 00:00:00 2001 +From: Larry Doolittle +Date: Fri, 7 Mar 2008 20:22:17 +0800 +Subject: [PATCH] [JOBS] Fix cmdtxt crash on if statements + +(Herbert: for context, see +http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=467065 ) + +This is a real bug in upstream dash, which has existed since at +least dash-0.5.1 (July 2004). It is a latent bug in cmdtxt() +(which I think applies only to pipes) as it handles "if" commands. +The attached patch fixes it for me. + +It's possible this patch will fix one or more of #462414, +#462977, and #463649. I'll send messages there to see if +the submitters can test. + +Signed-off-by: Herbert Xu +--- + ChangeLog | 4 ++++ + src/jobs.c | 5 +++-- + 2 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 4bc9181..f5e0dbc 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++2008-03-07 Larry Doolittle ++ ++ * Fix cmdtxt crash on if statements. ++ + 2008-01-01 Herbert Xu + + * Fix slash treatment in expmeta. +diff --git a/src/jobs.c b/src/jobs.c +index 529d615..40dc8f6 100644 +--- a/src/jobs.c ++++ b/src/jobs.c +@@ -1235,11 +1235,12 @@ donode: + cmdputs("if "); + cmdtxt(n->nif.test); + cmdputs("; then "); +- n = n->nif.ifpart; + if (n->nif.elsepart) { +- cmdtxt(n); ++ cmdtxt(n->nif.ifpart); + cmdputs("; else "); + n = n->nif.elsepart; ++ } else { ++ n = n->nif.ifpart; + } + p = "; fi"; + goto dotail; +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0004--BUILTIN-test-little-size-and-speed-optimizations.diff +++ dash-0.5.4/debian/diff/0004--BUILTIN-test-little-size-and-speed-optimizations.diff @@ -0,0 +1,64 @@ +From 67fbf72596dd2272c762831485346fbe49c574ae Mon Sep 17 00:00:00 2001 +From: Oleg Verych +Date: Sat, 22 Sep 2007 21:19:37 +0800 +Subject: [PATCH] [BUILTIN] test: little size and speed optimizations + +* Speed up (libc=glibc): + +deen:debian/src/dash-0.5.3# echo $(((7853+8631+7529+9777+9161+7552)/6)) +8417,8250 # this patch +deen:/mnt/work/debian/src/dash-0.5.3# echo $(((9553+7789+9450+9925+7595+9590)/6)) +8983 # short +deen:debian/src/dash-0.5.3# echo $(( (9655+7853+9733+7826+9618+10053)/6 )) +9123 # '[' ']' +deen:debian/src/dash-0.5.3# + +deen:debian/src/dash-0.5.3# echo $(((9231+9423+9365+9650+8883+8291)/6)) +9140 # unpatched +deen:debian/src/dash-0.5.3# + +* Size down: + +olecom@deen:/mnt/debian/src/dash-0.5.3$ size src/test.o # this patchset + text data bss dec hex filename + 4142 0 16 4158 103e src/test.o + +olecom@deen:/mnt/debian/src/dash-0.5.3$ size src/test.o + text data bss dec hex filename + 4209 0 16 4225 1081 src/test.o +olecom@deen:/mnt/debian/src/dash-0.5.3$ +--- + ChangeLog | 1 + + src/bltin/test.c | 4 ++-- + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 5804248..b22197f 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,6 +1,7 @@ + 2007-09-22 Oleg Verych + + * White space fixes for test(1). ++ * Use direct comparison instead of strcmp in test(1). + + 2007-09-22 Herbert Xu + +diff --git a/src/bltin/test.c b/src/bltin/test.c +index fd24fae..7d49569 100644 +--- a/src/bltin/test.c ++++ b/src/bltin/test.c +@@ -157,8 +157,8 @@ testcmd(int argc, char **argv) + { + int res; + +- if (strcmp(argv[0], "[") == 0) { +- if (strcmp(argv[--argc], "]")) ++ if (*argv[0] == '[') { ++ if (*argv[--argc] != ']') + error("missing ]"); + argv[argc] = NULL; + } +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0054--EXPAND-Fixed-non-leading-slash-treatment-in-expmeta.diff +++ dash-0.5.4/debian/diff/0054--EXPAND-Fixed-non-leading-slash-treatment-in-expmeta.diff @@ -0,0 +1,102 @@ +From 196ecaaaf8f3e70ef710b5bfcb95f87e6154fdb2 Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Mon, 19 May 2008 09:15:05 +0800 +Subject: [PATCH] [EXPAND] Fixed non-leading slash treatment in expmeta +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: 8bit + +Back in January an attempt was made to fix the interpretation of +quoted slashes in expmeta. However, this only fixed those cases +where the quoted slash is at the front of the word. The case of +non-leading slashes caused the previous directory part to gain a +back slash suffix which causes subsequent pattern matches to fail. + +This patch fixes this by removing the back slash in that case. + +Thanks to Romain Tartière fox reporting this bug. + +Test case: + + echo /*"/null" + +Old result: + + /*/null + +New result: + + /dev/null + +Signed-off-by: Herbert Xu +--- + ChangeLog | 4 ++++ + src/expand.c | 14 ++++++++------ + 2 files changed, 12 insertions(+), 6 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 2f65e03..7cf15c0 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++2008-05-19 Herbert Xu ++ ++ * Fixed non-leading slash treatment in expmeta. ++ + 2008-05-07 Gerrit Pape + + * Fixed lexical error in arithmetic expansion of & and |. +diff --git a/src/expand.c b/src/expand.c +index 2c52781..e4c4c8b 100644 +--- a/src/expand.c ++++ b/src/expand.c +@@ -1269,10 +1269,11 @@ expmeta(char *enddir, char *name) + struct dirent *dp; + int atend; + int matchdot; ++ int esc; + + metaflag = 0; + start = name; +- for (p = name; *p; p++) { ++ for (p = name; esc = 0, *p; p += esc + 1) { + if (*p == '*' || *p == '?') + metaflag = 1; + else if (*p == '[') { +@@ -1291,11 +1292,11 @@ expmeta(char *enddir, char *name) + } + } else { + if (*p == '\\') +- p++; +- if (*p == '/') { ++ esc++; ++ if (p[esc] == '/') { + if (metaflag) + break; +- start = p + 1; ++ start = p + esc + 1; + } + } + } +@@ -1337,7 +1338,8 @@ expmeta(char *enddir, char *name) + atend = 1; + } else { + atend = 0; +- *endname++ = '\0'; ++ *endname = '\0'; ++ endname += esc + 1; + } + matchdot = 0; + p = start; +@@ -1363,7 +1365,7 @@ expmeta(char *enddir, char *name) + } + closedir(dirp); + if (! atend) +- endname[-1] = '/'; ++ endname[-esc - 1] = esc ? '\\' : '/'; + } + #endif /* HAVE_GLOB */ + +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0018--PARSER-Fix-parsing-of-1.diff +++ dash-0.5.4/debian/diff/0018--PARSER-Fix-parsing-of-1.diff @@ -0,0 +1,90 @@ +From ab72e0678b0febde521c9b828af6b227b4cca3a8 Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Thu, 4 Oct 2007 22:15:10 +0800 +Subject: [PATCH] [PARSER] Fix parsing of ${##1} + +Previously dash treated ${##1} as a length operation. This patch fixes that. + +Test case: + + set -- a + echo ${##1}OK + +Old result: + + 1OK + +New result: + + OK +--- + ChangeLog | 4 ++++ + src/parser.c | 31 ++++++++++++++++++++++--------- + 2 files changed, 26 insertions(+), 9 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index ac717c5..3352429 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++2007-10-04 Herbert Xu ++ ++ * Fix parsing of ${##1}. ++ + 2007-10-04 Alexey Gladkov + + * Add --enable-static option to configure. +diff --git a/src/parser.c b/src/parser.c +index cac0aa5..9edb824 100644 +--- a/src/parser.c ++++ b/src/parser.c +@@ -1167,15 +1167,9 @@ parsesub: { + subtype = VSNORMAL; + if (c == '{') { + c = pgetc(); +- if (c == '#') { +- if ((c = pgetc()) == '}') +- c = '#'; +- else +- subtype = VSLENGTH; +- } +- else +- subtype = 0; ++ subtype = 0; + } ++varname: + if (c > PEOA && is_name(c)) { + do { + STPUTC(c, out); +@@ -1188,8 +1182,27 @@ parsesub: { + } while (is_digit(c)); + } + else if (is_special(c)) { +- USTPUTC(c, out); ++ int cc = c; ++ + c = pgetc(); ++ ++ if (!subtype && cc == '#') { ++ subtype = VSLENGTH; ++ ++ if (c == '_' || isalnum(c)) ++ goto varname; ++ ++ cc = c; ++ c = pgetc(); ++ if (cc == '}' || c != '}') { ++ pungetc(); ++ subtype = 0; ++ c = cc; ++ cc = '#'; ++ } ++ } ++ ++ USTPUTC(cc, out); + } + else + badsub: synerror("Bad substitution"); +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0049--ERROR-Set-default-exvwarning2-arg0-for-errors-durin.diff +++ dash-0.5.4/debian/diff/0049--ERROR-Set-default-exvwarning2-arg0-for-errors-durin.diff @@ -0,0 +1,43 @@ +From eac68bc870c0d9ada72adda08faeed5161ebd9d5 Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Sat, 3 May 2008 14:41:48 +0800 +Subject: [PATCH] [ERROR] Set default exvwarning2 arg0 for errors during early initialisation + +As it stands if we get an error before procargs gets called by main() +we'll try to print out a null pointer. This patch avoids this by +printing out "sh" instead. + +Signed-off-by: Herbert Xu +--- + ChangeLog | 1 + + src/error.c | 2 +- + 2 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 2c04c19..773b36e 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -3,6 +3,7 @@ + * Fixed _PATH_BSHELL warning. + * Test __GLIBC__ instead of _GNU_SOURCE. + * Restored warning when getcwd fails. ++ * Set default exvwarning2 arg0 for errors during early initialisation. + + 2008-05-02 Herbert Xu + +diff --git a/src/error.c b/src/error.c +index 338243d..7f165c1 100644 +--- a/src/error.c ++++ b/src/error.c +@@ -122,7 +122,7 @@ exvwarning2(const char *msg, va_list ap) + const char *fmt; + + errs = out2; +- name = arg0; ++ name = arg0 ?: "sh"; + fmt = "%s: "; + if (commandname) { + name = commandname; +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0040--ARITH-If-imaxdiv-isn-t-available-use-and-ope.diff +++ dash-0.5.4/debian/diff/0040--ARITH-If-imaxdiv-isn-t-available-use-and-ope.diff @@ -0,0 +1,77 @@ +From b21a62f3a6321a35a63fdc2dfceaafc55b326d47 Mon Sep 17 00:00:00 2001 +From: Gerrit Pape +Date: Sun, 23 Dec 2007 21:24:37 +0800 +Subject: [PATCH] [ARITH] If imaxdiv() isn't available, use / and % operators + +Although in posix, imaxdiv() isn't implemented on Debian/alpha, causing +dash to fail to build. So use / and % operators if imaxdiv() isn't +available. + + http://bugs.debian.org/456398 + +Signed-off-by: Gerrit Pape +Signed-off-by: Herbert Xu +--- + ChangeLog | 4 ++++ + configure.ac | 5 +++-- + src/arith_yacc.c | 6 ++++++ + 3 files changed, 13 insertions(+), 2 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 10ec45c..56acd66 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++2007-12-23 Gerrit Pape ++ ++ * If imaxdiv() isn't available, use / and % operators. ++ + 2007-12-23 Richard M Kreuter + + * Add set +o support. +diff --git a/configure.ac b/configure.ac +index ccc4ac1..4d739c2 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -33,8 +33,9 @@ dnl Checks for libraries. + dnl Checks for header files. + + dnl Checks for library functions. +-AC_CHECK_FUNCS(bsearch getpwnam getrlimit isalpha killpg mempcpy sigsetmask \ +- stpcpy strchrnul strsignal strtod strtoimax strtoumax sysconf) ++AC_CHECK_FUNCS(bsearch getpwnam getrlimit imaxdiv isalpha killpg mempcpy \ ++ sigsetmask stpcpy strchrnul strsignal strtod strtoimax \ ++ strtoumax sysconf) + + if test "$enable_fnmatch" = yes; then + use_fnmatch= +diff --git a/src/arith_yacc.c b/src/arith_yacc.c +index e473594..f4857fe 100644 +--- a/src/arith_yacc.c ++++ b/src/arith_yacc.c +@@ -88,7 +88,9 @@ static inline int higher_prec(int op1, int op2) + + static intmax_t do_binop(int op, intmax_t a, intmax_t b) + { ++#ifdef HAVE_IMAXDIV + imaxdiv_t div; ++#endif + + switch (op) { + default: +@@ -96,8 +98,12 @@ static intmax_t do_binop(int op, intmax_t a, intmax_t b) + case ARITH_DIV: + if (!b) + yyerror("division by zero"); ++#ifdef HAVE_IMAXDIV + div = imaxdiv(a, b); + return op == ARITH_REM ? div.rem : div.quot; ++#else ++ return op == ARITH_REM ? a % b : a / b; ++#endif + case ARITH_MUL: + return a * b; + case ARITH_ADD: +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0046--EXEC-Fixed-_PATH_BSHELL-warning.diff +++ dash-0.5.4/debian/diff/0046--EXEC-Fixed-_PATH_BSHELL-warning.diff @@ -0,0 +1,63 @@ +From 69e21fc5e3c072f9d7cce189c629adeaff63f52f Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Sat, 3 May 2008 14:09:24 +0800 +Subject: [PATCH] [EXEC] Fixed _PATH_BSHELL warning + +With klcc we get + +klcc -DHAVE_CONFIG_H -I. -I.. -include ../config.h -DBSD=1 -DSHELL +-DIFS_BROKEN -Wall -D__CTYPE_NO_INLINE -MT exec.o -MD -MP -MF +.deps/exec.Tpo -c -o exec.o exec.c +exec.c: In function 'tryexec': +exec.c:160: warning: comparison with string literal results in unspecified behavior + +Storing it in a local variable fixes the problem. + +Thanks to Dan McGee for reporting this. + +Signed-off-by: Herbert Xu +--- + ChangeLog | 4 ++++ + src/exec.c | 6 ++++-- + 2 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 5216521..1126b04 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++2008-05-03 Herbert Xu ++ ++ * Fixed _PATH_BSHELL warning. ++ + 2008-05-02 Herbert Xu + + * Restored non-glibc getcwd support. +diff --git a/src/exec.c b/src/exec.c +index bbb70e8..42299ea 100644 +--- a/src/exec.c ++++ b/src/exec.c +@@ -149,6 +149,8 @@ shellexec(char **argv, const char *path, int idx) + STATIC void + tryexec(char *cmd, char **argv, char **envp) + { ++ char *const path_bshell = _PATH_BSHELL; ++ + repeat: + #ifdef SYSV + do { +@@ -157,9 +159,9 @@ repeat: + #else + execve(cmd, argv, envp); + #endif +- if (cmd != _PATH_BSHELL && errno == ENOEXEC) { ++ if (cmd != path_bshell && errno == ENOEXEC) { + *argv-- = cmd; +- *argv = cmd = _PATH_BSHELL; ++ *argv = cmd = path_bshell; + goto repeat; + } + } +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0032--SHELL-Replace-shared-illnum-message-by-badnum-funct.diff +++ dash-0.5.4/debian/diff/0032--SHELL-Replace-shared-illnum-message-by-badnum-funct.diff @@ -0,0 +1,104 @@ +From 1a940dadf0981b797c21d83fea26ef0fa7a54e0e Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Wed, 17 Oct 2007 12:51:08 +0800 +Subject: [PATCH] [SHELL] Replace shared illnum message by badnum function. + +This patch adds the badnum function and uses it to mostly replace the use +of illnum except in miscbltin where the current code turns out to be smaller +because of the twin sh_error calls. +--- + ChangeLog | 4 ++++ + src/eval.c | 2 +- + src/mystring.c | 14 +++++++++----- + src/mystring.h | 1 + + 4 files changed, 15 insertions(+), 6 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 47a4bb0..ba9d5d5 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++2007-10-15 Herbert Xu ++ ++ * Replace shared illnum message by badnum function. ++ + 2007-10-17 Oleg Verych + + * Disallow completely blank strings in non-arithmetic context. +diff --git a/src/eval.c b/src/eval.c +index 1e0edd9..17b558d 100644 +--- a/src/eval.c ++++ b/src/eval.c +@@ -1028,7 +1028,7 @@ breakcmd(int argc, char **argv) + int n = argc > 1 ? number(argv[1]) : 1; + + if (n <= 0) +- sh_error(illnum, argv[1]); ++ badnum(argv[1]); + if (n > loopnest) + n = loopnest; + if (n > 0) { +diff --git a/src/mystring.c b/src/mystring.c +index 8e1200a..ce48c82 100644 +--- a/src/mystring.c ++++ b/src/mystring.c +@@ -108,6 +108,10 @@ prefix(const char *string, const char *pfx) + return (char *) string; + } + ++void badnum(const char *s) ++{ ++ sh_error(illnum, s); ++} + + /* + * Convert a string into an integer of type intmax_t. Alow trailing spaces. +@@ -121,20 +125,20 @@ intmax_t atomax(const char *s, int base) + r = strtoimax(s, &p, base); + + if (errno != 0) +- sh_error(illnum, s); ++ badnum(s); + + /* + * Disallow completely blank strings in non-arithmetic (base != 0) + * contexts. + */ +- if (base && (p == s)) +- sh_error(illnum, s); ++ if (p == s && base) ++ badnum(s); + + while (isspace((unsigned char)*p)) + p++; + + if (*p) +- sh_error(illnum, s); ++ badnum(s); + + return r; + } +@@ -155,7 +159,7 @@ number(const char *s) + intmax_t n = atomax10(s); + + if (n < 0 || n > INT_MAX) +- sh_error(illnum, s); ++ badnum(s); + + return n; + } +diff --git a/src/mystring.h b/src/mystring.h +index 477cd16..2e0540a 100644 +--- a/src/mystring.h ++++ b/src/mystring.h +@@ -48,6 +48,7 @@ extern const char homestr[]; + void scopyn(const char *, char *, int); + #endif + char *prefix(const char *, const char *); ++void badnum(const char *s) __attribute__ ((noreturn)); + intmax_t atomax(const char *, int); + intmax_t atomax10(const char *); + int number(const char *); +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0014--MAN-Clarify-syntax-of-the-for-command.diff +++ dash-0.5.4/debian/diff/0014--MAN-Clarify-syntax-of-the-for-command.diff @@ -0,0 +1,57 @@ +From 628b3c7edebdd6e1d66a7670bc642574ce09d1a4 Mon Sep 17 00:00:00 2001 +From: Gerrit Pape +Date: Tue, 25 Sep 2007 22:47:25 +0800 +Subject: [PATCH] [MAN] Clarify syntax of the for command + +Document that in a for loop 'in word ...' is optional, and if omitted, +'in "$@"' is used. + +Lars Wilke noticed this, and reported through + http://bugs.debian.org/387441 +--- + ChangeLog | 1 + + src/dash.1 | 7 +++++-- + 2 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 4ea7374..003a0f7 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,6 +1,7 @@ + 2007-09-25 Gerrit Pape + + * Clarify description of -nt, -ot options to test builtin. ++ * Clarify syntax of the for command. + + 2007-09-25 Herbert Xu + +diff --git a/src/dash.1 b/src/dash.1 +index 3aefe21..9b8ab0e 100644 +--- a/src/dash.1 ++++ b/src/dash.1 +@@ -640,17 +640,20 @@ repeat until the exit status of the first list is zero. + .Pp + The syntax of the for command is + .Bd -literal -offset indent +-for variable in word ... ++for variable [ in [ word ... ] ] + do list + done + .Ed + .Pp +-The words are expanded, and then the list is executed repeatedly with the ++The words following ++.Pa in ++are expanded, and then the list is executed repeatedly with the + variable set to each word in turn. + do and done may be replaced with + .Dq { + and + .Dq } . ++Omitting in word ... is equivalent to in "$@". + .Pp + The syntax of the break and continue command is + .Bd -literal -offset indent +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0009--PARSER-Remove-superfluous-dblquote-settings-when-en.diff +++ dash-0.5.4/debian/diff/0009--PARSER-Remove-superfluous-dblquote-settings-when-en.diff @@ -0,0 +1,43 @@ +From 44ea8759219dfa4c55056932367a3f13001f8731 Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Mon, 24 Sep 2007 22:11:59 +0800 +Subject: [PATCH] [PARSER] Remove superfluous dblquote settings when ending arith + +When an arithmetic expansion terminates and we restore the syntax to the +previous one, we don't need to set dblquote because we never changed upon +entering the arithmetic expansion. +--- + ChangeLog | 1 + + src/parser.c | 4 ---- + 2 files changed, 1 insertions(+), 4 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index b311ad4..e5987f9 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -4,6 +4,7 @@ + * Perform tilde expansion in all parameter expansion words. + * Remove superfluous arinest test in CENDQUOTE. + * Remove superfluous arinest test for dqvarnest. ++ * Remove superfluous dblquote settings when ending arith. + + 2007-09-22 Oleg Verych + +diff --git a/src/parser.c b/src/parser.c +index 8fac57a..791251d 100644 +--- a/src/parser.c ++++ b/src/parser.c +@@ -970,10 +970,6 @@ quotemark: + if (--arinest == 0) { + USTPUTC(CTLENDARI, out); + syntax = prevsyntax; +- if (syntax == DQSYNTAX) +- dblquote = 1; +- else +- dblquote = 0; + } else + USTPUTC(')', out); + } else { +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0021--MEMALLOC-Add-pushstackmark.diff +++ dash-0.5.4/debian/diff/0021--MEMALLOC-Add-pushstackmark.diff @@ -0,0 +1,153 @@ +From 9ca9a7fec1a221dc666a21aae358bac753cad2c4 Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Sat, 6 Oct 2007 00:45:52 +0800 +Subject: [PATCH] [MEMALLOC] Add pushstackmark + +This patch gets rid of the stack mark tracking hack by allocating a little +bit of stack memory if we're at risk of planting a stack mark which may be +grown later. To do this a new function pushstackmark is added which lets +the user pick a bigger amount to allocate since some users do that anyway +after setting a stack mark. +--- + ChangeLog | 4 ++++ + src/expand.c | 6 ++---- + src/memalloc.c | 26 +++++++------------------- + src/memalloc.h | 2 +- + src/parser.c | 3 +-- + 5 files changed, 15 insertions(+), 26 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 383332c..d3c7320 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++2007-10-06 Herbert Xu ++ ++ * Add pushstackmark. ++ + 2007-10-05 Herbert Xu + + * Made grabstackblock an inline wrapper for stalloc. +diff --git a/src/expand.c b/src/expand.c +index 98ad718..e3e5d8f 100644 +--- a/src/expand.c ++++ b/src/expand.c +@@ -546,10 +546,8 @@ expbackq(union node *cmd, int flag) + struct stackmark smark; + + INTOFF; +- setstackmark(&smark); +- dest = expdest; +- startloc = dest - (char *)stackblock(); +- grabstackstr(dest); ++ startloc = expdest - (char *)stackblock(); ++ pushstackmark(&smark, startloc); + evalbackcmd(cmd, (struct backcmd *) &in); + popstackmark(&smark); + +diff --git a/src/memalloc.c b/src/memalloc.c +index c8147d3..8d3e2ed 100644 +--- a/src/memalloc.c ++++ b/src/memalloc.c +@@ -106,7 +106,6 @@ struct stack_block { + + struct stack_block stackbase; + struct stack_block *stackp = &stackbase; +-struct stackmark *markp; + char *stacknxt = stackbase.space; + size_t stacknleft = MINSIZE; + char *sstrend = stackbase.space + MINSIZE; +@@ -161,14 +160,17 @@ stunalloc(pointer p) + + + +-void +-setstackmark(struct stackmark *mark) ++void pushstackmark(struct stackmark *mark, size_t len) + { + mark->stackp = stackp; + mark->stacknxt = stacknxt; + mark->stacknleft = stacknleft; +- mark->marknext = markp; +- markp = mark; ++ grabstackblock(len); ++} ++ ++void setstackmark(struct stackmark *mark) ++{ ++ pushstackmark(mark, stacknxt == stackp->space && stackp != &stackbase); + } + + +@@ -178,7 +180,6 @@ popstackmark(struct stackmark *mark) + struct stack_block *sp; + + INTOFF; +- markp = mark->marknext; + while (stackp != mark->stackp) { + sp = stackp; + stackp = sp->prev; +@@ -214,7 +215,6 @@ growstackblock(void) + + if (stacknxt == stackp->space && stackp != &stackbase) { + struct stack_block *oldstackp; +- struct stackmark *xmark; + struct stack_block *sp; + struct stack_block *prevstackp; + size_t grosslen; +@@ -230,18 +230,6 @@ growstackblock(void) + stacknxt = sp->space; + stacknleft = newlen; + sstrend = sp->space + newlen; +- +- /* +- * Stack marks pointing to the start of the old block +- * must be relocated to point to the new block +- */ +- xmark = markp; +- while (xmark != NULL && xmark->stackp == oldstackp) { +- xmark->stackp = stackp; +- xmark->stacknxt = stacknxt; +- xmark->stacknleft = stacknleft; +- xmark = xmark->marknext; +- } + INTON; + } else { + char *oldspace = stacknxt; +diff --git a/src/memalloc.h b/src/memalloc.h +index 282dbb0..ad6015d 100644 +--- a/src/memalloc.h ++++ b/src/memalloc.h +@@ -40,7 +40,6 @@ struct stackmark { + struct stack_block *stackp; + char *stacknxt; + size_t stacknleft; +- struct stackmark *marknext; + }; + + +@@ -54,6 +53,7 @@ pointer ckrealloc(pointer, size_t); + char *savestr(const char *); + pointer stalloc(size_t); + void stunalloc(pointer); ++void pushstackmark(struct stackmark *mark, size_t len); + void setstackmark(struct stackmark *); + void popstackmark(struct stackmark *); + void growstackblock(void); +diff --git a/src/parser.c b/src/parser.c +index f49ee7d..d0e0553 100644 +--- a/src/parser.c ++++ b/src/parser.c +@@ -1487,8 +1487,7 @@ setprompt(int which) + show = !el; + #endif + if (show) { +- setstackmark(&smark); +- stalloc(stackblocksize()); ++ pushstackmark(&smark, stackblocksize()); + out2str(getprompt(NULL)); + popstackmark(&smark); + } +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0007--PARSER-Remove-superfluous-arinest-test-in-CENDQUOTE.diff +++ dash-0.5.4/debian/diff/0007--PARSER-Remove-superfluous-arinest-test-in-CENDQUOTE.diff @@ -0,0 +1,44 @@ +From 15ae663711888b7d710950224e0b5e6ae1967bf0 Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Mon, 24 Sep 2007 21:53:49 +0800 +Subject: [PATCH] [PARSER] Remove superfluous arinest test in CENDQUOTE + +If arinest is set then the syntax must be ARISYNTAX. As such CENDQUOTE can +never occur while arinest is set so we don't need to test for it. +--- + ChangeLog | 1 + + src/parser.c | 5 ++--- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 816f56d..0a35741 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -2,6 +2,7 @@ + + * Do not quote back slashes in parameter expansions outside quotes. + * Perform tilde expansion in all parameter expansion words. ++ * Remove superfluous arinest test in CENDQUOTE. + + 2007-09-22 Oleg Verych + +diff --git a/src/parser.c b/src/parser.c +index 279d49e..26c9046 100644 +--- a/src/parser.c ++++ b/src/parser.c +@@ -932,10 +932,9 @@ quotemark: + dblquote = 1; + goto quotemark; + case CENDQUOTE: +- if (eofmark != NULL && arinest == 0 && +- varnest == 0) { ++ if (eofmark && !varnest) + USTPUTC(c, out); +- } else { ++ else { + if (dqvarnest == 0) { + syntax = BASESYNTAX; + dblquote = 0; +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0048--CD-Restored-warning-when-getcwd-fails.diff +++ dash-0.5.4/debian/diff/0048--CD-Restored-warning-when-getcwd-fails.diff @@ -0,0 +1,62 @@ +From b1b709c76ee8667a2bf3e4a143df90f82e19c0f2 Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Sat, 3 May 2008 14:36:08 +0800 +Subject: [PATCH] [CD] Restored warning when getcwd fails + +Somewhere along the lines the warning when getcwd fails went missing. +This patch restores it. + +Signed-off-by: Herbert Xu +--- + ChangeLog | 1 + + src/cd.c | 12 ++++++++++-- + 2 files changed, 11 insertions(+), 2 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 94b37c4..2c04c19 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -2,6 +2,7 @@ + + * Fixed _PATH_BSHELL warning. + * Test __GLIBC__ instead of _GNU_SOURCE. ++ * Restored warning when getcwd fails. + + 2008-05-02 Herbert Xu + +diff --git a/src/cd.c b/src/cd.c +index 73ccde0..624801d 100644 +--- a/src/cd.c ++++ b/src/cd.c +@@ -52,6 +52,7 @@ + #include "error.h" + #include "exec.h" + #include "redir.h" ++#include "main.h" + #include "mystring.h" + #include "show.h" + #include "cd.h" +@@ -251,11 +252,18 @@ getpwd() + { + #ifdef __GLIBC__ + char *dir = getcwd(0, 0); +- return dir ? dir : nullstr; ++ ++ if (dir) ++ return dir; + #else + char buf[PATH_MAX]; +- return getcwd(buf, sizeof(buf)) ? savestr(buf) : nullstr; ++ ++ if (getcwd(buf, sizeof(buf)) ++ return savestr(buf); + #endif ++ ++ sh_warnx("getcwd() failed: %s", strerror(errno)); ++ return nullstr; + } + + int +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0010--PARSER-Remove-arithmetic-expansion-collapsing-at-pa.diff +++ dash-0.5.4/debian/diff/0010--PARSER-Remove-arithmetic-expansion-collapsing-at-pa.diff @@ -0,0 +1,83 @@ +From dedbb1bd38191bba0da44a126aaac9630e7f4415 Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Mon, 24 Sep 2007 22:28:49 +0800 +Subject: [PATCH] [PARSER] Remove arithmetic expansion collapsing at parse time + +Collapsing arithmethc expansion is incorrect when the inner arithmetic +expansion is a part of a parameter expansion. + +Test case: + + unset a + echo $((3 + ${a:=$((4 + 5))})) + echo $a + +Old result: + + (4 + 5) + +New result: + + 9 +--- + ChangeLog | 1 + + src/parser.c | 22 +++++++--------------- + 2 files changed, 8 insertions(+), 15 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index e5987f9..7992485 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -5,6 +5,7 @@ + * Remove superfluous arinest test in CENDQUOTE. + * Remove superfluous arinest test for dqvarnest. + * Remove superfluous dblquote settings when ending arith. ++ * Remove arithmetic expansion collapsing at parse time. + + 2007-09-22 Oleg Verych + +diff --git a/src/parser.c b/src/parser.c +index 791251d..e00fd4b 100644 +--- a/src/parser.c ++++ b/src/parser.c +@@ -967,11 +967,9 @@ quotemark: + --parenlevel; + } else { + if (pgetc() == ')') { +- if (--arinest == 0) { +- USTPUTC(CTLENDARI, out); ++ USTPUTC(CTLENDARI, out); ++ if (!--arinest) + syntax = prevsyntax; +- } else +- USTPUTC(')', out); + } else { + /* + * unbalanced parens +@@ -1373,18 +1371,12 @@ parsearith: { + if (++arinest == 1) { + prevsyntax = syntax; + syntax = ARISYNTAX; +- USTPUTC(CTLARI, out); +- if (dblquote) +- USTPUTC('"',out); +- else +- USTPUTC(' ',out); +- } else { +- /* +- * we collapse embedded arithmetic expansion to +- * parenthesis, which should be equivalent +- */ +- USTPUTC('(', out); + } ++ USTPUTC(CTLARI, out); ++ if (dblquote) ++ USTPUTC('"',out); ++ else ++ USTPUTC(' ',out); + goto parsearith_return; + } + +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0012--EXPAND-Move-parse-time-quote-flag-detection-to-run.diff +++ dash-0.5.4/debian/diff/0012--EXPAND-Move-parse-time-quote-flag-detection-to-run.diff @@ -0,0 +1,572 @@ +From 6d1b5d568b9bfd276d5bbd4d1a961475fdfac38d Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Tue, 25 Sep 2007 22:29:00 +0800 +Subject: [PATCH] [EXPAND] Move parse-time quote flag detection to run-time + +Because the parser does not recursively parse parameter expansion with respect +to quotes, we can't accurately determine quote status at parse time. This +patch works around this by moving the quote detection to run-time where we +do interpret it recursively. + +Test case: + + foo=\\ + echo "<${foo#[\\]}>" + +Old result: + + <\> + +New result: + + <> +--- + ChangeLog | 1 + + src/eval.c | 2 +- + src/expand.c | 110 +++++++++++++++++++++++++------------------------------ + src/expand.h | 2 +- + src/jobs.c | 10 +----- + src/mystring.c | 3 +- + src/mystring.h | 2 +- + src/parser.c | 17 ++------- + src/parser.h | 3 -- + src/show.c | 3 -- + 10 files changed, 60 insertions(+), 93 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index dacc9b3..d5c51bf 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,6 +1,7 @@ + 2007-09-25 Herbert Xu + + * Do not expand tilde in parameter expansion within quotes. ++ * Move parse-time quote flag detection to run-time. + + 2007-09-24 Herbert Xu + +diff --git a/src/eval.c b/src/eval.c +index fed82d5..2aa8317 100644 +--- a/src/eval.c ++++ b/src/eval.c +@@ -377,7 +377,7 @@ evalfor(union node *n, int flags) + setstackmark(&smark); + arglist.lastp = &arglist.list; + for (argp = n->nfor.args ; argp ; argp = argp->narg.next) { +- expandarg(argp, &arglist, EXP_FULL | EXP_TILDE | EXP_RECORD); ++ expandarg(argp, &arglist, EXP_FULL | EXP_TILDE); + /* XXX */ + if (evalskip) + goto out; +diff --git a/src/expand.c b/src/expand.c +index c9f09ff..8c6c7f9 100644 +--- a/src/expand.c ++++ b/src/expand.c +@@ -82,12 +82,11 @@ + */ + #define RMESCAPE_ALLOC 0x1 /* Allocate a new string */ + #define RMESCAPE_GLOB 0x2 /* Add backslashes for glob */ +-#define RMESCAPE_QUOTED 0x4 /* Remove CTLESC unless in quotes */ + #define RMESCAPE_GROW 0x8 /* Grow strings instead of stalloc */ + #define RMESCAPE_HEAP 0x10 /* Malloc strings instead of stalloc */ + + /* Add CTLESC when necessary. */ +-#define QUOTES_ESC (EXP_FULL | EXP_CASE) ++#define QUOTES_ESC (EXP_FULL | EXP_CASE | EXP_QPAT) + /* Do not skip NUL characters. */ + #define QUOTES_KEEPNUL EXP_TILDE + +@@ -116,7 +115,7 @@ static struct arglist exparg; + + STATIC void argstr(char *, int); + STATIC char *exptilde(char *, char *, int); +-STATIC void expbackq(union node *, int, int); ++STATIC void expbackq(union node *, int); + STATIC const char *subevalvar(char *, char *, int, int, int, int, int); + STATIC char *evalvar(char *, int); + STATIC size_t strtodest(const char *, const char *, int); +@@ -158,11 +157,8 @@ STATIC void varunset(const char *, const char *, const char *, int) + */ + + STATIC inline char * +-preglob(const char *pattern, int quoted, int flag) { ++preglob(const char *pattern, int flag) { + flag |= RMESCAPE_GLOB; +- if (quoted) { +- flag |= RMESCAPE_QUOTED; +- } + return _rmescapes((char *)pattern, flag); + } + +@@ -197,7 +193,7 @@ void + expandhere(union node *arg, int fd) + { + herefd = fd; +- expandarg(arg, (struct arglist *)NULL, 0); ++ expandarg(arg, (struct arglist *)NULL, EXP_QUOTED); + xwrite(fd, stackblock(), expdest - (char *)stackblock()); + } + +@@ -271,13 +267,11 @@ argstr(char *p, int flag) + CTLESC, + CTLVAR, + CTLBACKQ, +- CTLBACKQ | CTLQUOTE, + CTLENDARI, + 0 + }; + const char *reject = spclchars; + int c; +- int quotes = flag & QUOTES_ESC; + int breakall = (flag & (EXP_WORD | EXP_QUOTED)) == EXP_WORD; + int inquotes; + size_t length; +@@ -346,21 +340,15 @@ start: + case CTLENDVAR: /* ??? */ + goto breakloop; + case CTLQUOTEMARK: ++ inquotes ^= EXP_QUOTED; + /* "$@" syntax adherence hack */ +- if ( +- !inquotes && +- !memcmp(p, dolatstr, DOLATSTRLEN) && +- (p[4] == (char)CTLQUOTEMARK || ( +- p[4] == (char)CTLENDVAR && +- p[5] == (char)CTLQUOTEMARK +- )) +- ) { +- p = evalvar(p + 1, flag) + 1; ++ if (inquotes && !memcmp(p, dolatstr + 1, ++ DOLATSTRLEN - 1)) { ++ p = evalvar(p + 1, flag | inquotes) + 1; + goto start; + } +- inquotes = !inquotes; + addquote: +- if (quotes) { ++ if (flag & QUOTES_ESC) { + p--; + length++; + startloc++; +@@ -369,19 +357,27 @@ addquote: + case CTLESC: + startloc++; + length++; ++ ++ /* ++ * Quoted parameter expansion pattern: remove quote ++ * unless inside inner quotes or we have a literal ++ * backslash. ++ */ ++ if (((flag | inquotes) & (EXP_QPAT | EXP_QUOTED)) == ++ EXP_QPAT && *p != '\\') ++ break; ++ + goto addquote; + case CTLVAR: +- p = evalvar(p, flag); ++ p = evalvar(p, flag | inquotes); + goto start; + case CTLBACKQ: +- c = 0; +- case CTLBACKQ|CTLQUOTE: +- expbackq(argbackq->n, c, quotes); ++ expbackq(argbackq->n, flag | inquotes); + argbackq = argbackq->next; + goto start; + case CTLENDARI: + p--; +- expari(quotes); ++ expari(flag | inquotes); + goto start; + } + } +@@ -480,11 +476,10 @@ removerecordregions(int endoff) + * evaluate, place result in (backed up) result, adjust string position. + */ + void +-expari(int quotes) ++expari(int flag) + { + char *p, *start; + int begoff; +- int flag; + int len; + + /* ifsfree(); */ +@@ -522,16 +517,14 @@ expari(int quotes) + + removerecordregions(begoff); + +- flag = p[1]; +- + expdest = p; + +- if (quotes) +- rmescapes(p + 2); ++ if (flag & QUOTES_ESC) ++ rmescapes(p + 1); + +- len = cvtnum(arith(p + 2)); ++ len = cvtnum(arith(p + 1)); + +- if (flag != '"') ++ if (!(flag & EXP_QUOTED)) + recordregion(begoff, begoff + len, 0); + } + +@@ -541,7 +534,7 @@ expari(int quotes) + */ + + STATIC void +-expbackq(union node *cmd, int quoted, int quotes) ++expbackq(union node *cmd, int flag) + { + struct backcmd in; + int i; +@@ -549,7 +542,7 @@ expbackq(union node *cmd, int quoted, int quotes) + char *p; + char *dest; + int startloc; +- char const *syntax = quoted? DQSYNTAX : BASESYNTAX; ++ char const *syntax = flag & EXP_QUOTED ? DQSYNTAX : BASESYNTAX; + struct stackmark smark; + + INTOFF; +@@ -565,7 +558,7 @@ expbackq(union node *cmd, int quoted, int quotes) + if (i == 0) + goto read; + for (;;) { +- memtodest(p, i, syntax, quotes); ++ memtodest(p, i, syntax, flag & QUOTES_ESC); + read: + if (in.fd < 0) + break; +@@ -592,7 +585,7 @@ read: + STUNPUTC(dest); + expdest = dest; + +- if (quoted == 0) ++ if (!(flag & EXP_QUOTED)) + recordregion(startloc, dest - (char *)stackblock(), 0); + TRACE(("evalbackq: size=%d: \"%.*s\"\n", + (dest - (char *)stackblock()) - startloc, +@@ -669,8 +662,9 @@ scanright( + } + + STATIC const char * +-subevalvar(char *p, char *str, int strloc, int subtype, int startloc, int varflags, int quotes) ++subevalvar(char *p, char *str, int strloc, int subtype, int startloc, int varflags, int flag) + { ++ int quotes = flag & QUOTES_ESC; + char *startp; + char *loc; + int saveherefd = herefd; +@@ -682,7 +676,7 @@ subevalvar(char *p, char *str, int strloc, int subtype, int startloc, int varfla + + herefd = -1; + argstr(p, EXP_TILDE | (subtype != VSASSIGN && subtype != VSQUESTION ? +- EXP_CASE : 0)); ++ (flag & EXP_QUOTED ? EXP_QPAT : EXP_CASE) : 0)); + STPUTC('\0', expdest); + herefd = saveherefd; + argbackq = saveargbackq; +@@ -717,7 +711,7 @@ subevalvar(char *p, char *str, int strloc, int subtype, int startloc, int varfla + } + rmescend--; + str = stackblock() + strloc; +- preglob(str, varflags & VSQUOTE, 0); ++ preglob(str, 0); + + /* zero = subtype == VSTRIMLEFT || subtype == VSTRIMLEFTMAX */ + zero = subtype >> 1; +@@ -753,13 +747,11 @@ evalvar(char *p, int flag) + int startloc; + ssize_t varlen; + int easy; +- int quotes; + int quoted; + +- quotes = flag & QUOTES_ESC; + varflags = *p++; + subtype = varflags & VSTYPE; +- quoted = varflags & VSQUOTE; ++ quoted = flag & EXP_QUOTED; + var = p; + easy = (!quoted || (*var == '@' && shellparam.nparam)); + startloc = expdest - (char *)stackblock(); +@@ -778,8 +770,7 @@ again: + if (subtype == VSMINUS) { + vsplus: + if (varlen < 0) { +- argstr(p, flag | EXP_TILDE | EXP_WORD | +- (quoted ? EXP_QUOTED : 0)); ++ argstr(p, flag | EXP_TILDE | EXP_WORD); + goto end; + } + if (easy) +@@ -790,7 +781,7 @@ vsplus: + if (subtype == VSASSIGN || subtype == VSQUESTION) { + if (varlen < 0) { + if (subevalvar(p, var, 0, subtype, startloc, +- varflags, 0)) { ++ varflags, flag & ~QUOTES_ESC)) { + varflags &= ~VSNUL; + /* + * Remove any recorded regions beyond +@@ -842,7 +833,7 @@ record: + STPUTC('\0', expdest); + patloc = expdest - (char *)stackblock(); + if (subevalvar(p, NULL, patloc, subtype, +- startloc, varflags, quotes) == 0) { ++ startloc, varflags, flag) == 0) { + int amount = expdest - ( + (char *)stackblock() + patloc - 1 + ); +@@ -859,7 +850,7 @@ end: + for (;;) { + if ((c = (signed char)*p++) == CTLESC) + p++; +- else if (c == CTLBACKQ || c == (CTLBACKQ|CTLQUOTE)) { ++ else if (c == CTLBACKQ) { + if (varlen >= 0) + argbackq = argbackq->next; + } else if (c == CTLVAR) { +@@ -930,7 +921,7 @@ varvalue(char *name, int varflags, int flags) + char sepc; + char **ap; + char const *syntax; +- int quoted = varflags & VSQUOTE; ++ int quoted = flags & EXP_QUOTED; + int subtype = varflags & VSTYPE; + int discard = subtype == VSPLUS || subtype == VSLENGTH; + int quotes = (discard ? 0 : (flags & QUOTES_ESC)) | QUOTES_KEEPNUL; +@@ -1175,7 +1166,7 @@ expandmeta(str, flag) + if (fflag) + goto nometa; + INTOFF; +- p = preglob(str->text, 0, RMESCAPE_ALLOC | RMESCAPE_HEAP); ++ p = preglob(str->text, RMESCAPE_ALLOC | RMESCAPE_HEAP); + i = glob(p, GLOB_NOMAGIC, 0, &pglob); + if (p != str->text) + ckfree(p); +@@ -1244,7 +1235,7 @@ expandmeta(struct strlist *str, int flag) + savelastp = exparg.lastp; + + INTOFF; +- p = preglob(str->text, 0, RMESCAPE_ALLOC | RMESCAPE_HEAP); ++ p = preglob(str->text, RMESCAPE_ALLOC | RMESCAPE_HEAP); + { + int i = strlen(str->text); + expdir = ckmalloc(i < 2048 ? 2048 : i); /* XXX */ +@@ -1475,7 +1466,7 @@ msort(struct strlist *list, int len) + STATIC inline int + patmatch(char *pattern, const char *string) + { +- return pmatch(preglob(pattern, 0, 0), string); ++ return pmatch(preglob(pattern, 0), string); + } + + +@@ -1651,7 +1642,7 @@ _rmescapes(char *str, int flag) + q = mempcpy(q, str, len); + } + } +- inquotes = (flag & RMESCAPE_QUOTED) ^ RMESCAPE_QUOTED; ++ inquotes = 0; + globbing = flag & RMESCAPE_GLOB; + notescaped = globbing; + while (*p) { +@@ -1661,15 +1652,14 @@ _rmescapes(char *str, int flag) + notescaped = globbing; + continue; + } +- if (*p == '\\') { +- /* naked back slash */ +- notescaped = 0; +- goto copy; +- } + if (*p == (char)CTLESC) { + p++; +- if (notescaped && inquotes) ++ if (notescaped) + *q++ = '\\'; ++ } else if (*p == '\\' && !inquotes) { ++ /* naked back slash */ ++ notescaped = 0; ++ goto copy; + } + notescaped = globbing; + copy: +diff --git a/src/expand.h b/src/expand.h +index be7ec6f..4dfbc43 100644 +--- a/src/expand.h ++++ b/src/expand.h +@@ -53,7 +53,7 @@ struct arglist { + #define EXP_VARTILDE 0x4 /* expand tildes in an assignment */ + #define EXP_REDIR 0x8 /* file glob for a redirection (1 match only) */ + #define EXP_CASE 0x10 /* keeps quotes around for CASE pattern */ +-#define EXP_RECORD 0x20 /* need to record arguments for ifs breakup */ ++#define EXP_QPAT 0x20 /* pattern in quoted parameter expansion */ + #define EXP_VARTILDE2 0x40 /* expand tildes after colons only */ + #define EXP_WORD 0x80 /* expand word in parameter expansion */ + #define EXP_QUOTED 0x100 /* expand word in double quotes */ +diff --git a/src/jobs.c b/src/jobs.c +index 7285d0d..529d615 100644 +--- a/src/jobs.c ++++ b/src/jobs.c +@@ -1377,12 +1377,7 @@ cmdputs(const char *s) + str = "${#"; + else + str = "${"; +- if (!(subtype & VSQUOTE) != !(quoted & 1)) { +- quoted ^= 1; +- c = '"'; +- } else +- goto dostr; +- break; ++ goto dostr; + case CTLENDVAR: + str = "\"}" + !(quoted & 1); + quoted >>= 1; +@@ -1391,9 +1386,6 @@ cmdputs(const char *s) + case CTLBACKQ: + str = "$(...)"; + goto dostr; +- case CTLBACKQ+CTLQUOTE: +- str = "\"$(...)\""; +- goto dostr; + case CTLARI: + str = "$(("; + goto dostr; +diff --git a/src/mystring.c b/src/mystring.c +index 49201a9..7d937a8 100644 +--- a/src/mystring.c ++++ b/src/mystring.c +@@ -55,7 +55,8 @@ + char nullstr[1]; /* zero length string */ + const char spcstr[] = " "; + const char snlfmt[] = "%s\n"; +-const char dolatstr[] = { CTLVAR, VSNORMAL|VSQUOTE, '@', '=', '\0' }; ++const char dolatstr[] = { CTLQUOTEMARK, CTLVAR, VSNORMAL, '@', '=', ++ CTLQUOTEMARK, '\0' }; + const char illnum[] = "Illegal number: %s"; + const char homestr[] = "HOME"; + +diff --git a/src/mystring.h b/src/mystring.h +index 44fd7e4..f451cc2 100644 +--- a/src/mystring.h ++++ b/src/mystring.h +@@ -39,7 +39,7 @@ + extern const char snlfmt[]; + extern const char spcstr[]; + extern const char dolatstr[]; +-#define DOLATSTRLEN 4 ++#define DOLATSTRLEN 6 + extern const char illnum[]; + extern const char homestr[]; + +diff --git a/src/parser.c b/src/parser.c +index e00fd4b..1a483d4 100644 +--- a/src/parser.c ++++ b/src/parser.c +@@ -911,11 +911,9 @@ readtoken1(int firstc, char const *syntax, char *eofmark, int striptabs) + eofmark != NULL + ) + ) { +- USTPUTC(CTLESC, out); + USTPUTC('\\', out); + } +- if (SQSYNTAX[c] == CCTL) +- USTPUTC(CTLESC, out); ++ USTPUTC(CTLESC, out); + USTPUTC(c, out); + quotef++; + } +@@ -1221,8 +1219,6 @@ badsub: synerror("Bad substitution"); + } else { + pungetc(); + } +- if (dblquote || arinest) +- flags |= VSQUOTE; + *((char *)stackblock() + typeloc) = subtype | flags; + if (subtype != VSNORMAL) { + varnest++; +@@ -1353,10 +1349,7 @@ done: + memcpy(out, str, savelen); + STADJUST(savelen, out); + } +- if (arinest || dblquote) +- USTPUTC(CTLBACKQ | CTLQUOTE, out); +- else +- USTPUTC(CTLBACKQ, out); ++ USTPUTC(CTLBACKQ, out); + if (oldstyle) + goto parsebackq_oldreturn; + else +@@ -1373,10 +1366,6 @@ parsearith: { + syntax = ARISYNTAX; + } + USTPUTC(CTLARI, out); +- if (dblquote) +- USTPUTC('"',out); +- else +- USTPUTC(' ',out); + goto parsearith_return; + } + +@@ -1503,7 +1492,7 @@ expandstr(const char *ps) + n.narg.text = wordtext; + n.narg.backquote = backquotelist; + +- expandarg(&n, NULL, 0); ++ expandarg(&n, NULL, EXP_QUOTED); + return stackblock(); + } + +diff --git a/src/parser.h b/src/parser.h +index 76ec839..badbd07 100644 +--- a/src/parser.h ++++ b/src/parser.h +@@ -40,8 +40,6 @@ + #define CTLVAR -126 /* variable defn */ + #define CTLENDVAR -125 + #define CTLBACKQ -124 +-#define CTLQUOTE 01 /* ored with CTLBACKQ code if in quotes */ +-/* CTLBACKQ | CTLQUOTE == -123 */ + #define CTLARI -122 /* arithmetic expression */ + #define CTLENDARI -121 + #define CTLQUOTEMARK -120 +@@ -50,7 +48,6 @@ + /* variable substitution byte (follows CTLVAR) */ + #define VSTYPE 0x0f /* type of variable substitution */ + #define VSNUL 0x10 /* colon--treat the empty string as unset */ +-#define VSQUOTE 0x80 /* inside double quotes--suppress splitting */ + + /* values of VSTYPE field */ + #define VSNORMAL 0x1 /* normal variable: $var or ${var} */ +diff --git a/src/show.c b/src/show.c +index 1b58de1..14dbef3 100644 +--- a/src/show.c ++++ b/src/show.c +@@ -222,7 +222,6 @@ sharg(union node *arg, FILE *fp) + putc('}', fp); + break; + case CTLBACKQ: +- case CTLBACKQ|CTLQUOTE: + putc('$', fp); + putc('(', fp); + shtree(bqlist->n, -1, NULL, fp); +@@ -314,9 +313,7 @@ trstring(char *s) + case '\\': c = '\\'; goto backslash; + case CTLESC: c = 'e'; goto backslash; + case CTLVAR: c = 'v'; goto backslash; +- case CTLVAR+CTLQUOTE: c = 'V'; goto backslash; + case CTLBACKQ: c = 'q'; goto backslash; +- case CTLBACKQ+CTLQUOTE: c = 'Q'; goto backslash; + backslash: putc('\\', tracefile); + putc(c, tracefile); + break; +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0056--BUILTIN-Made-aexpr-oexpr-non-recursive.diff +++ dash-0.5.4/debian/diff/0056--BUILTIN-Made-aexpr-oexpr-non-recursive.diff @@ -0,0 +1,77 @@ +From 77092009dabb07fa0622d856ae9cfbfc65bee850 Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Sun, 13 Jul 2008 20:05:56 +0800 +Subject: [PATCH] [BUILTIN] Made aexpr/oexpr non-recursive + +Making these functions non-recursive is straightforward since they +carry no state. + +Signed-off-by: Herbert Xu +--- + ChangeLog | 1 + + src/bltin/test.c | 31 +++++++++++++++++++------------ + 2 files changed, 20 insertions(+), 12 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index b2f7333..ef45102 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,6 +1,7 @@ + 2008-06-13 Herbert Xu + + * Fixed 3,4-argument cases for test per POSIX. ++ * Made aexpr/oexpr non-recursive. + + 2008-05-19 Herbert Xu + +diff --git a/src/bltin/test.c b/src/bltin/test.c +index 89d8d86..32a12fe 100644 +--- a/src/bltin/test.c ++++ b/src/bltin/test.c +@@ -232,24 +232,31 @@ syntax(const char *op, const char *msg) + static int + oexpr(enum token n) + { +- int res; +- +- res = aexpr(n); +- if (t_lex(*++t_wp) == BOR) +- return oexpr(t_lex(*++t_wp)) || res; +- t_wp--; ++ int res = 0; ++ ++ for (;;) { ++ res |= aexpr(n); ++ n = t_lex(t_wp[1]); ++ if (n != BOR) ++ break; ++ n = t_lex(*(t_wp += 2)); ++ } + return res; + } + + static int + aexpr(enum token n) + { +- int res; +- +- res = nexpr(n); +- if (t_lex(*++t_wp) == BAND) +- return aexpr(t_lex(*++t_wp)) && res; +- t_wp--; ++ int res = 1; ++ ++ for (;;) { ++ if (!nexpr(n)) ++ res = 0; ++ n = t_lex(t_wp[1]); ++ if (n != BAND) ++ break; ++ n = t_lex(*(t_wp += 2)); ++ } + return res; + } + +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0037--EXPAND-Expand-here-documents-in-the-current-shell-e.diff +++ dash-0.5.4/debian/diff/0037--EXPAND-Expand-here-documents-in-the-current-shell-e.diff @@ -0,0 +1,133 @@ +From f8013c456e399928b0d4de8d5d8c874b348e4231 Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Sun, 11 Nov 2007 15:27:00 +0800 +Subject: [PATCH] [EXPAND] Expand here-documents in the current shell environment + +Previously we always expanded here-documents in a subshell. This is +contrary to the POSIX specification and how other shells behave. What's +more this slows down many expansions due to the extra fork (however, it +must be said that it is possible for it speed up certain expansions by +running it simultaneously with the command on two CPUs). + +This patch move the expansion into the current shell environment. + +Test case: + + unset a + cat <<- EOF > /dev/null + ${a=NOT} + EOF + echo ${a}BAD + +Old result: + + BAD + +New result: + + NOTBAD +--- + ChangeLog | 1 + + src/expand.c | 12 ------------ + src/expand.h | 1 - + src/redir.c | 24 ++++++++++++++---------- + 4 files changed, 15 insertions(+), 23 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 39940b9..de37261 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -2,6 +2,7 @@ + + * Removed noexpand/length check on eofmark. + * Removed herefd hack. ++ * Expand here-documents in the current shell environment. + + 2007-10-20 Herbert Xu + +diff --git a/src/expand.c b/src/expand.c +index ee699e8..f3d63c4 100644 +--- a/src/expand.c ++++ b/src/expand.c +@@ -178,18 +178,6 @@ static inline const char *getpwhome(const char *name) + + + /* +- * Expand shell variables and backquotes inside a here document. +- */ +- +-void +-expandhere(union node *arg, int fd) +-{ +- expandarg(arg, (struct arglist *)NULL, EXP_QUOTED); +- xwrite(fd, stackblock(), expdest - (char *)stackblock()); +-} +- +- +-/* + * Perform variable substitution and command substitution on an argument, + * placing the resulting list of arguments in arglist. If EXP_FULL is true, + * perform splitting and file name expansion. When arglist is NULL, perform +diff --git a/src/expand.h b/src/expand.h +index 225b004..1862aea 100644 +--- a/src/expand.h ++++ b/src/expand.h +@@ -62,7 +62,6 @@ struct arglist { + + + union node; +-void expandhere(union node *, int); + void expandarg(union node *, struct arglist *, int); + void expari(int); + #define rmescapes(p) _rmescapes((p), 0) +diff --git a/src/redir.c b/src/redir.c +index 33dbc88..ce34db0 100644 +--- a/src/redir.c ++++ b/src/redir.c +@@ -295,18 +295,25 @@ err: + STATIC int + openhere(union node *redir) + { ++ char *p; + int pip[2]; + size_t len = 0; + + if (pipe(pip) < 0) + sh_error("Pipe call failed"); +- if (redir->type == NHERE) { +- len = strlen(redir->nhere.doc->narg.text); +- if (len <= PIPESIZE) { +- xwrite(pip[1], redir->nhere.doc->narg.text, len); +- goto out; +- } ++ ++ p = redir->nhere.doc->narg.text; ++ if (redir->type == NXHERE) { ++ expandarg(redir->nhere.doc, NULL, EXP_QUOTED); ++ p = stackblock(); ++ } ++ ++ len = strlen(p); ++ if (len <= PIPESIZE) { ++ xwrite(pip[1], p, len); ++ goto out; + } ++ + if (forkshell((struct job *)NULL, (union node *)NULL, FORK_NOJOB) == 0) { + close(pip[0]); + signal(SIGINT, SIG_IGN); +@@ -316,10 +323,7 @@ openhere(union node *redir) + signal(SIGTSTP, SIG_IGN); + #endif + signal(SIGPIPE, SIG_DFL); +- if (redir->type == NHERE) +- xwrite(pip[1], redir->nhere.doc->narg.text, len); +- else +- expandhere(redir->nhere.doc, pip[1]); ++ xwrite(pip[1], p, len); + _exit(0); + } + out: +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0047--CD-Test-__GLIBC__-instead-of-_GNU_SOURCE.diff +++ dash-0.5.4/debian/diff/0047--CD-Test-__GLIBC__-instead-of-_GNU_SOURCE.diff @@ -0,0 +1,42 @@ +From 76924437bb2ca09f82b139c533519e515d40519c Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Sat, 3 May 2008 14:17:40 +0800 +Subject: [PATCH] [CD] Test __GLIBC__ instead of _GNU_SOURCE + +AC_GNU_SOURCE always defines _GNU_SOURCE so testing it is pointless. +This patch changes it to test __GLIBC__ instead. + +Signed-off-by: Herbert Xu +--- + ChangeLog | 1 + + src/cd.c | 2 +- + 2 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 1126b04..94b37c4 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,6 +1,7 @@ + 2008-05-03 Herbert Xu + + * Fixed _PATH_BSHELL warning. ++ * Test __GLIBC__ instead of _GNU_SOURCE. + + 2008-05-02 Herbert Xu + +diff --git a/src/cd.c b/src/cd.c +index cb6e24d..73ccde0 100644 +--- a/src/cd.c ++++ b/src/cd.c +@@ -249,7 +249,7 @@ inline + STATIC char * + getpwd() + { +-#ifdef _GNU_SOURCE ++#ifdef __GLIBC__ + char *dir = getcwd(0, 0); + return dir ? dir : nullstr; + #else +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0045-dash-l-option.diff +++ dash-0.5.4/debian/diff/0045-dash-l-option.diff @@ -0,0 +1,79 @@ +--- ./src/options.h~ 2007-07-13 10:26:43.000000000 +0200 ++++ ./src/options.h 2008-02-06 15:51:40.000000000 +0100 +@@ -59,10 +59,11 @@ + #define aflag optlist[12] + #define bflag optlist[13] + #define uflag optlist[14] +-#define nolog optlist[15] +-#define debug optlist[16] ++#define lflag optlist[15] ++#define nolog optlist[16] ++#define debug optlist[17] + +-#define NOPTS 17 ++#define NOPTS 18 + + extern const char optletters[NOPTS]; + extern char optlist[NOPTS]; +--- ./src/options.c~ 2007-07-13 10:26:43.000000000 +0200 ++++ ./src/options.c 2008-02-06 15:52:32.000000000 +0100 +@@ -79,6 +79,7 @@ + "allexport", + "notify", + "nounset", ++ "login", + "nolog", + "debug", + }; +@@ -99,6 +100,7 @@ + 'a', + 'b', + 'u', ++ 'l', + 0, + 0, + }; +--- ./src/main.c~ 2007-07-13 10:26:43.000000000 +0200 ++++ ./src/main.c 2008-02-06 16:03:52.000000000 +0100 +@@ -33,6 +33,7 @@ + */ + + #include ++#include + #include + #include + #include +@@ -149,12 +150,21 @@ + init(); + setstackmark(&smark); + procargs(argc, argv); +- if (argv[0] && argv[0][0] == '-') { ++ if ((argv[0] && argv[0][0] == '-') || lflag) { ++ char *envhome; + state = 1; + read_profile("/etc/profile"); + state1: + state = 2; + read_profile(".profile"); ++ if ((envhome = getenv(homestr)) == NULL) ++ read_profile(".profile"); ++ else { ++ char *homeprof = (char *) alloca(strlen(envhome)+strlen("/.profile")+1); ++ strcpy(homeprof, envhome); ++ strcat(homeprof, "/.profile"); ++ read_profile(homeprof); ++ } + } + state2: + state = 3; +--- ./src/dash.1~ 2007-07-13 10:26:42.000000000 +0200 ++++ ./src/dash.1 2008-02-06 16:09:19.000000000 +0100 +@@ -235,6 +235,8 @@ + Ignore EOF's from input when interactive. + .It Fl i Em interactive + Force the shell to behave interactively. ++.It Fl l Em login ++Make dash act as if it had been invoked as a login shell. + .It Fl m Em monitor + Turn on job control (set automatically when interactive). + .It Fl s Em stdin --- dash-0.5.4.orig/debian/diff/0013--MAN-Clarify-description-of-nt-ot-options-to-test.diff +++ dash-0.5.4/debian/diff/0013--MAN-Clarify-description-of-nt-ot-options-to-test.diff @@ -0,0 +1,58 @@ +From 63ac280a1bc06efeaa670786c091deb78a57e426 Mon Sep 17 00:00:00 2001 +From: Gerrit Pape +Date: Tue, 25 Sep 2007 22:46:55 +0800 +Subject: [PATCH] [MAN] Clarify description of -nt, -ot options to test builtin + +Have the man page explicitely state how the test builtin behaves on +-nt and -ot options if file2 does not exist. The case where file1 +does not exist was already documented properly. + +This was noticed by Sven Mueller and reported through + http://bugs.debian.org/373611 +--- + ChangeLog | 4 ++++ + src/dash.1 | 12 ++++++++++-- + 2 files changed, 14 insertions(+), 2 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index d5c51bf..4ea7374 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++2007-09-25 Gerrit Pape ++ ++ * Clarify description of -nt, -ot options to test builtin. ++ + 2007-09-25 Herbert Xu + + * Do not expand tilde in parameter expansion within quotes. +diff --git a/src/dash.1 b/src/dash.1 +index 00f40bd..3aefe21 100644 +--- a/src/dash.1 ++++ b/src/dash.1 +@@ -1934,12 +1934,20 @@ exists and is a socket. + .It Ar file1 Fl nt Ar file2 + True if + .Ar file1 +-exists and is newer than ++and ++.Ar file2 ++exist and ++.Ar file1 ++is newer than + .Ar file2 . + .It Ar file1 Fl ot Ar file2 + True if + .Ar file1 +-exists and is older than ++and ++.Ar file2 ++exist and ++.Ar file1 ++is older than + .Ar file2 . + .It Ar file1 Fl ef Ar file2 + True if +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0052--SHELL-Added-gitignore.diff +++ dash-0.5.4/debian/diff/0052--SHELL-Added-gitignore.diff @@ -0,0 +1,49 @@ +From fb6842ef95b720d42c8ab828c7a299ea8406e7f8 Mon Sep 17 00:00:00 2001 +From: Dan McGee +Date: Sat, 3 May 2008 15:08:22 +0800 +Subject: [PATCH] [SHELL] Added gitignore + +This gitignore covers most of the generated files in the src/ directory. + +Signed-off-by: Dan McGee +Signed-off-by: Herbert Xu +--- + ChangeLog | 1 + + src/.gitignore | 13 +++++++++++++ + 2 files changed, 14 insertions(+), 0 deletions(-) + create mode 100644 src/.gitignore + +diff --git a/ChangeLog b/ChangeLog +index 7fba27f..c277720 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,6 +1,7 @@ + 2008-05-03 Dan McGee + + * Fixed klibc/klcc build problems. ++ * Added gitignore. + + 2008-05-03 Herbert Xu + +diff --git a/src/.gitignore b/src/.gitignore +new file mode 100644 +index 0000000..644eccb +--- /dev/null ++++ b/src/.gitignore +@@ -0,0 +1,13 @@ ++*.o ++builtins.[ch] ++builtins.def ++dash ++init.c ++mkinit ++mknodes ++mksignames ++mksyntax ++nodes.[ch] ++signames.c ++syntax.[ch] ++token.h +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0035--PARSER-Removed-noexpand-length-check-on-eofmark.diff +++ dash-0.5.4/debian/diff/0035--PARSER-Removed-noexpand-length-check-on-eofmark.diff @@ -0,0 +1,293 @@ +From 025d60d9cd4a8ba124682366321b551c712534b9 Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Sun, 11 Nov 2007 14:21:23 +0800 +Subject: [PATCH] [PARSER] Removed noexpand/length check on eofmark + +On Tue, Oct 30, 2007 at 04:23:35AM +0000, Oleg Verych wrote: +> +> } 8<<"" +> ====================== + +Actually this (the empty delim) only works with dash by accident. +I've tried bash and pdksh and they both terminate on the first +empty line which is what you would expect rather than EOF. The +real Korn shell does something completely different. + +I've fixed this in dash to conform to bash/pdksh. + +> In [0] it's stated, that delimiter isn't evaluated (expanded), only +> quoiting must be checked. That if() seems to be completely bogus. + +OK I agree. The reason it was there is because the parser would +have already replaced the dollar sign by an internal representation. + +I've fixed it properly with this patch. + +Test case: + + cat <<- $a + OK + $a + + cat <<- "" + OK + + echo OK + +Old result: + + dash: Syntax error: Illegal eof marker for << redirection + OK + + echo OK + +New result: + + OK + OK + OK +--- + ChangeLog | 4 ++ + src/input.c | 27 ------------------ + src/input.h | 1 - + src/parser.c | 88 +++++++++++++++++++++++++-------------------------------- + src/parser.h | 1 + + 5 files changed, 44 insertions(+), 77 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index d50d36c..ad98810 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++2007-11-11 Herbert Xu ++ ++ * Removed noexpand/length check on eofmark. ++ + 2007-10-20 Herbert Xu + + * Added configure --enable-glob and --enable-fnmatch options. +diff --git a/src/input.c b/src/input.c +index 11f7a3f..bc84e57 100644 +--- a/src/input.c ++++ b/src/input.c +@@ -125,33 +125,6 @@ RESET { + + + /* +- * Read a line from the script. +- */ +- +-char * +-pfgets(char *line, int len) +-{ +- char *p = line; +- int nleft = len; +- int c; +- +- while (--nleft > 0) { +- c = pgetc2(); +- if (c == PEOF) { +- if (p == line) +- return NULL; +- break; +- } +- *p++ = c; +- if (c == '\n') +- break; +- } +- *p = '\0'; +- return line; +-} +- +- +-/* + * Read a character from the script, returning PEOF on end of file. + * Nul characters in the input are silently discarded. + */ +diff --git a/src/input.h b/src/input.h +index 1ed9ddf..1d6f528 100644 +--- a/src/input.h ++++ b/src/input.h +@@ -50,7 +50,6 @@ extern int plinno; + extern int parsenleft; /* number of characters left in input buffer */ + extern char *parsenextc; /* next character in input buffer */ + +-char *pfgets(char *, int); + int pgetc(void); + int pgetc2(void); + int preadbuffer(void); +diff --git a/src/parser.c b/src/parser.c +index 3832f0b..2d20b00 100644 +--- a/src/parser.c ++++ b/src/parser.c +@@ -59,8 +59,6 @@ + * Shell command parser. + */ + +-#define EOFMARKLEN 79 +- + /* values returned by readtoken */ + #include "token.h" + +@@ -101,7 +99,6 @@ STATIC int peektoken(void); + STATIC int readtoken(void); + STATIC int xxreadtoken(void); + STATIC int readtoken1(int, char const *, char *, int); +-STATIC int noexpand(char *); + STATIC void synexpect(int) __attribute__((__noreturn__)); + STATIC void synerror(const char *) __attribute__((__noreturn__)); + STATIC void setprompt(int); +@@ -596,18 +593,17 @@ parsefname(void) + { + union node *n = redirnode; + ++ if (n->type == NHERE) ++ checkkwd = CHKEOFMARK; + if (readtoken() != TWORD) + synexpect(-1); + if (n->type == NHERE) { + struct heredoc *here = heredoc; + struct heredoc *p; +- int i; + + if (quoteflag == 0) + n->type = NXHERE; + TRACE(("Here document %d\n", n->type)); +- if (! noexpand(wordtext) || (i = strlen(wordtext)) == 0 || i > EOFMARKLEN) +- synerror("Illegal eof marker for << redirection"); + rmescapes(wordtext); + here->eofmark = wordtext; + here->next = NULL; +@@ -836,7 +832,6 @@ readtoken1(int firstc, char const *syntax, char *eofmark, int striptabs) + int c = firstc; + char *out; + int len; +- char line[EOFMARKLEN + 1]; + struct nodelist *bqlist; + int quotef; + int dblquote; +@@ -1036,6 +1031,9 @@ endword: + + checkend: { + if (eofmark) { ++ int markloc; ++ char *p; ++ + if (c == PEOA) { + c = pgetc2(); + } +@@ -1044,28 +1042,42 @@ checkend: { + c = pgetc2(); + } + } +- if (c == *eofmark) { +- if (pfgets(line, sizeof line) != NULL) { +- char *p, *q; +- int cc; +- +- p = line; +- for (q = eofmark + 1;; p++, q++) { +- cc = *p; +- if (cc == '\n') +- cc = 0; +- if (!*q || cc != *q) +- break; +- } +- if (cc == *q) { +- c = PEOF; +- plinno++; +- needprompt = doprompt; +- } else { +- pushstring(line, NULL); ++ ++ markloc = out - (char *)stackblock(); ++ for (p = eofmark; STPUTC(c, out), *p; p++) { ++ if (c != *p) ++ goto more_heredoc; ++ ++ c = pgetc2(); ++ } ++ ++ if (c == '\n' || c == PEOF) { ++ c = PEOF; ++ plinno++; ++ needprompt = doprompt; ++ } else { ++ int len; ++ ++more_heredoc: ++ p = (char *)stackblock() + markloc + 1; ++ len = out - p; ++ ++ if (len) { ++ len -= c < 0; ++ c = p[-1]; ++ ++ if (len) { ++ char *str; ++ ++ str = alloca(len + 1); ++ *(char *)mempcpy(str, p, len) = 0; ++ ++ pushstring(str, NULL); + } + } + } ++ ++ STADJUST((char *)stackblock() + markloc - out, out); + } + goto checkend_return; + } +@@ -1148,6 +1160,7 @@ parsesub: { + + c = pgetc(); + if ( ++ (checkkwd & CHKEOFMARK) || + c <= PEOA || + (c != '(' && c != '{' && !is_name(c) && !is_special(c)) + ) { +@@ -1400,29 +1413,6 @@ RESET { + } + #endif + +-/* +- * Returns true if the text contains nothing to expand (no dollar signs +- * or backquotes). +- */ +- +-STATIC int +-noexpand(char *text) +-{ +- char *p; +- signed char c; +- +- p = text; +- while ((c = *p++) != '\0') { +- if (c == CTLQUOTEMARK) +- continue; +- if (c == CTLESC) +- p++; +- else if (BASESYNTAX[(int)c] == CCTL) +- return 0; +- } +- return 1; +-} +- + + /* + * Return of a legal variable name (a letter or underscore followed by zero or +diff --git a/src/parser.h b/src/parser.h +index badbd07..6bdf1c9 100644 +--- a/src/parser.h ++++ b/src/parser.h +@@ -65,6 +65,7 @@ + #define CHKALIAS 0x1 + #define CHKKWD 0x2 + #define CHKNL 0x4 ++#define CHKEOFMARK 0x8 + + + /* +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0002--SHELL-Move-flushall-to-the-point-just-before-_exit.diff +++ dash-0.5.4/debian/diff/0002--SHELL-Move-flushall-to-the-point-just-before-_exit.diff @@ -0,0 +1,48 @@ +From 3a85fe7b393a4beb8f4294daf7d0176c6f426a28 Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Sat, 22 Sep 2007 20:50:21 +0800 +Subject: [PATCH] [SHELL] Move flushall to the point just before _exit + +We need to flush at the very end in case we've generated any errors +before that. The flushall call cannot perform a longjmp so it's +safe there. +--- + ChangeLog | 4 ++++ + src/trap.c | 2 +- + 2 files changed, 5 insertions(+), 1 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 295fa66..ba974ca 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++2007-09-22 Herbert Xu ++ ++ * Move flushall to the point just before _exit. ++ + 2007-09-21 Denis Vlasenko + + * Restore foreground process group on exit. +diff --git a/src/trap.c b/src/trap.c +index c386db7..58cd0cc 100644 +--- a/src/trap.c ++++ b/src/trap.c +@@ -365,7 +365,6 @@ exitshell(void) + trap[0] = NULL; + evalstring(p, 0); + } +- flushall(); + out: + /* + * Disable job control so that whoever had the foreground before we +@@ -373,6 +372,7 @@ out: + */ + if (likely(!setjmp(loc.loc))) + setjobctl(0); ++ flushall(); + _exit(status); + /* NOTREACHED */ + } +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0053--ARITH-Fixed-lexical-error-on-and.diff +++ dash-0.5.4/debian/diff/0053--ARITH-Fixed-lexical-error-on-and.diff @@ -0,0 +1,65 @@ +From a62633d37c483de0f511e999ae6cf585adf41390 Mon Sep 17 00:00:00 2001 +From: Gerrit Pape +Date: Wed, 7 May 2008 11:15:52 +0800 +Subject: [PATCH] [ARITH] Fixed lexical error on & and | + +The parser used to skip a byte when parsing the & and | operators, testcase: + + $ dash -c 'echo $((7&1))' + $ dash -c 'echo $((7& 1))' + $ dash -c 'echo $((7&11))' + +Signed-off-by: Gerrit Pape +Signed-off-by: Herbert Xu +--- + ChangeLog | 4 ++++ + src/arith_yylex.c | 8 +++++--- + 2 files changed, 9 insertions(+), 3 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index c277720..2f65e03 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++2008-05-07 Gerrit Pape ++ ++ * Fixed lexical error in arithmetic expansion of & and |. ++ + 2008-05-03 Dan McGee + + * Fixed klibc/klcc build problems. +diff --git a/src/arith_yylex.c b/src/arith_yylex.c +index c4458a4..ec5b5b2 100644 +--- a/src/arith_yylex.c ++++ b/src/arith_yylex.c +@@ -141,7 +141,9 @@ yylex() + case '=': + value += ARITH_ASS - '='; + checkeq: +- if (*++buf != '=') ++ buf++; ++checkeqcur: ++ if (*buf != '=') + goto out; + value += 11; + break; +@@ -174,14 +176,14 @@ checkeq: + case '|': + if (*++buf != '|') { + value += ARITH_BOR - '|'; +- goto checkeq; ++ goto checkeqcur; + } + value += ARITH_OR - '|'; + break; + case '&': + if (*++buf != '&') { + value += ARITH_BAND - '&'; +- goto checkeq; ++ goto checkeqcur; + } + value += ARITH_AND - '&'; + break; +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0008--PARSER-Remove-superfluous-arinest-test-for-dqvarnes.diff +++ dash-0.5.4/debian/diff/0008--PARSER-Remove-superfluous-arinest-test-for-dqvarnes.diff @@ -0,0 +1,43 @@ +From 4c3e02b41b1f6b611584e04eeecd39042ac9a638 Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Mon, 24 Sep 2007 21:59:39 +0800 +Subject: [PATCH] [PARSER] Remove superfluous arinest test for dqvarnest + +dqvarnest is only used to determine whether CENDQUOTE should terminate the +double-quote syntax. Since CENDQUOTE can never occur while arinest is set, +we don't need to take arinest into account for dqvarnest. +--- + ChangeLog | 1 + + src/parser.c | 3 +-- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 0a35741..b311ad4 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -3,6 +3,7 @@ + * Do not quote back slashes in parameter expansions outside quotes. + * Perform tilde expansion in all parameter expansion words. + * Remove superfluous arinest test in CENDQUOTE. ++ * Remove superfluous arinest test for dqvarnest. + + 2007-09-22 Oleg Verych + +diff --git a/src/parser.c b/src/parser.c +index 26c9046..8fac57a 100644 +--- a/src/parser.c ++++ b/src/parser.c +@@ -1232,9 +1232,8 @@ badsub: synerror("Bad substitution"); + *((char *)stackblock() + typeloc) = subtype | flags; + if (subtype != VSNORMAL) { + varnest++; +- if (dblquote || arinest) { ++ if (dblquote) + dqvarnest++; +- } + } + } + goto parsesub_return; +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0034--PARSER-Fix-here-doc-corruption.diff +++ dash-0.5.4/debian/diff/0034--PARSER-Fix-here-doc-corruption.diff @@ -0,0 +1,72 @@ +From abec6410722d19febd7a298e0a59c83adad18e1a Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Sat, 20 Oct 2007 18:49:31 +0800 +Subject: [PATCH] [PARSER] Fix here-doc corruption + +The change + + [PARSER] Recognise here-doc delimiters terminated by EOF + +introduced a regerssion whereby lines starting with eofmark but are not equal +to eofmark would be corrupted. This patch fixes it. + +Test case: + + cat << _ACEOF + _ASBOX + _ACEOF + +Old result: + + SASBOX + +New result: + + _ASBOX +--- + ChangeLog | 1 + + src/parser.c | 11 ++++++----- + 2 files changed, 7 insertions(+), 5 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index a821c32..d50d36c 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,6 +1,7 @@ + 2007-10-20 Herbert Xu + + * Added configure --enable-glob and --enable-fnmatch options. ++ * Fix here-doc corruption. + + 2007-10-17 Herbert Xu + +diff --git a/src/parser.c b/src/parser.c +index 4b8a5fe..3832f0b 100644 +--- a/src/parser.c ++++ b/src/parser.c +@@ -1047,16 +1047,17 @@ checkend: { + if (c == *eofmark) { + if (pfgets(line, sizeof line) != NULL) { + char *p, *q; ++ int cc; + + p = line; + for (q = eofmark + 1;; p++, q++) { +- c = *p; +- if (c == '\n') +- c = 0; +- if (!*q || c != *q) ++ cc = *p; ++ if (cc == '\n') ++ cc = 0; ++ if (!*q || cc != *q) + break; + } +- if (c == *q) { ++ if (cc == *q) { + c = PEOF; + plinno++; + needprompt = doprompt; +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0030--EXEC-Fixed-execing-of-scripts-with-no-hash-bang.diff +++ dash-0.5.4/debian/diff/0030--EXEC-Fixed-execing-of-scripts-with-no-hash-bang.diff @@ -0,0 +1,102 @@ +From eb40fd0bec3ffc8a5baa8be6ae3b71d6da38e681 Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Mon, 15 Oct 2007 20:24:28 +0800 +Subject: [PATCH] [EXEC] Fixed execing of scripts with no hash-bang + +The function tryexec used the original name instead of the path found through +PATH search. This patch fixes that. + +Test case: + + trap 'rm -f $TMP' EXIT + TMP=$(tempfile -s nosuchthing) + + cat <<- EOF > $TMP + echo OK + EOF + chmod u+x $TMP + + cd / + PATH=${TMP%/*} ${TMP##*/} + +Old result: + + /bin/sh: Can't open filelgY4Fanosuchthing + +New result: + + OK +--- + ChangeLog | 4 ++++ + src/eval.c | 3 ++- + src/exec.c | 21 +++------------------ + 3 files changed, 9 insertions(+), 19 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 00c09c3..60bdfb5 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++2007-10-15 Herbert Xu ++ ++ * Fixed execing of scripts with no hash-bang. ++ + 2007-10-11 Herbert Xu + + * Add assignment support in arithmetic expansions. +diff --git a/src/eval.c b/src/eval.c +index 2aa8317..1e0edd9 100644 +--- a/src/eval.c ++++ b/src/eval.c +@@ -727,7 +727,8 @@ evalcommand(union node *cmd, int flags) + argc++; + } + +- argv = nargv = stalloc(sizeof (char *) * (argc + 1)); ++ /* Reserve one extra spot at the front for shellexec. */ ++ argv = nargv = stalloc(sizeof (char *) * (argc + 2)) + 1; + for (sp = arglist.list ; sp ; sp = sp->next) { + TRACE(("evalcommand arg: %s\n", sp->text)); + *nargv++ = sp->text; +diff --git a/src/exec.c b/src/exec.c +index 8a1f722..bbb70e8 100644 +--- a/src/exec.c ++++ b/src/exec.c +@@ -149,11 +149,6 @@ shellexec(char **argv, const char *path, int idx) + STATIC void + tryexec(char *cmd, char **argv, char **envp) + { +- int repeated = 0; +-#if !defined(BSD) && !defined(linux) +- char *p; +-#endif +- + repeat: + #ifdef SYSV + do { +@@ -162,19 +157,9 @@ repeat: + #else + execve(cmd, argv, envp); + #endif +- if (repeated++) { +- ckfree(argv); +- } else if (errno == ENOEXEC) { +- char **ap; +- char **new; +- +- for (ap = argv; *ap; ap++) +- ; +- ap = new = ckmalloc((ap - argv + 2) * sizeof(char *)); +- *ap++ = cmd = _PATH_BSHELL; +- while ((*ap++ = *argv++)) +- ; +- argv = new; ++ if (cmd != _PATH_BSHELL && errno == ENOEXEC) { ++ *argv-- = cmd; ++ *argv = cmd = _PATH_BSHELL; + goto repeat; + } + } +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0005--EXPAND-Do-not-quote-back-slashes-in-parameter-expan.diff +++ dash-0.5.4/debian/diff/0005--EXPAND-Do-not-quote-back-slashes-in-parameter-expan.diff @@ -0,0 +1,109 @@ +From 0e49b542077342c7576c1a1d87f4a504349a648e Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Mon, 24 Sep 2007 16:17:20 +0800 +Subject: [PATCH] [EXPAND] Do not quote back slashes in parameter expansions outside quotes + +Test case: + + a=/b/c/* + b=\\ + echo ${a%$b*} + +Old result: + + /b/c/* + +New result: + + /b/c/ +--- + ChangeLog | 4 ++++ + src/expand.c | 5 ++--- + src/mksyntax.c | 5 +++-- + src/parser.c | 4 +++- + 4 files changed, 12 insertions(+), 6 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index b22197f..dca08d5 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++2007-09-24 Herbert Xu ++ ++ * Do not quote back slashes in parameter expansions outside quotes. ++ + 2007-09-22 Oleg Verych + + * White space fixes for test(1). +diff --git a/src/expand.c b/src/expand.c +index db67c7c..3956112 100644 +--- a/src/expand.c ++++ b/src/expand.c +@@ -895,7 +895,7 @@ memtodest(const char *p, size_t len, const char *syntax, int quotes) { + int c = (signed char)*p++; + if (c) { + if ((quotes & QUOTES_ESC) && +- (syntax[c] == CCTL || syntax[c] == CBACK)) ++ (syntax[c] == CCTL || syntax[c] == CDBACK)) + USTPUTC(CTLESC, q); + } else if (!(quotes & QUOTES_KEEPNUL)) + continue; +@@ -1671,9 +1671,8 @@ _rmescapes(char *str, int flag) + } + if (*p == (char)CTLESC) { + p++; +- if (notescaped && inquotes && *p != '/') { ++ if (notescaped && inquotes) + *q++ = '\\'; +- } + } + notescaped = globbing; + copy: +diff --git a/src/mksyntax.c b/src/mksyntax.c +index 7a8a9ae..9ecbb45 100644 +--- a/src/mksyntax.c ++++ b/src/mksyntax.c +@@ -53,6 +53,7 @@ struct synclass synclass[] = { + { "CWORD", "character is nothing special" }, + { "CNL", "newline character" }, + { "CBACK", "a backslash character" }, ++ { "CDBACK", "a backslash character in double quotes" }, + { "CSQUOTE", "single quote" }, + { "CDQUOTE", "double quote" }, + { "CENDQUOTE", "a terminating quote" }, +@@ -175,7 +176,7 @@ main(int argc, char **argv) + init(); + fputs("\n/* syntax table used when in double quotes */\n", cfile); + add("\n", "CNL"); +- add("\\", "CBACK"); ++ add("\\", "CDBACK"); + add("\"", "CENDQUOTE"); + add("`", "CBQUOTE"); + add("$", "CVAR"); +@@ -193,7 +194,7 @@ main(int argc, char **argv) + init(); + fputs("\n/* syntax table used when in arithmetic */\n", cfile); + add("\n", "CNL"); +- add("\\", "CBACK"); ++ add("\\", "CDBACK"); + add("`", "CBQUOTE"); + add("$", "CVAR"); + add("}", "CENDVAR"); +diff --git a/src/parser.c b/src/parser.c +index 6faff17..279d49e 100644 +--- a/src/parser.c ++++ b/src/parser.c +@@ -891,7 +891,9 @@ readtoken1(int firstc, char const *syntax, char *eofmark, int striptabs) + USTPUTC(CTLESC, out); + USTPUTC(c, out); + break; +- case CBACK: /* backslash */ ++ /* backslash */ ++ case CBACK: ++ case CDBACK: + c = pgetc2(); + if (c == PEOF) { + USTPUTC(CTLESC, out); +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0031--BUILTIN-Disallow-completely-blank-strings-in-non-ar.diff +++ dash-0.5.4/debian/diff/0031--BUILTIN-Disallow-completely-blank-strings-in-non-ar.diff @@ -0,0 +1,84 @@ +From ae88561f6445e2b20738a4930bd5b380c771de89 Mon Sep 17 00:00:00 2001 +From: Oleg Verych +Date: Wed, 17 Oct 2007 12:34:03 +0800 +Subject: [PATCH] [BUILTIN] Disallow completely blank strings in non-arithmetic context. + +* NULL as a number argument: + +olecom@deen:/mnt/debian/src/dash-0.5.3$ time src/dash tst-01.sh +test: 20: `': bad number +`' eq 0: 2 must be >1, Not A Number +test: 20: `': bad number +`' ne 0: 2 must be >1, Not A Number +test: 20: `': bad number +`' gt 0: 2 must be >1, Not A Number +test: 20: `': bad number +`' ge 0: 2 must be >1, Not A Number +test: 20: `': bad number +`' lt 0: 2 must be >1, Not A Number +test: 20: `': bad number +`' le 0: 2 must be >1, Not A Number +/usr/bin/test: invalid integer `' +`' eq 0: 2 must be >1, Not A Number +/usr/bin/test: invalid integer `' +`' ne 0: 2 must be >1, Not A Number +/usr/bin/test: invalid integer `' +`' gt 0: 2 must be >1, Not A Number +/usr/bin/test: invalid integer `' +`' ge 0: 2 must be >1, Not A Number +/usr/bin/test: invalid integer `' +`' lt 0: 2 must be >1, Not A Number +/usr/bin/test: invalid integer `' +`' le 0: 2 must be >1, Not A Number + +#!/usr/bin/printf This not executable script%c\n + +test_arithm() { + for aop in eq ne gt ge lt le + do "$1" 0 -$aop "$NOTHING" + echo "\`' $aop 0:" $? " must be >1, Not A Number" + done +} +# opengroup.org/onlinepubs/000095399/utilites/test.html (nothing about long): +test_arithm test +test_arithm /usr/bin/test + +# shend +--- + ChangeLog | 4 ++++ + src/mystring.c | 7 +++++++ + 2 files changed, 11 insertions(+), 0 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 60bdfb5..47a4bb0 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++2007-10-17 Oleg Verych ++ ++ * Disallow completely blank strings in non-arithmetic context. ++ + 2007-10-15 Herbert Xu + + * Fixed execing of scripts with no hash-bang. +diff --git a/src/mystring.c b/src/mystring.c +index b84b7e2..8e1200a 100644 +--- a/src/mystring.c ++++ b/src/mystring.c +@@ -123,6 +123,13 @@ intmax_t atomax(const char *s, int base) + if (errno != 0) + sh_error(illnum, s); + ++ /* ++ * Disallow completely blank strings in non-arithmetic (base != 0) ++ * contexts. ++ */ ++ if (base && (p == s)) ++ sh_error(illnum, s); ++ + while (isspace((unsigned char)*p)) + p++; + +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0051--SHELL-Use-uninitialized_var-to-silence-bogus-warnin.diff +++ dash-0.5.4/debian/diff/0051--SHELL-Use-uninitialized_var-to-silence-bogus-warnin.diff @@ -0,0 +1,68 @@ +From f82702beb8f367952bc73bb6a970a473102c4f59 Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Sat, 3 May 2008 15:02:01 +0800 +Subject: [PATCH] [SHELL] Use uninitialized_var to silence bogus warnings + +gcc generates bogus warnings about uninitialised variables in parser.c. +This patch borrows the uninitialized_var macro from Linux to silence +them. + +Signed-off-by: Herbert Xu +--- + ChangeLog | 1 + + src/parser.c | 5 +++-- + src/system.h | 6 ++++++ + 3 files changed, 10 insertions(+), 2 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index d52c521..7fba27f 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -8,6 +8,7 @@ + * Test __GLIBC__ instead of _GNU_SOURCE. + * Restored warning when getcwd fails. + * Set default exvwarning2 arg0 for errors during early initialisation. ++ * Use uninitialized_var to silence bogus warnings. + + 2008-05-02 Herbert Xu + +diff --git a/src/parser.c b/src/parser.c +index 32ed044..e891d31 100644 +--- a/src/parser.c ++++ b/src/parser.c +@@ -851,7 +851,8 @@ readtoken1(int firstc, char const *syntax, char *eofmark, int striptabs) + int parenlevel; /* levels of parens in arithmetic */ + int dqvarnest; /* levels of variables expansion within double quotes */ + int oldstyle; +- char const *prevsyntax; /* syntax before arithmetic */ ++ /* syntax before arithmetic */ ++ char const *uninitialized_var(prevsyntax); + + startlinno = plinno; + dblquote = 0; +@@ -1285,7 +1286,7 @@ parsebackq: { + union node *n; + char *str; + size_t savelen; +- int saveprompt; ++ int uninitialized_var(saveprompt); + + str = NULL; + savelen = out - (char *)stackblock(); +diff --git a/src/system.h b/src/system.h +index b8853e6..17a9533 100644 +--- a/src/system.h ++++ b/src/system.h +@@ -97,3 +97,9 @@ static inline int killpg(pid_t pid, int signal) + #define _SC_CLK_TCK 2 + long sysconf(int) __attribute__((__noreturn__)); + #endif ++ ++/* ++ * A trick to suppress uninitialized variable warning without generating any ++ * code ++ */ ++#define uninitialized_var(x) x = x +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0033--EXPAND-Added-configure-enable-glob-and-enable-f.diff +++ dash-0.5.4/debian/diff/0033--EXPAND-Added-configure-enable-glob-and-enable-f.diff @@ -0,0 +1,166 @@ +From b000ad6bc7fae900468cec13e83e7d125527fc52 Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Sat, 20 Oct 2007 18:26:23 +0800 +Subject: [PATCH] [EXPAND] Added configure --enable-glob and --enable-fnmatch options + +Debian's libc6 as of 2.6.1-6 has working glob(3)/fnmatch(3) support. +This patch adds the options --enable-glob and --enable-fnmatch to +the configure script. By default glob(3) and fnmatch(3) are still +unused. However, on distros where the glibc is known to work you +may enable these options. +--- + ChangeLog | 6 +++++- + configure.ac | 13 +++++++++++++ + src/Makefile.am | 2 +- + src/expand.c | 25 ++++++++----------------- + 4 files changed, 27 insertions(+), 19 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index ba9d5d5..a821c32 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,4 +1,8 @@ +-2007-10-15 Herbert Xu ++2007-10-20 Herbert Xu ++ ++ * Added configure --enable-glob and --enable-fnmatch options. ++ ++2007-10-17 Herbert Xu + + * Replace shared illnum message by badnum function. + +diff --git a/configure.ac b/configure.ac +index 5e8f17d..ccc4ac1 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -24,6 +24,10 @@ if test "$enable_static" = "yes"; then + export LDFLAGS="-static -Wl,--fatal-warnings" + fi + ++AC_ARG_ENABLE(fnmatch, AS_HELP_STRING(--enable-fnmatch, \ ++ [Use fnmatch(3) from libc])) ++AC_ARG_ENABLE(glob, AS_HELP_STRING(--enable-glob, [Use glob(3) from libc])) ++ + dnl Checks for libraries. + + dnl Checks for header files. +@@ -32,6 +36,15 @@ dnl Checks for library functions. + AC_CHECK_FUNCS(bsearch getpwnam getrlimit isalpha killpg mempcpy sigsetmask \ + stpcpy strchrnul strsignal strtod strtoimax strtoumax sysconf) + ++if test "$enable_fnmatch" = yes; then ++ use_fnmatch= ++ AC_CHECK_FUNCS(fnmatch, use_fnmatch=yes) ++fi ++ ++if test "$use_fnmatch" = yes && test "$enable_glob" = yes; then ++ AC_CHECK_FUNCS(glob) ++fi ++ + dnl Check for klibc signal. + AC_CHECK_FUNC(signal) + if test "$ac_cv_func_signal" != yes; then +diff --git a/src/Makefile.am b/src/Makefile.am +index 49026a3..e9130eb 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -4,7 +4,7 @@ COMMON_CFLAGS = -Wall + COMMON_CPPFLAGS = \ + -include $(top_builddir)/config.h \ + -DBSD=1 -DSHELL \ +- -DGLOB_BROKEN -DFNMATCH_BROKEN -DIFS_BROKEN ++ -DIFS_BROKEN + + AM_CFLAGS = $(COMMON_CFLAGS) + AM_CPPFLAGS = $(COMMON_CPPFLAGS) +diff --git a/src/expand.c b/src/expand.c +index 5c31400..c489446 100644 +--- a/src/expand.c ++++ b/src/expand.c +@@ -45,16 +45,9 @@ + #include + #include + #include +-#if defined(__GLIBC__) +-#if !defined(FNMATCH_BROKEN) + #include +-#if !defined(GLOB_BROKEN) + #include +-#endif +-#else + #include +-#endif +-#endif + + /* + * Routines to expand arguments to commands. We have to deal with +@@ -127,18 +120,16 @@ STATIC void removerecordregions(int); + STATIC void ifsbreakup(char *, struct arglist *); + STATIC void ifsfree(void); + STATIC void expandmeta(struct strlist *, int); +-#if defined(__GLIBC__) && !defined(FNMATCH_BROKEN) && !defined(GLOB_BROKEN) ++#ifdef HAVE_GLOB + STATIC void addglob(const glob_t *); + #else + STATIC void expmeta(char *, char *); +-#endif +-STATIC void addfname(char *); +-#if !(defined(__GLIBC__) && !defined(FNMATCH_BROKEN) && !defined(GLOB_BROKEN)) + STATIC struct strlist *expsort(struct strlist *); + STATIC struct strlist *msort(struct strlist *, int); + #endif ++STATIC void addfname(char *); + STATIC int patmatch(char *, const char *); +-#if !defined(__GLIBC__) || defined(FNMATCH_BROKEN) ++#ifndef HAVE_FNMATCH + STATIC int pmatch(const char *, const char *); + #else + #define pmatch(a, b) !fnmatch((a), (b), 0) +@@ -1159,7 +1150,7 @@ ifsfree(void) + * should be escapes. The results are stored in the list exparg. + */ + +-#if defined(__GLIBC__) && !defined(FNMATCH_BROKEN) && !defined(GLOB_BROKEN) ++#ifdef HAVE_GLOB + STATIC void + expandmeta(str, flag) + struct strlist *str; +@@ -1220,7 +1211,7 @@ addglob(pglob) + } + + +-#else /* defined(__GLIBC__) && !defined(FNMATCH_BROKEN) && !defined(GLOB_BROKEN) */ ++#else /* HAVE_GLOB */ + STATIC char *expdir; + + +@@ -1387,7 +1378,7 @@ out: + if (! atend) + endname[-1] = '/'; + } +-#endif /* defined(__GLIBC__) && !defined(FNMATCH_BROKEN) && !defined(GLOB_BROKEN) */ ++#endif /* HAVE_GLOB */ + + + /* +@@ -1406,7 +1397,7 @@ addfname(char *name) + } + + +-#if !(defined(__GLIBC__) && !defined(FNMATCH_BROKEN) && !defined(GLOB_BROKEN)) ++#ifndef HAVE_GLOB + /* + * Sort the results of file name expansion. It calculates the number of + * strings to sort and then calls msort (short for merge sort) to do the +@@ -1479,7 +1470,7 @@ patmatch(char *pattern, const char *string) + } + + +-#if !defined(__GLIBC__) || defined(FNMATCH_BROKEN) ++#ifndef HAVE_FNMATCH + STATIC int ccmatch(const char *p, int chr, const char **r) + { + static const struct class { +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0042--PARSER-Do-not-show-prompts-in-expandstr.diff +++ dash-0.5.4/debian/diff/0042--PARSER-Do-not-show-prompts-in-expandstr.diff @@ -0,0 +1,55 @@ +From 21caed6e95dd6ae8c5c8fe65ff613e6aebb1575f Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Thu, 27 Dec 2007 13:57:07 +1100 +Subject: [PATCH] [PARSER] Do not show prompts in expandstr + +Once I fixed the previous problem it became apparent that we never dealt +with prompts with new-lines in them correctly. The problem is that we +showed a secondary prompt for each of them. + +This patch disables prompt generation in expandstr. + +Signed-off-by: Herbert Xu +--- + ChangeLog | 1 + + src/parser.c | 8 ++++++++ + 2 files changed, 9 insertions(+), 0 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 8b392f4..0030738 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,6 +1,7 @@ + 2007-12-27 Herbert Xu + + * Add FAKEEOFMARK for expandstr. ++ * Do not show prompts in expandstr. + + 2007-12-23 Gerrit Pape + +diff --git a/src/parser.c b/src/parser.c +index 3206328..9dd6185 100644 +--- a/src/parser.c ++++ b/src/parser.c +@@ -1499,10 +1499,18 @@ const char * + expandstr(const char *ps) + { + union node n; ++ int saveprompt; + + /* XXX Fix (char *) cast. */ + setinputstring((char *)ps); ++ ++ saveprompt = doprompt; ++ doprompt = 0; ++ + readtoken1(pgetc(), DQSYNTAX, FAKEEOFMARK, 0); ++ ++ doprompt = saveprompt; ++ + popfile(); + + n.narg.type = NARG; +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0003--BUILTIN-test-White-space-fixes.diff +++ dash-0.5.4/debian/diff/0003--BUILTIN-test-White-space-fixes.diff @@ -0,0 +1,76 @@ +From eab7d75c30c0fc285c441ae03d61653191e88832 Mon Sep 17 00:00:00 2001 +From: Oleg Verych +Date: Sat, 22 Sep 2007 21:08:32 +0800 +Subject: [PATCH] [BUILTIN] test: White space fixes + +Some trailing whitespace was killed or tabified. +--- + ChangeLog | 4 ++++ + src/bltin/test.c | 14 +++++++------- + 2 files changed, 11 insertions(+), 7 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index ba974ca..5804248 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++2007-09-22 Oleg Verych ++ ++ * White space fixes for test(1). ++ + 2007-09-22 Herbert Xu + + * Move flushall to the point just before _exit. +diff --git a/src/bltin/test.c b/src/bltin/test.c +index f16c819..fd24fae 100644 +--- a/src/bltin/test.c ++++ b/src/bltin/test.c +@@ -250,7 +250,7 @@ primary(enum token n) + + if (t_lex(t_wp[1]), t_wp_op && t_wp_op->op_type == BINOP) { + return binop(); +- } ++ } + + return strlen(*t_wp) > 0; + } +@@ -267,7 +267,7 @@ binop(void) + + if ((opnd2 = *++t_wp) == (char *)0) + syntax(op->op_text, "argument expected"); +- ++ + switch (op->op_num) { + default: + #ifdef DEBUG +@@ -389,8 +389,8 @@ isoperand(void) + return 0; + while (op->op_text) { + if (strcmp(s, op->op_text) == 0) +- return op->op_type == BINOP && +- (t[0] != ')' || t[1] != '\0'); ++ return op->op_type == BINOP && ++ (t[0] != ')' || t[1] != '\0'); + op++; + } + return 0; +@@ -407,13 +407,13 @@ getn(const char *s) + r = strtol(s, &p, 10); + + if (errno != 0) +- error("%s: out of range", s); ++ error("%s: out of range", s); + + while (isspace((unsigned char)*p)) + p++; +- ++ + if (*p) +- error("%s: bad number", s); ++ error("%s: bad number", s); + + return (int) r; + } +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0015--EXPAND-Refresh-stack-pointers-after-makestrspace-in.diff +++ dash-0.5.4/debian/diff/0015--EXPAND-Refresh-stack-pointers-after-makestrspace-in.diff @@ -0,0 +1,65 @@ +From d8ac156a41a341897b2737be98684fca07673490 Mon Sep 17 00:00:00 2001 +From: Roy Marples +Date: Wed, 26 Sep 2007 13:59:56 +0800 +Subject: [PATCH] [EXPAND] Refresh stack pointers after makestrspace in _rmescapes + +dash-0.5.3 has an issue reading some line lengths [1]. +This is reproducable on amd64, but not on other arches for some reason. + +$ cat bug.sh +(read line; echo "${line%%=*}") < ++ ++ * Refresh stack pointers after makestrspace in _rmescapes. ++ + 2007-09-25 Gerrit Pape + + * Clarify description of -nt, -ot options to test builtin. +diff --git a/src/expand.c b/src/expand.c +index 8c6c7f9..98ad718 100644 +--- a/src/expand.c ++++ b/src/expand.c +@@ -1631,7 +1631,11 @@ _rmescapes(char *str, int flag) + size_t fulllen = len + strlen(p) + 1; + + if (flag & RMESCAPE_GROW) { ++ int strloc = str - (char *)stackblock(); ++ + r = makestrspace(fulllen, expdest); ++ str = (char *)stackblock() + strloc; ++ p = str + len; + } else if (flag & RMESCAPE_HEAP) { + r = ckmalloc(fulllen); + } else { +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0016--PARSER-Recognise-here-doc-delimiters-terminated-by.diff +++ dash-0.5.4/debian/diff/0016--PARSER-Recognise-here-doc-delimiters-terminated-by.diff @@ -0,0 +1,67 @@ +From e4c4c05ad35975d7c8f96ee4f8b2fb5a51147aae Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Wed, 26 Sep 2007 17:14:16 +0800 +Subject: [PATCH] [PARSER] Recognise here-doc delimiters terminated by EOF + +Previously dash required a character to be present in order for +a here-document delimiter to be detected. Allowing EOF in the absence of +a to play the same purpose allows some intuitive scripts to +succeed. POSIX seems to be silence on this so this should be OK. + +Test case: + + eval 'cat <<- NOT + test + NOT' + echo OK + +Old result: + + test + NOTOK + +New result: + + test + OK +--- + ChangeLog | 4 ++++ + src/parser.c | 10 ++++++++-- + 2 files changed, 12 insertions(+), 2 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 670682b..cf56c9a 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++2007-09-26 Herbert Xu ++ ++ * Recognise here-doc delimiters terminated by EOF. ++ + 2007-09-26 Roy Marples + + * Refresh stack pointers after makestrspace in _rmescapes. +diff --git a/src/parser.c b/src/parser.c +index 1a483d4..cac0aa5 100644 +--- a/src/parser.c ++++ b/src/parser.c +@@ -1049,8 +1049,14 @@ checkend: { + char *p, *q; + + p = line; +- for (q = eofmark + 1 ; *q && *p == *q ; p++, q++); +- if (*p == '\n' && *q == '\0') { ++ for (q = eofmark + 1;; p++, q++) { ++ c = *p; ++ if (c == '\n') ++ c = 0; ++ if (!*q || c != *q) ++ break; ++ } ++ if (c == *q) { + c = PEOF; + plinno++; + needprompt = doprompt; +-- +1.5.6.3 + --- dash-0.5.4.orig/debian/diff/0043--EXPAND-Fix-slash-treatment-in-expmeta.diff +++ dash-0.5.4/debian/diff/0043--EXPAND-Fix-slash-treatment-in-expmeta.diff @@ -0,0 +1,80 @@ +From 971c93b89a26ca0bd3e3f24e5586c3d6ef9f39cd Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Tue, 1 Jan 2008 13:46:01 +1100 +Subject: [PATCH] [EXPAND] Fix slash treatment in expmeta + +The change + + [EXPAND] Do not quote back slashes in parameter expansions outside quotes + +triggered a latent bug in expmeta where the forward slashes when preceded +by a blackslash weren't recognised as directory separators. This was hidden +because a work-around was put in place for glob(3) which meant that we never +had any backslashes immediately before forward slashes. + +This patch fixes the metaflag loop to recognise forward slashes even when +they follow a backslash. + +Thanks to Daniel Hahler for reporting this problem. + +Test case: + + echo "/"root* + +Old result: + + /root* + +New result: + + /root + +Signed-off-by: Herbert Xu +--- + ChangeLog | 4 ++++ + src/expand.c | 15 ++++++++------- + 2 files changed, 12 insertions(+), 7 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 0030738..4bc9181 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++2008-01-01 Herbert Xu ++ ++ * Fix slash treatment in expmeta. ++ + 2007-12-27 Herbert Xu + + * Add FAKEEOFMARK for expandstr. +diff --git a/src/expand.c b/src/expand.c +index f3d63c4..5986236 100644 +--- a/src/expand.c ++++ b/src/expand.c +@@ -1287,15 +1287,16 @@ expmeta(char *enddir, char *name) + break; + } + } +- } else if (*p == '\\') +- p++; +- else if (*p == '/') { +- if (metaflag) +- goto out; +- start = p + 1; ++ } else { ++ if (*p == '\\') ++ p++; ++ if (*p == '/') { ++ if (metaflag) ++ break; ++ start = p + 1; ++ } + } + } +-out: + if (metaflag == 0) { /* we've reached the end of the file name */ + if (enddir != expdir) + metaflag++; +-- +1.5.6.3 +