From 5054c68b580e99f6de0c22a1c6303fc93985f37b Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 1 Jan 2025 03:19:24 +0100 Subject: [PATCH] file: drop `OPEN_NEEDS_ARG3` option Not set since 1bf3643f7b1760f7f92cbb42df2dbdc94e29bf96 #8362 (2022) Added in 00883822be245d2660a569e6bde38892b9433aa2 (2009) for VxWorks. Closes #15882 --- lib/file.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/lib/file.c b/lib/file.c index 39860da68c..a2bf1cc1c9 100644 --- a/lib/file.c +++ b/lib/file.c @@ -84,12 +84,6 @@ #define AMIGA_FILESYSTEM 1 #endif -#ifdef OPEN_NEEDS_ARG3 -# define open_readonly(p,f) open((p),(f),(0)) -#else -# define open_readonly(p,f) open((p),(f)) -#endif - /* * Forward declarations. */ @@ -209,7 +203,7 @@ static CURLcode file_connect(struct Curl_easy *data, bool *done) return CURLE_URL_MALFORMAT; } - fd = open_readonly(actual_path, O_RDONLY|O_BINARY); + fd = open(actual_path, O_RDONLY|O_BINARY); file->path = actual_path; #else if(memchr(real_path, 0, real_path_len)) { @@ -233,16 +227,16 @@ static CURLcode file_connect(struct Curl_easy *data, bool *done) extern int __unix_path_semantics; if(strchr(real_path + 1, ':')) { /* Amiga absolute path */ - fd = open_readonly(real_path + 1, O_RDONLY); + fd = open(real_path + 1, O_RDONLY); file->path++; } else if(__unix_path_semantics) { /* -lunix fallback */ - fd = open_readonly(real_path, O_RDONLY); + fd = open(real_path, O_RDONLY); } } #else - fd = open_readonly(real_path, O_RDONLY); + fd = open(real_path, O_RDONLY); file->path = real_path; #endif #endif