[illumos-Developer] webrev: printf
Kyle McDonald
kmcdonald at egenera.com
Thu Oct 14 11:16:35 PDT 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 10/14/2010 1:56 PM, Garrett D'Amore wrote:
> On Thu, 2010-10-14 at 19:39 +0200, Nicholas George wrote:
>> The VSC license prohibits distribution of the source but AFAIK
>> describing the tests is OK.
>> Test 19 passes - followed by [a-zA-Z] as options and probes stdout for
>> these strings to show up there. The test fails if >=27 iterations all
>> pass the strings in stdout.
>
> I would argue that this test doesn't test what the *standard* says. The
> standard was pretty clear, you have to handle "--", but beyond that, any
> option arguments are implementation defined behavior. What's wrong with
> my assertion that the implementation defined behavior for each of these
> is to print "-", followed by the option letter itself, and treat the
> remaining option data as the format?
>
Whether that is right or wrong, I imagine the 'and treat the remaining
option data as the format' is wrong.
If you accept the -whatever as a non-option and are willing to print
it, then shouldn't you also consider it the format string?
I read that thread on the bash-bug list, and the command that was
being attempted there was
printf ----%s--- test
The standards person there said this should be an error, but lets say
you want that to work, I don't think (unless I misunderstand your
statement above) that what you're describing will. Won't your way
print '----%s----' and then use 'test' as the format string? I guess
that would look like:
- ---%s--- test
I don't think that's right no matter how you read the spec.
Again, I may be missing something somewhere!
-Kyle
>> Test 21 passes -\# and -\\ as option. Neither # and \ are portable
>> option characters. If both appear in stdout the test fails.
>
> So its verboten to handle any non-portable option characters as part of
> your implementation specific behavior? Where is *that* specified in the
> standard?
>
>>
>> As final word to my contribution here: I see you already made the
>> commit without waiting for the discussion to conclude. Based on the
>> commit and your IRC comment that "pragmatism won here" I assume that
>> POSIX and the Single Unix Standard will not play a key role in
>> Illumos, which rule out Illumos as viable alternative to Solaris.
>> I will recommend my employer, MBDA System Integration, to withdraw
>> from Illumos and focus on Oracle Solaris 11 as host for our products.
>
> While that's your choice, I can assure you of this:
>
> a) illumos' implementation is *no* worse than Oracle Solaris 11's in
> this regard (in fact its even better in some respects, not related to
> the standard).
>
> b) the printf implementation I just integrated *can* change, if there
> is sufficient cause to do so. Right now I don't hear sufficient cause.
> (Given a choice I'd rather support broken scripts deployed in the field
> than broken VSC tests. One of these directly affects users, the other
> does not.)
>
> c) Oracle probably doesn't care about POSIX in the least. In fact, I
> think Oracle has made it reasonably clear that the only ISV support that
> they care about for Solaris 11 is Oracle itself.
>
> That said, go ahead and withdraw from illumos if you feel that's in your
> company's best interests.
>
> - Garrett
>
>
>
>
> _______________________________________________
> Developer mailing list
> Developer at lists.illumos.org
> http://lists.illumos.org/m/listinfo/developer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (MingW32)
iQEcBAEBAgAGBQJMt0kDAAoJEEADRM+bKN5wuqgIAMVp2meL6FYqsxARaQiyxV+C
Ra7gC0zTNaEPMbZkC6CjiSt6ae1HALgmnkPmSzJUCdbx0AlBNtc7DjZS8MYadxeK
VyqYiQ9PE8ljm5cZ2Fj1gkBB+dLJs7xhwYDfqojgSrR5LRHON9JmhqmdlXH9RtQ7
Jsi0EybmQ2xT8hpij0Vj2lXy486+ITTxNf+ClE4sFc3LykYxO3/D8DDpqAd+XHU/
fD6TF0O3xKNbhpZcItKdDEpNNepwyMJjnQKIXA8EUlnICrKXKOy5HFjibyG4uqCu
Zt7Sp23NA4XT6BD+R9A45wjPysZoZeYA1DmG+Pw8gYRWAWyqyXVk31t25n6Bn1A=
=0xeb
-----END PGP SIGNATURE-----
More information about the Developer
mailing list