Browse Source

stdio.h, stdlib.h, string.h, stdarg.h and ctype.h inclusion done in setup_once.h

Yang Tse 13 years ago
parent
commit
f1586cb477
89 changed files with 50 additions and 369 deletions
  1. 0 6
      lib/asyn-ares.c
  2. 0 6
      lib/asyn-thread.c
  3. 1 3
      lib/axtls.c
  4. 0 3
      lib/base64.c
  5. 0 6
      lib/connect.c
  6. 0 3
      lib/content_encoding.c
  7. 0 3
      lib/cookie.c
  8. 0 1
      lib/curl_addrinfo.c
  9. 1 0
      lib/curl_threads.c
  10. 1 4
      lib/cyassl.c
  11. 0 7
      lib/dict.c
  12. 0 7
      lib/easy.c
  13. 1 4
      lib/escape.c
  14. 0 6
      lib/file.c
  15. 0 1
      lib/fileinfo.c
  16. 1 4
      lib/formdata.c
  17. 0 5
      lib/ftp.c
  18. 0 4
      lib/getenv.c
  19. 0 4
      lib/getinfo.c
  20. 0 7
      lib/gopher.c
  21. 2 3
      lib/gtls.c
  22. 0 3
      lib/hash.c
  23. 0 6
      lib/hostasyn.c
  24. 0 6
      lib/hostip.c
  25. 0 6
      lib/hostip4.c
  26. 0 6
      lib/hostip6.c
  27. 0 6
      lib/hostsyn.c
  28. 0 6
      lib/http.c
  29. 1 6
      lib/http_chunks.c
  30. 1 6
      lib/http_digest.c
  31. 1 6
      lib/http_negotiate.c
  32. 1 6
      lib/http_negotiate_sspi.c
  33. 1 8
      lib/http_ntlm.c
  34. 1 0
      lib/http_proxy.c
  35. 11 11
      lib/idn_win32.c
  36. 0 5
      lib/imap.c
  37. 0 1
      lib/inet_ntop.c
  38. 0 1
      lib/inet_pton.c
  39. 0 2
      lib/krb4.c
  40. 0 2
      lib/krb5.c
  41. 0 7
      lib/ldap.c
  42. 0 3
      lib/llist.c
  43. 0 1
      lib/md4.c
  44. 0 2
      lib/md5.c
  45. 0 4
      lib/memdebug.c
  46. 3 4
      lib/memdebug.h
  47. 0 5
      lib/mprintf.c
  48. 0 4
      lib/netrc.c
  49. 0 3
      lib/nonblock.c
  50. 0 3
      lib/nss.c
  51. 2 4
      lib/nwlib.c
  52. 3 10
      lib/nwos.c
  53. 1 7
      lib/parsedate.c
  54. 4 6
      lib/pingpong.h
  55. 1 3
      lib/polarssl.c
  56. 0 5
      lib/pop3.c
  57. 2 1
      lib/qssl.c
  58. 0 3
      lib/security.c
  59. 0 5
      lib/sendf.c
  60. 1 3
      lib/share.c
  61. 0 5
      lib/slist.c
  62. 0 5
      lib/smtp.c
  63. 0 4
      lib/socks.c
  64. 0 5
      lib/socks_gssapi.c
  65. 0 7
      lib/socks_sspi.c
  66. 0 3
      lib/speedcheck.c
  67. 0 5
      lib/ssh.c
  68. 0 3
      lib/sslgen.c
  69. 0 3
      lib/ssluse.c
  70. 1 0
      lib/strdup.c
  71. 0 3
      lib/strequal.c
  72. 0 2
      lib/strerror.c
  73. 0 1
      lib/strtok.c
  74. 1 3
      lib/strtoofft.c
  75. 0 6
      lib/telnet.c
  76. 0 5
      lib/tftp.c
  77. 0 7
      lib/transfer.c
  78. 0 8
      lib/url.c
  79. 3 5
      lib/url.h
  80. 0 3
      lib/version.c
  81. 1 0
      lib/wildcard.c
  82. 0 3
      src/getpass.c
  83. 0 4
      src/homedir.c
  84. 2 1
      src/hugehelp.c.cvs
  85. 1 5
      src/main.c
  86. 0 2
      src/mkhelp.pl
  87. 0 4
      src/urlglob.c
  88. 0 3
      src/writeout.c
  89. 0 1
      src/xattr.c

