include <stdlib.h> and <stddef.h> if STDC_HEADERS is defined.