How does junk like this ever get into a standard? Didn't a whole committee of very experienced systems programmers have to sit down and say, "yes, these are routines that i think people will find generally useful"?
It looks like the same header, search.h, also includes functions for working with binary trees, where the user passes in the root pointer, and so which support multiple trees:
A standards process is frequently about documenting what already exists in common implementations so that there is a specification for future implementations. POSIX was very much one of these processes.
This is specifically about hcreate/hsearch, which are utterly useless, since you only get one hash table at a time. The reason you don't want crap like this is just that: it's crap.
It looks like the same header, search.h, also includes functions for working with binary trees, where the user passes in the root pointer, and so which support multiple trees:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/ts...
So this committee must have signed off on the hashtable stuff even though they had an example of how to do it properly right next to it!