System's errno.h inclusion cleanup.
authorYang Tse <yangsita@gmail.com>
Tue, 22 Mar 2011 13:02:23 +0000 (14:02 +0100)
committerYang Tse <yangsita@gmail.com>
Tue, 22 Mar 2011 13:02:23 +0000 (14:02 +0100)
System's errno.h is conditionally included from setup_once.h

adig.c
ares_init.c
ares_process.c
ares_search.c
config-dos.h
config-win32.h
inet_net_pton.c
inet_ntop.c
setup_once.h

diff --git a/adig.c b/adig.c
index 3bdf2c1..21bd8ad 100644 (file)
--- a/adig.c
+++ b/adig.c
@@ -51,7 +51,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
-#include <errno.h>
 
 #include "ares.h"
 #include "ares_dns.h"
index 2ce344d..8aaaa2f 100644 (file)
@@ -63,7 +63,6 @@
 #include <string.h>
 #include <ctype.h>
 #include <time.h>
-#include <errno.h>
 #include "ares.h"
 #include "inet_net_pton.h"
 #include "ares_library_init.h"
index ca4c8ee..a4bf1d2 100644 (file)
@@ -63,7 +63,6 @@
 #include <stdlib.h>
 #include <fcntl.h>
 #include <time.h>
-#include <errno.h>
 
 #include "ares.h"
 #include "ares_dns.h"
index 608cb15..9face5f 100644 (file)
@@ -20,7 +20,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
-#include <errno.h>
 
 #ifdef HAVE_STRINGS_H
 #  include <strings.h>
index 653f8f8..c74425e 100644 (file)
@@ -8,6 +8,7 @@
 
 #define PACKAGE  "c-ares"
 
+#define HAVE_ERRNO_H           1
 #define HAVE_GETTIMEOFDAY      1
 #define HAVE_IOCTLSOCKET       1
 #define HAVE_IOCTLSOCKET_FIONBIO   1
index 635845d..5d13f4c 100644 (file)
@@ -2,7 +2,7 @@
 #define __ARES_CONFIG_WIN32_H
 
 
-/* Copyright (C) 2004 - 2010 by Daniel Stenberg et al
+/* Copyright (C) 2004 - 2011 by Daniel Stenberg et al
  *
  * Permission to use, copy, modify, and distribute this software and its
  * documentation for any purpose and without fee is hereby granted, provided
@@ -26,6 +26,9 @@
 /* Define if you have the <assert.h> header file.  */
 #define HAVE_ASSERT_H 1
 
+/* Define if you have the <errno.h> header file.  */
+#define HAVE_ERRNO_H 1
+
 /* Define if you have the <getopt.h> header file.  */
 #if defined(__MINGW32__) || defined(__POCC__)
 #define HAVE_GETOPT_H 1
index aa6a59f..45bb5d4 100644 (file)
@@ -37,7 +37,6 @@
 #endif
 
 #include <ctype.h>
-#include <errno.h>
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
index 07d3f5a..57e1146 100644 (file)
@@ -36,7 +36,6 @@
 #endif
 
 #include <ctype.h>
-#include <errno.h>
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
index 54c46b4..b185faa 100644 (file)
@@ -2,7 +2,7 @@
 #define __SETUP_ONCE_H
 
 
-/* Copyright (C) 2004 - 2010 by Daniel Stenberg et al
+/* Copyright (C) 2004 - 2011 by Daniel Stenberg et al
  *
  * Permission to use, copy, modify, and distribute this software and its
  * documentation for any purpose and without fee is hereby granted, provided
 #include <string.h>
 #include <stdarg.h>
 #include <ctype.h>
+
+#ifdef HAVE_ERRNO_H
 #include <errno.h>
+#endif
 
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>