By the fact if I include stdlib.h into each file of my program and I do not get an re-definition error. So, the answer is yes. Right?
I’m reading the libxml2 source code, and in HTMLparser.c there is this part:
#include <string.h>
#ifdef HAVE_CTYPE_H
#include <ctype.h>
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
My question is: Why use include guards here?
Those aren’t include guards. These macros are set if the corresponding headers are present in the system, resp. detected during configuration. If they were included unconditionally and they are not present, the compilation would fail.