delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/12/07/05:32:06

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:message-id:from:reply-to:to:subject
:references:in-reply-to:content-type; q=dns; s=default; b=Mh4LuT
bFePj9GdxpgCp2YKIIrGMMDToCd6shcPb255PWPuFqB1PQA0DJWQfuR5aGHxIj0J
K70VdSBqGa8P1L51mK2zWgzVVajMclb7Q8VmbGJhYmUp6VC+Di93V1ZyD9hIkdAK
FKdZbOeoEAMUkZQRSEVuyxtV0Q3DiuQNdbKNQ=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:message-id:from:reply-to:to:subject
:references:in-reply-to:content-type; s=default; bh=YSBNb6Z3aELj
l0/qJpd04rZW4kI=; b=lqeM2AWIAnJ9OgIqiOfW0CdzTPXC2nzI7PKkWCWiZF3A
nU/AnQLJ8Dliqb7qCvzo/hhJCtgPGCdcR3rfG6AT4eObmndswhrtzvsFyIkTZzkd
uLXJeJRinx0k/CGvWN2U9EXop9U04Yb0JgviTLT5k4DScOVcMbK0ajBJxJKs9Kc=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=0.1 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=thoroughly, Greetings, Repin, andrey
X-HELO: lb1-smtp-cloud7.xs4all.net
Date: Fri, 07 Dec 2018 11:31:46 +0100
Message-ID: <e8f4f432b50594f79ae13f2758ec64cf@smtp-cloud7.xs4all.net>
From: Houder <houder AT xs4all DOT nl>
Reply-To: cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
Subject: Re: util-linux: getopt: broken --name option for a while now
References: <1655264599 DOT 20181207025650 AT yandex DOT ru>
In-Reply-to: <1655264599.20181207025650@yandex.ru>
User-Agent: mua.awk 0.99

On Fri, 7 Dec 2018 02:56:50, Andrey Repin  wrote:
> Greetings, All!
> 
> This has been plaguing me for several years, but only now I got to test it
> more thoroughly.
> Shame on me.
> 
> $ /usr/bin/getopt --options '+H' --shell sh --name x -- -d
> getopt: unknown option -- d
> 
> Expected output:
> x: unknown option -- d
> 
> $ /usr/bin/getopt -V
> getopt from util-linux 2.25.2
> 
> Poked around,
> getopt from 2.20.1, 2.27.1, 2.31.1 and (reportedly)2.33 works as expected.

2.27.1? Typo?

See:
https://stackoverflow.com/questions/43078330/how-to-use-the-name-argument-to-getopt
( How to use the --name argument to getopt? )

 "This is a bug (or just a non-portability issue) which is already fixed in
  util-linux 2.28, by commit 30fbf2f6. Before this fix it worked only on Linux,
  OSX and a few BSD flavors but not on WIN32 or GNU-Hurd for example".

The answer by "rudimeier" also decribes a temporary work-around.

Regards,
Henri

> Is there a chance for an update?
> 
> 
> -- 
> With best regards,
> Andrey Repin
> Friday, December 7, 2018 2:51:20


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019