+ 0 - 6
lib/asyn-ares.c

@@ -22,8 +22,6 @@
 
 #include "setup.h"
 
-#include <string.h>
-
 #ifdef HAVE_LIMITS_H
 #include <limits.h>
 #endif
@@ -39,16 +37,12 @@
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>     /* required for free() prototypes */
-#endif
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>     /* for the close() proto */
 #endif
 #ifdef __VMS
 #include <in.h>
 #include <inet.h>
-#include <stdlib.h>
 #endif
 
 #ifdef HAVE_PROCESS_H

+ 0 - 6
lib/asyn-thread.c

@@ -22,8 +22,6 @@
 
 #include "setup.h"
 
-#include <string.h>
-
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
@@ -36,16 +34,12 @@
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>     /* required for free() prototypes */
-#endif
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>     /* for the close() proto */
 #endif
 #ifdef __VMS
 #include <in.h>
 #include <inet.h>
-#include <stdlib.h>
 #endif
 
 #if defined(USE_THREADS_POSIX)

+ 1 - 3
lib/axtls.c

@@ -27,13 +27,11 @@
  */
 
 #include "setup.h"
+
 #ifdef USE_AXTLS
 #include <axTLS/ssl.h>
 #include "axtls.h"
 
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif

+ 0 - 3
lib/base64.c

@@ -24,9 +24,6 @@
 
 #include "setup.h"
 
-#include <stdlib.h>
-#include <string.h>
-
 #define _MPRINTF_REPLACE /* use our functions only */
 #include <curl/mprintf.h>
 

+ 0 - 6
lib/connect.c

@@ -49,9 +49,6 @@
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
 
 #if (defined(HAVE_IOCTL_FIONBIO) && defined(NETWARE))
 #include <sys/filio.h>
@@ -65,9 +62,6 @@
 #include <inet.h>
 #endif
 
-#include <stdio.h>
-#include <string.h>
-
 #define _MPRINTF_REPLACE /* use our functions only */
 #include <curl/mprintf.h>
 

+ 0 - 3
lib/content_encoding.c

@@ -24,9 +24,6 @@
 
 #ifdef HAVE_LIBZ
 
-#include <stdlib.h>
-#include <string.h>
-
 #include "urldata.h"
 #include <curl/curl.h>
 #include "sendf.h"

+ 0 - 3
lib/cookie.c

@@ -81,9 +81,6 @@ Example set of cookies:
 
 #if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
 
-#include <stdlib.h>
-#include <string.h>
-
 #define _MPRINTF_REPLACE
 #include <curl/mprintf.h>
 

+ 0 - 1
lib/curl_addrinfo.c

@@ -40,7 +40,6 @@
 #ifdef __VMS
 #  include <in.h>
 #  include <inet.h>
-#  include <stdlib.h>
 #endif
 
 #if defined(NETWARE) && defined(__NOVELL_LIBC__)

+ 1 - 0
lib/curl_threads.c

@@ -19,6 +19,7 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
+
 #include "setup.h"
 
 #if defined(USE_THREADS_POSIX)

+ 1 - 4
lib/cyassl.c

@@ -27,16 +27,13 @@
  */
 
 #include "setup.h"
+
 #ifdef USE_CYASSL
 
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
 
-
 #include "urldata.h"
 #include "sendf.h"
 #include "inet_pton.h"

+ 0 - 7
lib/dict.c

@@ -24,13 +24,6 @@
 
 #ifndef CURL_DISABLE_DICT
 
-/* -- WIN32 approved -- */
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
-
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif

+ 0 - 7
lib/easy.c

@@ -22,13 +22,6 @@
 
 #include "setup.h"
 
-/* -- WIN32 approved -- */
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
-
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif

+ 1 - 4
lib/escape.c

@@ -24,12 +24,9 @@
  * allocated string or NULL if an error occurred.  */
 
 #include "setup.h"
-#include <ctype.h>
+
 #include <curl/curl.h>
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
 #include "curl_memory.h"
 #include "urldata.h"
 #include "warnless.h"

