[libxml2] Remove unneeded #includes



commit ebb17970301b8ca39aa953c0ebd343dd7912fd0e
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Fri Mar 4 02:31:59 2022 +0100

    Remove unneeded #includes

 HTMLparser.c            | 13 -------------
 include/libxml/SAX.h    |  1 -
 include/libxml/SAX2.h   |  1 -
 include/libxml/parser.h |  2 --
 parser.c                |  9 ---------
 parserInternals.c       | 13 -------------
 testHTML.c              | 13 -------------
 testOOM.c               |  7 -------
 testOOMlib.h            |  6 +-----
 testReader.c            | 13 -------------
 testSAX.c               | 12 ------------
 testXPath.c             | 13 -------------
 threads.c               |  6 ------
 xlink.c                 | 13 -------------
 xmlmemory.c             |  4 ----
 xmlregexp.c             |  7 -------
 xpath.c                 |  4 ----
 17 files changed, 1 insertion(+), 136 deletions(-)
---
diff --git a/HTMLparser.c b/HTMLparser.c
index 4b9b4e4f..9ea6c3d7 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -14,19 +14,6 @@
 #include <ctype.h>
 #include <stdlib.h>
 
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef LIBXML_ZLIB_ENABLED
-#include <zlib.h>
-#endif
-
 #include <libxml/xmlmemory.h>
 #include <libxml/tree.h>
 #include <libxml/parser.h>
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 <stdlib.h>
 #include <libxml/xmlversion.h>
 #include <libxml/parser.h>
-#include <libxml/xlink.h>
 
 #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 <stdlib.h>
 #include <libxml/xmlversion.h>
 #include <libxml/parser.h>
-#include <libxml/xlink.h>
 
 #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 <stdarg.h>
-
 #include <libxml/xmlversion.h>
 #include <libxml/tree.h>
 #include <libxml/dict.h>
diff --git a/parser.c b/parser.c
index 97747a7a..f4707cbb 100644
--- a/parser.c
+++ b/parser.c
@@ -70,15 +70,6 @@
 #include <libxml/xmlschemastypes.h>
 #include <libxml/relaxng.h>
 #endif
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#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 <ctype.h>
 #include <stdlib.h>
 
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef LIBXML_ZLIB_ENABLED
-#include <zlib.h>
-#endif
-
 #include <libxml/xmlmemory.h>
 #include <libxml/tree.h>
 #include <libxml/parser.h>
diff --git a/testHTML.c b/testHTML.c
index 5d175904..359fba47 100644
--- a/testHTML.c
+++ b/testHTML.c
@@ -14,19 +14,6 @@
 #include <stdarg.h>
 #include <stdlib.h>
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #include <libxml/xmlmemory.h>
 #include <libxml/HTMLparser.h>
 #include <libxml/HTMLtree.h>
diff --git a/testOOM.c b/testOOM.c
index dd13031b..217e04af 100644
--- a/testOOM.c
+++ b/testOOM.c
@@ -12,13 +12,6 @@
 #include <stdarg.h>
 #include <stdlib.h>
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #include <libxml/xmlreader.h>
 
 #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 <config.h>
-
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
+#include <stddef.h>
 
 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 <stdarg.h>
 #include <stdlib.h>
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #include <libxml/xmlreader.h>
 
 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 <sys/timeb.h>
 #endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
 
 #include <libxml/globals.h>
 #include <libxml/xmlerror.h>
diff --git a/testXPath.c b/testXPath.c
index 0e377237..810abfb8 100644
--- a/testXPath.c
+++ b/testXPath.c
@@ -12,19 +12,6 @@
 #include <string.h>
 #include <stdlib.h>
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #include <libxml/xpath.h>
 #include <libxml/tree.h>
 #include <libxml/parser.h>
diff --git a/threads.c b/threads.c
index 5e4db16c..928382cb 100644
--- a/threads.c
+++ b/threads.c
@@ -16,12 +16,6 @@
 #include <libxml/threads.h>
 #include <libxml/globals.h>
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
 #ifdef HAVE_PTHREAD_H
 #include <pthread.h>
 #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 <ctype.h>
 #include <stdlib.h>
 
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef LIBXML_ZLIB_ENABLED
-#include <zlib.h>
-#endif
-
 #include <libxml/xmlmemory.h>
 #include <libxml/tree.h>
 #include <libxml/parser.h>
diff --git a/xmlmemory.c b/xmlmemory.c
index eeb76c37..8f74e6e6 100644
--- a/xmlmemory.c
+++ b/xmlmemory.c
@@ -12,10 +12,6 @@
 #include <ctype.h>
 #include <time.h>
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#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 <string.h>
 #include <limits.h>
 
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
-
 #include <libxml/tree.h>
 #include <libxml/parserInternals.h>
 #include <libxml/xmlregexp.h>
 #include <libxml/xmlautomata.h>
 #include <libxml/xmlunicode.h>
 
-#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 <float.h>
 #include <ctype.h>
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
 #include <libxml/xmlmemory.h>
 #include <libxml/tree.h>
 #include <libxml/valid.h>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]