Collect prototypes.
Replace malloc/free/calloc/realloc/strdup/strndup with their error-checking variants in the server code.
Remove toolkit function protection from emalloc/efree/ecalloc/erealloc/estrdup/estrndup.