+ 0 - 6
lib/file.c

@@ -23,12 +23,6 @@
 #include "setup.h"
 
 #ifndef CURL_DISABLE_FILE
-/* -- WIN32 approved -- */
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
 
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>

+ 0 - 1
lib/fileinfo.c

@@ -22,7 +22,6 @@
 
 #include "setup.h"
 
-#include <stdlib.h>
 #include "strdup.h"
 #include "fileinfo.h"
 

+ 1 - 4
lib/formdata.c

@@ -21,6 +21,7 @@
  ***************************************************************************/
 
 #include "setup.h"
+
 #include <curl/curl.h>
 
 /* Length of the random boundary string. */
@@ -28,10 +29,6 @@
 
 #if !defined(CURL_DISABLE_HTTP) || defined(USE_SSLEAY)
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
 #if defined(HAVE_LIBGEN_H) && defined(HAVE_BASENAME)
 #include <libgen.h>
 #endif

+ 0 - 5
lib/ftp.c

@@ -23,11 +23,6 @@
 #include "setup.h"
 
 #ifndef CURL_DISABLE_FTP
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <ctype.h>
 
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>

+ 0 - 4
lib/getenv.c

@@ -22,10 +22,6 @@
 
 #include "setup.h"
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
 #ifdef __VMS
 #include <unixlib.h>
 #endif

+ 0 - 4
lib/getinfo.c

@@ -27,10 +27,6 @@
 #include "urldata.h"
 #include "getinfo.h"
 
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
 #include "curl_memory.h"
 #include "sslgen.h"
 #include "connect.h" /* Curl_getconnectinfo() */

+ 0 - 7
lib/gopher.c

@@ -24,13 +24,6 @@
 
 #ifndef CURL_DISABLE_GOPHER
 
-/* -- WIN32 approved -- */
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
-
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif

+ 2 - 3
lib/gtls.c

@@ -29,14 +29,13 @@
  */
 
 #include "setup.h"
+
 #ifdef USE_GNUTLS
+
 #include <gnutls/gnutls.h>
 #include <gnutls/x509.h>
 #include <gcrypt.h>
 
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif

+ 0 - 3
lib/hash.c

@@ -22,9 +22,6 @@
 
 #include "setup.h"
 
-#include <string.h>
-#include <stdlib.h>
-
 #include "hash.h"
 #include "llist.h"
 

+ 0 - 6
lib/hostasyn.c

@@ -22,8 +22,6 @@
 
 #include "setup.h"
 
-#include <string.h>
-
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
@@ -36,16 +34,12 @@
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>     /* required for free() prototypes */
-#endif
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>     /* for the close() proto */
 #endif
 #ifdef __VMS
 #include <in.h>
 #include <inet.h>
-#include <stdlib.h>
 #endif
 
 #ifdef HAVE_PROCESS_H

+ 0 - 6
lib/hostip.c

@@ -22,8 +22,6 @@
 
 #include "setup.h"
 
-#include <string.h>
-
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
@@ -36,16 +34,12 @@
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>     /* required for free() prototypes */
-#endif
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>     /* for the close() proto */
 #endif
 #ifdef __VMS
 #include <in.h>
 #include <inet.h>
-#include <stdlib.h>
 #endif
 
 #ifdef HAVE_SETJMP_H

+ 0 - 6
lib/hostip4.c

@@ -22,8 +22,6 @@
 
 #include "setup.h"
 
-#include <string.h>
-
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
@@ -36,16 +34,12 @@
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>     /* required for free() prototypes */
-#endif
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>     /* for the close() proto */
 #endif
 #ifdef __VMS
 #include <in.h>
 #include <inet.h>
-#include <stdlib.h>
 #endif
 
 #ifdef HAVE_PROCESS_H

+ 0 - 6
lib/hostip6.c

@@ -22,8 +22,6 @@
 
 #include "setup.h"
 
-#include <string.h>
-
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
@@ -36,16 +34,12 @@
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>     /* required for free() prototypes */
-#endif
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>     /* for the close() proto */
 #endif
 #ifdef __VMS
 #include <in.h>
 #include <inet.h>
