If many platforms have it, that's a practical standard more important to
me.
That's not a standard, that's a common occurrence.
And the thing is...
This actually IS an interesting and topical discussion. How do you decide
what's "standard enough"? As a general rule, I advocate the following
policy:
When considering the use of a feature, weigh its portability against its
value to you.
As an example: I believe that snprintf() is close enough to universally
accessible that I don't even consider not-using-snprintf. I use it, I use
it consistently, and if some day I encounter a system which lacks it, I
figure I'll grab the source from one of the BSDs. (Since I work on embedded
Linux mostly these days, I'm not worried about people being afraid of
open source.)
But I do that because I've found that snprintf() is extremely useful to me
in clearly, idiomatically, and safely implementing a common requirement.
I would never use EOVERFLOW unless it were mandated by a specification, and
I would object to any specification which mandated it. That's because I
consider it an unnecessary extension that doesn't give much specific
information. (I'm not even sure it's sensical in the context of a trim
function, for that matter.) It's not that it's all that unportable; it's
just that there's no marginal benefit.
I'll put up with a great deal of non-portability if necessary; I use
the RTLD_NEXT feature of a dynamic linker, even though it's a local
extension that isn't particularly portable, because there is NO other
way to accomplish the thing I want to do, so far as I can tell. Certainly
no practical one.
I think the issue here is not just how portable or non-portable EOVERFLOW
is, but that it's not particularly improving the utility of the code to
rely on it. That, and more generally, your complete lack of interest in
anyone's needs but your own is pretty much pathological. That is not a sane
way for a human to live.
-s