tidy-up: fcntl.h includes

- drop from source files without obvious users.
- include in `curlx/fopen.h` also for Windows.

Follow-up to 9678ff5b1b #18776

Closes #18782
This commit is contained in:
Viktor Szakats 2025-09-30 18:17:52 +02:00
parent 583b1ad881
commit f97aa8d7ed
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
7 changed files with 4 additions and 21 deletions

View file

@ -41,9 +41,6 @@
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif

View file

@ -44,9 +44,6 @@
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif

View file

@ -41,9 +41,6 @@
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif

View file

@ -28,6 +28,10 @@
#include "multibyte.h"
#ifdef HAVE_FCNTL_H
#include <fcntl.h> /* for open() and attributes */
#endif
#if defined(_WIN32) && !defined(UNDER_CE)
FILE *curlx_win32_fopen(const char *filename, const char *mode);
int curlx_win32_stat(const char *path, struct_stat *buffer);
@ -36,9 +40,6 @@ int curlx_win32_open(const char *filename, int oflag, ...);
#define curlx_stat(fname, stp) curlx_win32_stat(fname, stp)
#define curlx_open curlx_win32_open
#else
#ifdef HAVE_FCNTL_H
#include <fcntl.h> /* for open() */
#endif
#define CURLX_FOPEN_LOW fopen
#define curlx_stat(fname, stp) stat(fname, stp)
#define curlx_open open

View file

@ -26,9 +26,6 @@
#include <limits.h>
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif

View file

@ -43,9 +43,6 @@
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
#include "../urldata.h"
#include "../cfilters.h"

View file

@ -29,9 +29,6 @@
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
#include "../urldata.h"
#include "../cfilters.h"