-#include <stdlib.h>
 #endif
 
 #ifdef HAVE_PROCESS_H

+ 0 - 6
lib/hostsyn.c

@@ -22,8 +22,6 @@
 
 #include "setup.h"
 
-#include <string.h>
-
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
@@ -36,16 +34,12 @@
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>     /* required for free() prototypes */
-#endif
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>     /* for the close() proto */
 #endif
 #ifdef __VMS
 #include <in.h>
 #include <inet.h>
-#include <stdlib.h>
 #endif
 
 #ifdef HAVE_PROCESS_H

+ 0 - 6
lib/http.c

@@ -23,12 +23,6 @@
 #include "setup.h"
 
 #ifndef CURL_DISABLE_HTTP
-/* -- WIN32 approved -- */
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
 
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>

+ 1 - 6
lib/http_chunks.c

@@ -19,15 +19,10 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
+
 #include "setup.h"
 
 #ifndef CURL_DISABLE_HTTP
-/* -- WIN32 approved -- */
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
 
 #include "urldata.h" /* it includes http_chunks.h */
 #include "sendf.h"   /* for the client write stuff */

+ 1 - 6
lib/http_digest.c

@@ -19,15 +19,10 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
+
 #include "setup.h"
 
 #if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_CRYPTO_AUTH)
-/* -- WIN32 approved -- */
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
 
 #include "urldata.h"
 #include "sendf.h"

+ 1 - 6
lib/http_negotiate.c

@@ -19,6 +19,7 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
+
 #include "setup.h"
 
 #ifdef HAVE_GSSAPI
@@ -27,12 +28,6 @@
 #endif
 
 #ifndef CURL_DISABLE_HTTP
- /* -- WIN32 approved -- */
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
 
 #include "urldata.h"
 #include "sendf.h"

+ 1 - 6
lib/http_negotiate_sspi.c

@@ -19,17 +19,12 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
+
 #include "setup.h"
 
 #ifdef USE_WINDOWS_SSPI
 
 #ifndef CURL_DISABLE_HTTP
-/* -- WIN32 approved -- */
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
 
 #include "urldata.h"
 #include "sendf.h"

+ 1 - 8
lib/http_ntlm.c

@@ -19,6 +19,7 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
+
 #include "setup.h"
 
 /* NTLM details:
@@ -32,20 +33,12 @@
 
 #define DEBUG_ME 0
 
-/* -- WIN32 approved -- */
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
-
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
 
 #ifdef USE_NTLM_SSO
 #include <unistd.h>
-#include <stdlib.h>
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <signal.h>

+ 1 - 0
lib/http_proxy.c

@@ -27,6 +27,7 @@
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
+
 #include "urldata.h"
 #include <curl/curl.h>
 #include "http_proxy.h"

+ 11 - 11
lib/idn_win32.c

@@ -19,13 +19,15 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
-/***************************************************************************
- * IDN Implementation using windows native APIs
- * Pierre Joye <pierre@php.net>
- ***************************************************************************/
-#if defined(WIN32) && defined(USE_WIN32_IDN)
-#include <windows.h>
-#include <stdio.h>
+
+ /*
+  * IDN conversions using Windows kernel32 and normaliz libraries.
+  */
+
+#include "setup.h"
+
+#ifdef USE_WIN32_IDN
+
 #include <tchar.h>
 
 #ifdef WANT_IDN_PROTOTYPES
@@ -121,7 +123,5 @@ int curl_win32_ascii_to_idn(const char *in, size_t in_len, char **out_utf8)
   }
   return 1;
 }
-#else
-typedef int dummy; /* because ISO C forbids an empty translation unit! */
-#endif
- /* WIN32 */
+
+#endif /* USE_WIN32_IDN */

+ 0 - 5
lib/imap.c

@@ -26,11 +26,6 @@
 #include "setup.h"
 
 #ifndef CURL_DISABLE_IMAP
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <ctype.h>
 
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>

+ 0 - 1
lib/inet_ntop.c

@@ -34,7 +34,6 @@
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
-#include <string.h>
 
 #define _MPRINTF_REPLACE /* use our functions only */
 #include <curl/mprintf.h>

