> They are "protected", yes, but their mere presence encourages people to use them. There's no reason to use asprintf, but glibc makes it available so some software uses it. That software is now non-portable.
I think asprintf is useful - it replaces an ugly "malloc-realloc-snprintf-loop"...
On exposing non-portable functions/features:
- OpenBSD does it (pledge)
- Freebsd/NetBSD do it (kqueue)
- ... I'm certain other systems do too
I think _exposing_ non-portable features is ok, as long as you can't use them _accidentally_. Now, _if_ glibc fulfills that, the blame should fall on the (lazy) developer. If on the other hand glibc makes accidental use possible, then that is... bad for portability.> Maybe in a blog post someday.
I would like to read that. :-)
[edit: formatting...]