▲ | fjfaase 11 hours ago | |
You are right. I verified this myself. I do not know where I got this wrong. Maybe this was different in earlier implementations. | ||
▲ | wahern 9 hours ago | parent [-] | |
It was first added to the Single UNIX Specification (SUS) in 1997. Perhaps there was some oddball non-conformant implementation at the time, but in those cases the standard would usually use a different name. There's the infamous strncpy, of course, which understandably could cause some confusion. And various non-vendor faux-snprintf implementations, like uprintf, that have different semantics. It's hazardous to reuse a standardized name like snprintf, even as a suffix, in an API but not implement the same fundamental semantics. |