+ 0 - 1
lib/inet_pton.c

@@ -32,7 +32,6 @@
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
-#include <string.h>
 
 #include "inet_pton.h"
 

+ 0 - 2
lib/krb4.c

@@ -44,11 +44,9 @@
 #ifndef CURL_DISABLE_FTP
 #ifdef HAVE_KRB4
 
-#include <stdlib.h>
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif
-#include <string.h>
 #include <krb.h>
 #include <des.h>
 

+ 0 - 2
lib/krb5.c

@@ -41,11 +41,9 @@
 #define GSS_C_NT_HOSTBASED_SERVICE gss_nt_service_name
 #endif
 
-#include <stdlib.h>
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif
-#include <string.h>
 
 #include "urldata.h"
 #include "curl_base64.h"

+ 0 - 7
lib/ldap.c

@@ -35,13 +35,6 @@
  * OpenLDAP library versions, USE_OPENLDAP shall not be defined.
  */
 
-/* -- WIN32 approved -- */
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
-
 #ifdef CURL_LDAP_WIN            /* Use Windows LDAP implementation. */
 # include <winldap.h>
 # ifndef LDAP_VENDOR_NAME

+ 0 - 3
lib/llist.c

@@ -22,9 +22,6 @@
 
 #include "setup.h"
 
-#include <string.h>
-#include <stdlib.h>
-
 #include "llist.h"
 #include "curl_memory.h"
 

+ 0 - 1
lib/md4.c

@@ -27,7 +27,6 @@
 #ifdef USE_NSS
 
 #include "curl_md4.h"
-#include <string.h>
 
 typedef unsigned int UINT4;
 

+ 0 - 2
lib/md5.c

@@ -24,8 +24,6 @@
 
 #ifndef CURL_DISABLE_CRYPTO_AUTH
 
-#include <string.h>
-
 #include "curl_md5.h"
 #include "curl_hmac.h"
 

+ 0 - 4
lib/memdebug.c

@@ -32,10 +32,6 @@
 #define _MPRINTF_REPLACE
 #include <curl/mprintf.h>
 #include "urldata.h"
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdarg.h>
 
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>

+ 3 - 4
lib/memdebug.h

@@ -1,6 +1,6 @@
 #ifdef CURLDEBUG
-#ifndef _CURL_MEMDEBUG_H
-#define _CURL_MEMDEBUG_H
+#ifndef HEADER_CURL_MEMDEBUG_H
+#define HEADER_CURL_MEMDEBUG_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -39,7 +39,6 @@
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
-#include <stdio.h>
 
 #define logfile curl_debuglogfile
 
@@ -133,7 +132,7 @@ CURL_EXTERN int curl_fclose(FILE *file, int line, const char *source);
 
 #endif /* MEMDEBUG_NODEFINES */
 
-#endif /* _CURL_MEMDEBUG_H */
+#endif /* HEADER_CURL_MEMDEBUG_H */
 #endif /* CURLDEBUG */
 
 #ifndef fake_sclose

+ 0 - 5
lib/mprintf.c

@@ -36,11 +36,6 @@
  */
 
 #include "setup.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <ctype.h>
-#include <string.h>
 
 #if defined(DJGPP) && (DJGPP_MINOR < 4)
 #undef _MPRINTF_REPLACE /* don't use x_was_used() here */

+ 0 - 4
lib/netrc.c

@@ -22,10 +22,6 @@
 
 #include "setup.h"
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif

+ 0 - 3
lib/nonblock.c

@@ -34,9 +34,6 @@
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
 
 #if (defined(HAVE_IOCTL_FIONBIO) && defined(NETWARE))
 #include <sys/filio.h>

+ 0 - 3
lib/nss.c

@@ -27,9 +27,6 @@
 
 #include "setup.h"
 
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif

+ 2 - 4
lib/nwlib.c

@@ -20,14 +20,12 @@
  *
  ***************************************************************************/
 
-#ifdef NETWARE /* Novell NetWare */
+#include "setup.h"
 
-#include <stdlib.h>
+#ifdef NETWARE /* Novell NetWare */
 
 #ifdef __NOVELL_LIBC__
 /* For native LibC-based NLM we need to register as a real lib. */
