Subject: Re: lib/13: getopt(3) should handle wide characters intelligently
To: None <firstname.lastname@example.org>
From: Jaromír <email@example.com>
Date: 10/12/2001 20:32:18
this seems to linger in PR database quite a long time. I wonder
if this is really worth the efford or not, especially considering
that if getopt(3) would be changed to use the wide character support
in libc, it would pull in quite a lot code over to all static binaries
SUSv2 has this to say:
The getopt() function is only required to support option characters
included in Guideline 3. Many historical implementations of getopt()
support other characters as options. This is an allowed extension,
but applications that use extensions are not maximally portable.
Note that support for multi-byte option characters is only possible
when such characters can be represented as type int.
I have not found that the referred to 'Guideline 3' contains,
but I expect it to contain US-ASCII characters only.
So, it's perfectly reasonable for getopt(3) to not support wide
characters and an application using them would not be portable anyway.
Given this (and bloat factor mentioned above), I don't really
see compelling reason to add that support to getopt(3).
Jaromir Dolecek <jdolecek@NetBSD.org> http://www.ics.muni.cz/~dolecek/
NetBSD - just plain best OS! -=*=- Got spare MCA cards or docs? Hand me them!