Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sbin/gpt



On Sun, Feb 12, 2017 at 06:20:53PM +0000, Christos Zoulas wrote:
> In article <87bmu7l1k6.fsf%free.fr@localhost>,
> Aymeric Vincent  <aymericvincent%free.fr@localhost> wrote:
> >christos%astron.com@localhost (Christos Zoulas) writes:
> >
> >> Yes, doesn't libcompat provide our getopt()? Or are you trying to compile
> >> this standalone?
> >
> >It does, but from what I understand, we replace only getopt_long()
> >unconditionnally and use the host's getopt() if the optind variable can
> >be linked against.
> >
> >Confirmed on a Linux host in <tooldir>/lib:
> >
> >$ nm libnbcompat.a | grep getopt
> >getopt_long.lo:
> >0000000000000098 T __nbcompat_getopt_long
> >$ 
> >
> >I agree it would be nicer to use always our getopt().
> 
> Yes, because the glibc is not posix compliant by default.

More than non-compliaint, completely f*cked.
It reorders argv[] to move all 'options' before filenames.
So 'foo bar -baz' is changed to 'foo -baz bar' before being processed.
I've NFI of the justification for it.
Historically you could do 'rlogin host -l username' but I
don't know of any others.

	David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index