Skip to content

Commit

Permalink
errno.h inclusion conditionally done in setup_once.h
Browse files Browse the repository at this point in the history
  • Loading branch information
yangtse committed Jul 24, 2011
1 parent 27b8814 commit ef21761
Show file tree
Hide file tree
Showing 33 changed files with 34 additions and 21 deletions.
1 change: 1 addition & 0 deletions lib/Makefile.netware
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,7 @@ endif
@echo $(DL)#define USE_MANUAL 1$(DL) >> $@
@echo $(DL)#define HAVE_ARPA_INET_H 1$(DL) >> $@
@echo $(DL)#define HAVE_ASSERT_H 1$(DL) >> $@
@echo $(DL)#define HAVE_ERRNO_H 1$(DL) >> $@
@echo $(DL)#define HAVE_ERR_H 1$(DL) >> $@
@echo $(DL)#define HAVE_FCNTL_H 1$(DL) >> $@
@echo $(DL)#define HAVE_GETHOSTBYADDR 1$(DL) >> $@
Expand Down
1 change: 0 additions & 1 deletion lib/asyn-thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include "setup.h"

#include <string.h>
#include <errno.h>

#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
Expand Down
3 changes: 2 additions & 1 deletion lib/config-amigaos.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,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
Expand All @@ -26,6 +26,7 @@

#define HAVE_ARPA_INET_H 1
#define HAVE_CLOSESOCKET_CAMEL 1
#define HAVE_ERRNO_H 1
#define HAVE_GETHOSTBYADDR 1
#define HAVE_INET_ADDR 1
#define HAVE_INTTYPES_H 1
Expand Down
1 change: 1 addition & 0 deletions lib/config-dos.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#define PACKAGE "curl"

#define HAVE_ARPA_INET_H 1
#define HAVE_ERRNO_H 1
#define HAVE_FCNTL_H 1
#define HAVE_GETADDRINFO 1
#define HAVE_GETNAMEINFO 1
Expand Down
1 change: 1 addition & 0 deletions lib/config-mac.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

#define OS "mac"

#define HAVE_ERRNO_H 1
#define HAVE_NETINET_IN_H 1
#define HAVE_SYS_SOCKET_H 1
#define HAVE_SYS_SELECT_H 1
Expand Down
3 changes: 3 additions & 0 deletions lib/config-os400.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@
/* Define if you have the <des.h> header file. */
#undef HAVE_DES_H

/* Define if you have the <errno.h> header file. */
#define HAVE_ERRNO_H

/* Define if you have the <err.h> header file. */
#undef HAVE_ERR_H

Expand Down
3 changes: 3 additions & 0 deletions lib/config-riscos.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@
/* Define if you have the <des.h> header file. */
#undef HAVE_DES_H

/* Define if you have the <errno.h> header file. */
#define HAVE_ERRNO_H

/* Define if you have the <err.h> header file. */
#undef HAVE_ERR_H

Expand Down
3 changes: 3 additions & 0 deletions lib/config-vms.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@
/* Define if you have the uname function. */
#define HAVE_UNAME 1

/* Define if you have the <errno.h> header file. */
#define HAVE_ERRNO_H 1

/* Define if you have the <err.h> header file. */
#define HAVE_ERR_H 1

Expand Down
3 changes: 3 additions & 0 deletions lib/config-win32.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
/* Define if you have the <crypto.h> header file. */
/* #define HAVE_CRYPTO_H 1 */

/* Define if you have the <errno.h> header file. */
#define HAVE_ERRNO_H 1

/* Define if you have the <err.h> header file. */
/* #define HAVE_ERR_H 1 */

Expand Down
3 changes: 3 additions & 0 deletions lib/config-win32ce.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
/* Define if you have the <crypto.h> header file. */
/* #define HAVE_CRYPTO_H 1 */

/* Define if you have the <errno.h> header file. */
#define HAVE_ERRNO_H 1

/* Define if you have the <err.h> header file. */
/* #define HAVE_ERR_H 1 */

Expand Down
1 change: 0 additions & 1 deletion lib/connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
#endif

#include <stdio.h>
#include <errno.h>
#include <string.h>

#define _MPRINTF_REPLACE /* use our functions only */
Expand Down
1 change: 0 additions & 1 deletion lib/easy.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <ctype.h>
#include <errno.h>

#include "strequal.h"

Expand Down
3 changes: 1 addition & 2 deletions lib/hostip4.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,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
Expand All @@ -23,7 +23,6 @@
#include "setup.h"

#include <string.h>
#include <errno.h>

#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
Expand Down
1 change: 0 additions & 1 deletion lib/http_ntlm.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
#include <sys/types.h>
#include <sys/wait.h>
#include <signal.h>
#include <errno.h>
#endif