-#include <errno.h>
-#include <string.h>
 #include <library.h>
 #include <netware.h>
 #include <screen.h>

+ 3 - 10
lib/nwos.c

@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -20,9 +20,9 @@
  *
  ***************************************************************************/
 
-#ifdef NETWARE /* Novell NetWare */
+#include "setup.h"
 
-#include <stdlib.h>
+#ifdef NETWARE /* Novell NetWare */
 
 #ifdef __NOVELL_LIBC__
 /* For native LibC-based NLM we need to do nothing. */
@@ -34,7 +34,6 @@ int netware_init ( void )
 #else /* __NOVELL_LIBC__ */
 
 /* For native CLib-based NLM we need to initialize the LONG namespace. */
-#include <stdio.h>
 #include <nwnspace.h>
 #include <nwthread.h>
 #include <nwadv.h>
@@ -86,10 +85,4 @@ int __deinit_environment ( void )
 
 #endif /* __NOVELL_LIBC__ */
 
-#else /* NETWARE */
-
-#ifdef __POCC__
-#  pragma warn(disable:2024)  /* Disable warning #2024: Empty input file */
-#endif
-
 #endif /* NETWARE */

+ 1 - 7
lib/parsedate.c

@@ -72,14 +72,8 @@
   20040911 +0200
 
 */
-#include "setup.h"
-#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
 
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h> /* for strtol() */
-#endif
+#include "setup.h"
 
 #include <curl/curl.h>
 #include "rawstr.h"

+ 4 - 6
lib/pingpong.h

@@ -1,5 +1,5 @@
-#ifndef __PINGPONG_H
-#define __PINGPONG_H
+#ifndef HEADER_CURL_PINGPONG_H
+#define HEADER_CURL_PINGPONG_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -22,8 +22,6 @@
  *
  ***************************************************************************/
 
-#include <stdarg.h>
-
 #include "setup.h"
 
 #if !defined(CURL_DISABLE_IMAP) || !defined(CURL_DISABLE_FTP) || \
@@ -144,4 +142,4 @@ CURLcode Curl_pp_disconnect(struct pingpong *pp);
 int Curl_pp_getsock(struct pingpong *pp, curl_socket_t *socks,
                     int numsocks);
 
-#endif /* __PINGPONG_H */
+#endif /* HEADER_CURL_PINGPONG_H */

+ 1 - 3
lib/polarssl.c

@@ -27,11 +27,9 @@
  */
 
 #include "setup.h"
+
 #ifdef USE_POLARSSL
 
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif

+ 0 - 5
lib/pop3.c

@@ -27,11 +27,6 @@
 #include "setup.h"
 
 #ifndef CURL_DISABLE_POP3
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <ctype.h>
 
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>

+ 2 - 1
lib/qssl.c

@@ -23,8 +23,9 @@
 #include "setup.h"
 
 #ifdef USE_QSOSSL
+
 #include <qsossl.h>
-#include <string.h>
+
 #ifdef HAVE_LIMITS_H
 #  include <limits.h>
 #endif

+ 0 - 3
lib/security.c

@@ -46,9 +46,6 @@
 #ifndef CURL_DISABLE_FTP
 #if defined(HAVE_KRB4) || defined(HAVE_GSSAPI)
 
-#include <stdarg.h>
-#include <string.h>
-
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif

+ 0 - 5
lib/sendf.c

@@ -22,10 +22,6 @@
 
 #include "setup.h"
 
-#include <stdio.h>
-#include <stdarg.h>
-#include <stdlib.h>
-
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h> /* required for send() & recv() prototypes */
 #endif
@@ -54,7 +50,6 @@
 #define Curl_sec_read(a,b,c,d) -1
 #endif
 
-#include <string.h>
 #include "curl_memory.h"
 #include "strerror.h"
 

+ 1 - 3
lib/share.c

@@ -21,9 +21,7 @@
  ***************************************************************************/
 
 #include "setup.h"
-#include <stdarg.h>
-#include <stdlib.h>
-#include <string.h>
+
 #include <curl/curl.h>
 #include "urldata.h"
 #include "share.h"

+ 0 - 5
lib/slist.c

