diff --git a/HTMLparser.c b/HTMLparser.c
index 4b9b4e4f..9ea6c3d7 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -14,19 +14,6 @@
#include
#include
-#ifdef HAVE_SYS_STAT_H
-#include
-#endif
-#ifdef HAVE_FCNTL_H
-#include
-#endif
-#ifdef HAVE_UNISTD_H
-#include
-#endif
-#ifdef LIBXML_ZLIB_ENABLED
-#include
-#endif
-
#include
#include
#include
diff --git a/include/libxml/SAX.h b/include/libxml/SAX.h
index 61876d10..ce58bcbd 100644
--- a/include/libxml/SAX.h
+++ b/include/libxml/SAX.h
@@ -16,7 +16,6 @@
#include
#include
#include
-#include
#ifdef LIBXML_LEGACY_ENABLED
diff --git a/include/libxml/SAX2.h b/include/libxml/SAX2.h
index a55212eb..842748fc 100644
--- a/include/libxml/SAX2.h
+++ b/include/libxml/SAX2.h
@@ -16,7 +16,6 @@
#include
#include
#include
-#include
#ifdef __cplusplus
extern "C" {
diff --git a/include/libxml/parser.h b/include/libxml/parser.h
index 5dad587a..44581808 100644
--- a/include/libxml/parser.h
+++ b/include/libxml/parser.h
@@ -10,8 +10,6 @@
#ifndef __XML_PARSER_H__
#define __XML_PARSER_H__
-#include
-
#include
#include
#include
diff --git a/parser.c b/parser.c
index 97747a7a..f4707cbb 100644
--- a/parser.c
+++ b/parser.c
@@ -70,15 +70,6 @@
#include
#include
#endif
-#ifdef HAVE_SYS_STAT_H
-#include
-#endif
-#ifdef HAVE_FCNTL_H
-#include
-#endif
-#ifdef HAVE_UNISTD_H
-#include
-#endif
#include "buf.h"
#include "enc.h"
diff --git a/parserInternals.c b/parserInternals.c
index d7b19b64..364ae3d5 100644
--- a/parserInternals.c
+++ b/parserInternals.c
@@ -20,19 +20,6 @@
#include
#include
-#ifdef HAVE_SYS_STAT_H
-#include
-#endif
-#ifdef HAVE_FCNTL_H
-#include
-#endif
-#ifdef HAVE_UNISTD_H
-#include
-#endif
-#ifdef LIBXML_ZLIB_ENABLED
-#include
-#endif
-
#include
#include
#include
diff --git a/testHTML.c b/testHTML.c
index 5d175904..359fba47 100644
--- a/testHTML.c
+++ b/testHTML.c
@@ -14,19 +14,6 @@
#include
#include
-#ifdef HAVE_SYS_TYPES_H
-#include
-#endif
-#ifdef HAVE_SYS_STAT_H
-#include
-#endif
-#ifdef HAVE_FCNTL_H
-#include
-#endif
-#ifdef HAVE_UNISTD_H
-#include
-#endif
-
#include
#include
#include
diff --git a/testOOM.c b/testOOM.c
index dd13031b..217e04af 100644
--- a/testOOM.c
+++ b/testOOM.c
@@ -12,13 +12,6 @@
#include
#include
-#ifdef HAVE_SYS_TYPES_H
-#include
-#endif
-#ifdef HAVE_UNISTD_H
-#include
-#endif
-
#include
#include "testOOMlib.h"
diff --git a/testOOMlib.h b/testOOMlib.h
index 751999da..fff148f7 100644
--- a/testOOMlib.h
+++ b/testOOMlib.h
@@ -1,11 +1,7 @@
#ifndef TEST_OOM_LIB_H
#define TEST_OOM_LIB_H
-#include
-
-#ifdef HAVE_SYS_TYPES_H
-#include
-#endif
+#include
void* test_malloc (size_t bytes);
void* test_realloc (void *memory,
diff --git a/testReader.c b/testReader.c
index 70d5ee7e..c4848fc5 100644
--- a/testReader.c
+++ b/testReader.c
@@ -13,19 +13,6 @@
#include
#include
-#ifdef HAVE_SYS_TYPES_H
-#include
-#endif
-#ifdef HAVE_SYS_STAT_H
-#include
-#endif
-#ifdef HAVE_FCNTL_H
-#include
-#endif
-#ifdef HAVE_UNISTD_H
-#include
-#endif
-
#include
static int debug = 0;
diff --git a/testSAX.c b/testSAX.c
index 9cc72f21..8faa5880 100644
--- a/testSAX.c
+++ b/testSAX.c
@@ -22,18 +22,6 @@
#ifdef HAVE_SYS_TIMEB_H
#include
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include
-#endif
-#ifdef HAVE_SYS_STAT_H
-#include
-#endif
-#ifdef HAVE_FCNTL_H
-#include
-#endif
-#ifdef HAVE_UNISTD_H
-#include
-#endif
#include
#include
diff --git a/testXPath.c b/testXPath.c
index 0e377237..810abfb8 100644
--- a/testXPath.c
+++ b/testXPath.c
@@ -12,19 +12,6 @@
#include
#include
-#ifdef HAVE_SYS_TYPES_H
-#include
-#endif
-#ifdef HAVE_SYS_STAT_H
-#include
-#endif
-#ifdef HAVE_FCNTL_H
-#include
-#endif
-#ifdef HAVE_UNISTD_H
-#include
-#endif
-
#include
#include
#include
diff --git a/threads.c b/threads.c
index 5e4db16c..928382cb 100644
--- a/threads.c
+++ b/threads.c
@@ -16,12 +16,6 @@
#include
#include
-#ifdef HAVE_SYS_TYPES_H
-#include
-#endif
-#ifdef HAVE_UNISTD_H
-#include
-#endif
#ifdef HAVE_PTHREAD_H
#include
#elif defined HAVE_WIN32_THREADS
diff --git a/xlink.c b/xlink.c
index f93c9717..65715cb3 100644
--- a/xlink.c
+++ b/xlink.c
@@ -16,19 +16,6 @@
#include
#include
-#ifdef HAVE_SYS_STAT_H
-#include
-#endif
-#ifdef HAVE_FCNTL_H
-#include
-#endif
-#ifdef HAVE_UNISTD_H
-#include
-#endif
-#ifdef LIBXML_ZLIB_ENABLED
-#include
-#endif
-
#include
#include
#include
diff --git a/xmlmemory.c b/xmlmemory.c
index eeb76c37..8f74e6e6 100644
--- a/xmlmemory.c
+++ b/xmlmemory.c
@@ -12,10 +12,6 @@
#include
#include
-#ifdef HAVE_SYS_TYPES_H
-#include
-#endif
-
/* #define DEBUG_MEMORY */
/**
diff --git a/xmlregexp.c b/xmlregexp.c
index f5afa45d..b29298d1 100644
--- a/xmlregexp.c
+++ b/xmlregexp.c
@@ -25,19 +25,12 @@
#include
#include
-#ifdef HAVE_STDINT_H
-#include
-#endif
-
#include
#include
#include
#include
#include
-#ifndef INT_MAX
-#define INT_MAX 123456789 /* easy to flag and big enough for our needs */
-#endif
#ifndef SIZE_MAX
#define SIZE_MAX ((size_t) -1)
#endif
diff --git a/xpath.c b/xpath.c
index 23078957..0e0418b4 100644
--- a/xpath.c
+++ b/xpath.c
@@ -29,10 +29,6 @@
#include
#include
-#ifdef HAVE_SYS_TYPES_H
-#include
-#endif
-
#include
#include
#include