#if (defined(NETWARE) && !defined(__NOVELL_LIBC__))
Expand Down
1 change: 0 additions & 1 deletion lib/inet_ntop.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#include <arpa/inet.h>
#endif
#include <string.h>
#include <errno.h>

#define _MPRINTF_REPLACE /* use our functions only */
#include <curl/mprintf.h>
Expand Down
1 change: 0 additions & 1 deletion lib/inet_pton.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include <arpa/inet.h>
#endif
#include <string.h>
#include <errno.h>

#include "inet_pton.h"

Expand Down
1 change: 0 additions & 1 deletion lib/ldap.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <ctype.h>
#include <errno.h>

#ifdef CURL_LDAP_WIN /* Use Windows LDAP implementation. */
# include <winldap.h>
Expand Down
1 change: 0 additions & 1 deletion lib/qssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

#ifdef USE_QSOSSL
#include <qsossl.h>
#include <errno.h>
#include <string.h>
#ifdef HAVE_LIMITS_H
# include <limits.h>
Expand Down
1 change: 0 additions & 1 deletion lib/sendf.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <errno.h>

#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h> /* required for send() & recv() prototypes */
Expand Down
1 change: 0 additions & 1 deletion lib/setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,6 @@
#ifdef HAVE_ASSERT_H
#include <assert.h>
#endif
#include <errno.h>

#ifdef __TANDEM /* for nsr-tandem-nsk systems */
#include <floss.h>
Expand Down
3 changes: 3 additions & 0 deletions lib/setup_once.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@
#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>
Expand Down
1 change: 0 additions & 1 deletion lib/strerror.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include <curl/curl.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>

#ifdef USE_LIBIDN
#include <idna.h>
Expand Down
1 change: 0 additions & 1 deletion lib/strtoofft.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#ifdef NEED_CURL_STRTOLL
#include <stdlib.h>
#include <ctype.h>
#include <errno.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. */
Expand Down
1 change: 0 additions & 1 deletion lib/transfer.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <ctype.h>
#include <errno.h>

#include "strtoofft.h"
#include "strequal.h"
Expand Down
1 change: 0 additions & 1 deletion lib/url.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include <stdarg.h>
#include <stdlib.h>
#include <ctype.h>
#include <errno.h>

#ifdef WIN32
#include <time.h>
Expand Down
1 change: 1 addition & 0 deletions src/Makefile.netware
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@ endif
@echo $(DL)#define USE_MANUAL 1$(DL) >> $@
@echo $(DL)#define HAVE_ARPA_INET_H 1$(DL) >> $@
@echo $(DL)#define HAVE_ASSERT_H 1$(DL) >> $@
@echo $(DL)#define HAVE_ERRNO_H 1$(DL) >> $@
@echo $(DL)#define HAVE_ERR_H 1$(DL) >> $@
@echo $(DL)#define HAVE_FCNTL_H 1$(DL) >> $@
@echo $(DL)#define HAVE_GETHOSTBYADDR 1$(DL) >> $@
Expand Down
3 changes: 2 additions & 1 deletion src/config-amigaos.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2007, 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
Expand All @@ -30,6 +30,7 @@
#define OS "AmigaOS"

#define HAVE_CLOSESOCKET_CAMEL 1
#define HAVE_ERRNO_H 1
#define HAVE_UNISTD_H 1
#define HAVE_STRDUP 1
#define HAVE_UTIME 1
Expand Down
1 change: 1 addition & 0 deletions src/config-mac.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#define USE_MANUAL 1

#define HAVE_UNISTD_H 1
#define HAVE_ERRNO_H 1
#define HAVE_FCNTL_H 1
#define HAVE_UTIME_H 1
#define HAVE_SYS_UTIME_H 1
Expand Down
3 changes: 3 additions & 0 deletions src/config-riscos.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@
/* Define if you have the <des.h> header file. */
#undef HAVE_DES_H

/* Define if you have the <errno.h> header file. */
#define HAVE_ERRNO_H

/* Define if you have the <err.h> header file. */
#undef HAVE_ERR_H

Expand Down
3 changes: 3 additions & 0 deletions src/config-win32.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
/* HEADER FILES */
/* ---------------------------------------------------------------- */

/* Define if you have the <errno.h> header file. */
#define HAVE_ERRNO_H 1

/* Define if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1

Expand Down
1 change: 0 additions & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <ctype.h>
#include <errno.h>

#if defined(MSDOS) || defined(WIN32)
# if defined(HAVE_LIBGEN_H) && defined(HAVE_BASENAME)
Expand Down
1 change: 0 additions & 1 deletion tests/libtest/lib506.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "test.h"
#include <stdlib.h>
#include <ctype.h>
#include <errno.h>

#include <curl/mprintf.h>

Expand Down
1 change: 0 additions & 1 deletion tests/libtest/test.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>

#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
Expand Down

0 comments on commit ef21761

Please sign in to comment.