@@ -22,11 +22,6 @@
 
 #include "setup.h"
 
-#include <stdio.h>
-#include <stdarg.h>
-#include <stdlib.h>
-
-#include <string.h>
 #include "curl_memory.h"
 #include "slist.h"
 

+ 0 - 5
lib/smtp.c

@@ -29,11 +29,6 @@
 #include "setup.h"
 
 #ifndef CURL_DISABLE_SMTP
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <ctype.h>
 
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>

+ 0 - 4
lib/socks.c

@@ -23,11 +23,7 @@
 #include "setup.h"
 
 #if !defined(CURL_DISABLE_PROXY) || defined(USE_WINDOWS_SSPI)
-#include <string.h>
 
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif

+ 0 - 5
lib/socks_gssapi.c

@@ -31,11 +31,6 @@
 #ifndef gss_nt_service_name
 #define gss_nt_service_name GSS_C_NT_HOSTBASED_SERVICE
 #endif
-#include <string.h>
-
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
 
 #include "curl_gssapi.h"
 #include "urldata.h"

+ 0 - 7
lib/socks_sspi.c

@@ -20,17 +20,10 @@
  *
  ***************************************************************************/
 
-
 #include "setup.h"
 
 #ifdef USE_WINDOWS_SSPI
 
-#include <string.h>
-
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-
 #include "urldata.h"
 #include "sendf.h"
 #include "connect.h"

+ 0 - 3
lib/speedcheck.c

@@ -22,9 +22,6 @@
 
 #include "setup.h"
 
-#include <stdio.h>
-#include <string.h>
-
 #include <curl/curl.h>
 #include "urldata.h"
 #include "sendf.h"

+ 0 - 5
lib/ssh.c

@@ -26,11 +26,6 @@
 
 #ifdef USE_LIBSSH2
 
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <ctype.h>
 #ifdef HAVE_LIMITS_H
 #  include <limits.h>
 #endif

+ 0 - 3
lib/sslgen.c

@@ -43,9 +43,6 @@
 
 #include "setup.h"
 
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif

+ 0 - 3
lib/ssluse.c

@@ -32,9 +32,6 @@
 
 #include "setup.h"
 
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
 #ifdef HAVE_LIMITS_H
 #include <limits.h>
 #endif

+ 1 - 0
lib/strdup.c

@@ -21,6 +21,7 @@
  ***************************************************************************/
 
 #include "setup.h"
+
 #include "strdup.h"
 
 #ifndef HAVE_STRDUP

+ 0 - 3
lib/strequal.c

@@ -22,9 +22,6 @@
 
 #include "setup.h"
 
-#include <string.h>
-#include <ctype.h>
-
 #ifdef HAVE_STRINGS_H
 #include <strings.h>
 #endif

+ 0 - 2
lib/strerror.c

@@ -34,8 +34,6 @@
 #endif
 
 #include <curl/curl.h>
-#include <stdlib.h>
-#include <string.h>
 
 #ifdef USE_LIBIDN
 #include <idna.h>

+ 0 - 1
lib/strtok.c

@@ -24,7 +24,6 @@
 
 #ifndef HAVE_STRTOK_R
 #include <stddef.h>
-#include <string.h>
 
 #include "strtok.h"
 

+ 1 - 3
lib/strtoofft.c

@@ -21,6 +21,7 @@
  ***************************************************************************/
 
 #include "setup.h"
+
 #include "strtoofft.h"
 
 /*
@@ -32,14 +33,11 @@
  */
 
 #ifdef NEED_CURL_STRTOLL
-#include <stdlib.h>
-#include <ctype.h>
 
 /* Range tests can be used for alphanum decoding if characters are consecutive,
    like in ASCII. Else an array is scanned. Determine this condition now. */
 
 #if('9' - '0') != 9 || ('Z' - 'A') != 25 || ('z' - 'a') != 25
-#include <string.h>
 
 #define NO_RANGE_TEST
 

+ 0 - 6
lib/telnet.c

@@ -23,12 +23,6 @@
 #include "setup.h"
 
 #ifndef CURL_DISABLE_TELNET
-/* -- WIN32 approved -- */
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
 
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>

+ 0 - 5
lib/tftp.c

