Quantcast

Remove "function" from line to avoid dash objecting to this bash-ism

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Remove "function" from line to avoid dash objecting to this bash-ism

Mark Geisert
I've been home-building the last few versions of Cygwin DLL on Windows
where I routinely have dash set as my non-interactive shell.  The only
issue I run into is this one occurrence of the 'function' keyword in
winsup/cygwin/mkvers.sh.  This patch gets rid of the keyword.

FWIW using dash instead of bash has the build running 5%-10% faster.
Cheers,

..mark

From fb9db7a75c7e391f451cb1df3c1e8463ef4c7bf3 Mon Sep 17 00:00:00 2001
From: Mark Geisert <[hidden email]>
Date: Wed, 5 Apr 2017 22:20:09 -0700
Subject: [PATCH] Remove "function" from line to avoid dash objecting to
this bash-ism.

---
  winsup/cygwin/mkvers.sh | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/winsup/cygwin/mkvers.sh b/winsup/cygwin/mkvers.sh
index 7e763e0..5aecb14 100755
--- a/winsup/cygwin/mkvers.sh
+++ b/winsup/cygwin/mkvers.sh
@@ -34,7 +34,7 @@ done
    echo "**** Couldn't open file '$incfile'.  Aborting."
  }

-function parse_preproc_flags() {
+parse_preproc_flags() {
    # Since we're manually specifying the preprocessor, pass the default
flags
    # normally defined.
    ccflags="--preprocessor=$1 --preprocessor-arg=-E \
--
2.8.3

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Remove "function" from line to avoid dash objecting to this bash-ism

Corinna Vinschen-2
On Apr  5 23:00, Mark Geisert wrote:

> I've been home-building the last few versions of Cygwin DLL on Windows where
> I routinely have dash set as my non-interactive shell.  The only issue I run
> into is this one occurrence of the 'function' keyword in
> winsup/cygwin/mkvers.sh.  This patch gets rid of the keyword.
>
> FWIW using dash instead of bash has the build running 5%-10% faster.
> Cheers,
>
> ..mark
>
> > From fb9db7a75c7e391f451cb1df3c1e8463ef4c7bf3 Mon Sep 17 00:00:00 2001
> From: Mark Geisert <[hidden email]>
> Date: Wed, 5 Apr 2017 22:20:09 -0700
> Subject: [PATCH] Remove "function" from line to avoid dash objecting to this
> bash-ism.
Applied.


Thanks,
Corinna

--
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

signature.asc (836 bytes) Download Attachment
Loading...