]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tidy-up: `fcntl.h` includes
authorViktor Szakats <commit@vsz.me>
Tue, 30 Sep 2025 16:17:52 +0000 (18:17 +0200)
committerViktor Szakats <commit@vsz.me>
Tue, 30 Sep 2025 19:57:17 +0000 (21:57 +0200)
- drop from source files without obvious users.
- include in `curlx/fopen.h` also for Windows.

Follow-up to 9678ff5b1bfea1c847aee4f9edf023e8f01c9293 #18776

Closes #18782

lib/cf-ip-happy.c
lib/cf-socket.c
lib/connect.c
lib/curlx/fopen.h
lib/rand.c
lib/vtls/vtls.c
lib/vtls/vtls_scache.c

index 0a1364e4b3f556405f40e20178b06549679e81c5..897b968114e6234fd36d2838890da393f20d798b 100644 (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
index d5add9723f0d8ad8fb7e48e358164c15feac54e0..cdd496a5e1dd1dfa064b73147c5f3838995fa3b8 100644 (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
index 1182a42d31fa14637ee10530ab1b3539239469eb..4f42fef0e833b026cde2d5ac2ac6f890154e255b 100644 (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
index d1e3d127c53dd8f4fa7af8d278ecfef5299f4843..b44cbbdfced2fdba5182b705eee2995e057e3ec9 100644 (file)
 
 #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
index f30f3de7c34db97fef21cae242b14487983c55a9..8b7f07ae40551dc8ced76d7687131fc925150c2f 100644 (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
index 9e3870e470050edbc0e0e78686ecac74e1581742..1b1f66cc6eba980f853f4ae69942b2091d376e3f 100644 (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"
index 662539cd89602a196e50181c417f87cd95ccf228..e934fa3b5eaca62ebdc2186453ce428efad674ea 100644 (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"