@@ -23,11 +23,6 @@
 #include "setup.h"
 
 #ifndef CURL_DISABLE_TFTP
-/* -- WIN32 approved -- */
-#include <stdio.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
 
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>

+ 0 - 7
lib/transfer.c

@@ -22,13 +22,6 @@
 
 #include "setup.h"
 
-/* -- WIN32 approved -- */
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
-
 #include "strtoofft.h"
 #include "strequal.h"
 #include "rawstr.h"

+ 0 - 8
lib/url.c

@@ -20,16 +20,8 @@
  *
  ***************************************************************************/
 
-/* -- WIN32 approved -- */
-
 #include "setup.h"
 
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <ctype.h>
-
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif

+ 3 - 5
lib/url.h

@@ -1,5 +1,5 @@
-#ifndef __URL_H
-#define __URL_H
+#ifndef HEADER_CURL_URL_H
+#define HEADER_CURL_URL_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -22,8 +22,6 @@
  *
  ***************************************************************************/
 
-#include <stdarg.h> /* to make sure we have ap_list */
-
 /*
  * Prototypes for library-wide functions provided by url.c
  */
@@ -94,4 +92,4 @@ void Curl_verboseconnect(struct connectdata *conn);
 #endif
 
 
-#endif
+#endif /* HEADER_CURL_URL_H */

+ 0 - 3
lib/version.c

@@ -22,9 +22,6 @@
 
 #include "setup.h"
 
-#include <string.h>
-#include <stdio.h>
-
 #include <curl/curl.h>
 #include "urldata.h"
 #include "sslgen.h"

+ 1 - 0
lib/wildcard.c

@@ -21,6 +21,7 @@
  ***************************************************************************/
 
 #include "setup.h"
+
 #include "wildcard.h"
 #include "llist.h"
 #include "fileinfo.h"

+ 0 - 3
src/getpass.c

@@ -28,9 +28,6 @@
 #ifndef HAVE_GETPASS_R
 /* this file is only for systems without getpass_r() */
 
-#include <stdio.h>
-#include <string.h>
-
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif

+ 0 - 4
src/homedir.c

@@ -22,10 +22,6 @@
 
 #include "setup.h"
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
 #ifdef HAVE_PWD_H
 #include <pwd.h>
 #endif

+ 2 - 1
src/hugehelp.c.cvs

@@ -1,4 +1,5 @@
-#include <stdio.h>
+#include "setup.h"
+#include "hugehelp.h"
 void hugehelp(void)
 {
   puts ( "This is a silly replacement for the actual file.");

+ 1 - 5
src/main.c

@@ -19,6 +19,7 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
+
 #include "setup.h"
 
 #include <curl/curl.h>
@@ -27,13 +28,8 @@
 ** system headers
 */
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#include <ctype.h>
 
 #if defined(MSDOS) || defined(WIN32)
 #  if defined(HAVE_LIBGEN_H) && defined(HAVE_BASENAME)

+ 0 - 2
src/mkhelp.pl

@@ -136,12 +136,10 @@ print <<HEAD
 #include "setup.h"
 #ifdef USE_MANUAL
 #include "hugehelp.h"
-#include <stdio.h>
 HEAD
     ;
 if($c) {
     print <<HEAD
-#include <stdlib.h>
 #include <zlib.h>
 static const unsigned char hugehelpgz[] = {
   /* This mumbo-jumbo is the huge help text compressed with gzip.

+ 0 - 4
src/urlglob.c

@@ -23,10 +23,6 @@
 /* client-local setup.h */
 #include "setup.h"
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
 #include <curl/curl.h>
 
 #define _MPRINTF_REPLACE /* we want curl-functions instead of native ones */

+ 0 - 3
src/writeout.c

@@ -22,9 +22,6 @@
 
 #include "setup.h"
 
-#include <stdio.h>
-#include <string.h>
-
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif

+ 0 - 1
src/xattr.c

@@ -27,7 +27,6 @@
 
 #ifdef HAVE_FSETXATTR
 #include <sys/types.h>
-#include <string.h>
 #include <sys/xattr.h> /* include header from libc, not from libattr */
 
 /* mapping table of curl metadata to extended attribute names */