mirror of
https://github.com/curl/curl.git
synced 2026-07-28 00:03:09 +03:00
tidy-up: drop redundant includes
`sys/types.h` and `sys/socket.h` (non-Win32). They are included via `curl/curl.h` and `curl_setup.h`. This drops `HAVE_SYS_TYPES_H` guards from the codebase. It's safe because `sys/types.h` (POSIX) is already required unconditionally by `curl/curl.h`. It remains used in feature checks by both autotools and cmake; to be reviewed in a future step. Closes #22374
This commit is contained in:
parent
c4dcdb8388
commit
ebc5212dac
7 changed files with 4 additions and 28 deletions
|
|
@ -506,12 +506,15 @@
|
|||
#endif
|
||||
|
||||
#include <limits.h>
|
||||
/* Include after setting system macros that may affect type sizes
|
||||
(e.g. 'off_t' or 'time_t'), or suppress warnings
|
||||
(e.g. '_CRT_SECURE_NO_WARNINGS`), but before including sys/stat.h */
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
# ifdef HAVE_IO_H
|
||||
# include <io.h>
|
||||
# endif
|
||||
# include <sys/types.h>
|
||||
# include <sys/stat.h>
|
||||
/* Large file (>2Gb) support using Win32 functions. */
|
||||
# define curl_lseek _lseeki64
|
||||
|
|
@ -830,10 +833,6 @@
|
|||
#include <time.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
#if !defined(_WIN32) || defined(__MINGW32__)
|
||||
|
|
|
|||
|
|
@ -47,10 +47,6 @@
|
|||
#include <sys/param.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DIRENT_H
|
||||
#include <dirent.h>
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -40,10 +40,6 @@
|
|||
|
||||
#include "curl_setup.h"
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#include "urldata.h"
|
||||
#include "cfilters.h"
|
||||
#include "cf-dns.h"
|
||||
|
|
|
|||
|
|
@ -40,10 +40,6 @@
|
|||
|
||||
#include "curl_setup.h"
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#include "urldata.h"
|
||||
#include "setopt.h"
|
||||
#include "strcase.h"
|
||||
|
|
|
|||
|
|
@ -25,10 +25,6 @@
|
|||
|
||||
#ifdef USE_SSL
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#include "urldata.h"
|
||||
#include "cfilters.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@
|
|||
# define USE_XATTR
|
||||
#elif (defined(__FreeBSD_version) && (__FreeBSD_version > 500000)) || \
|
||||
defined(__MidnightBSD_version)
|
||||
# include <sys/types.h>
|
||||
# include <sys/extattr.h>
|
||||
# define USE_XATTR
|
||||
#elif defined(_WIN32)
|
||||
|
|
|
|||
|
|
@ -23,12 +23,6 @@
|
|||
***************************************************************************/
|
||||
#include "unitcheck.h"
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifndef _WIN32
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue