file: drop OPEN_NEEDS_ARG3 option
Not set since1bf3643f7b#8362 (2022) Added in00883822be(2009) for VxWorks. Closes #15882
This commit is contained in:
parent
98932f3487
commit
5054c68b58
14
lib/file.c
14
lib/file.c
@ -84,12 +84,6 @@
|
|||||||
#define AMIGA_FILESYSTEM 1
|
#define AMIGA_FILESYSTEM 1
|
||||||
#endif
|
#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.
|
* Forward declarations.
|
||||||
*/
|
*/
|
||||||
@ -209,7 +203,7 @@ static CURLcode file_connect(struct Curl_easy *data, bool *done)
|
|||||||
return CURLE_URL_MALFORMAT;
|
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;
|
file->path = actual_path;
|
||||||
#else
|
#else
|
||||||
if(memchr(real_path, 0, real_path_len)) {
|
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;
|
extern int __unix_path_semantics;
|
||||||
if(strchr(real_path + 1, ':')) {
|
if(strchr(real_path + 1, ':')) {
|
||||||
/* Amiga absolute path */
|
/* Amiga absolute path */
|
||||||
fd = open_readonly(real_path + 1, O_RDONLY);
|
fd = open(real_path + 1, O_RDONLY);
|
||||||
file->path++;
|
file->path++;
|
||||||
}
|
}
|
||||||
else if(__unix_path_semantics) {
|
else if(__unix_path_semantics) {
|
||||||
/* -lunix fallback */
|
/* -lunix fallback */
|
||||||
fd = open_readonly(real_path, O_RDONLY);
|
fd = open(real_path, O_RDONLY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
fd = open_readonly(real_path, O_RDONLY);
|
fd = open(real_path, O_RDONLY);
|
||||||
file->path = real_path;
|
file->path = real_path;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user