mirror of
https://github.com/curl/curl.git
synced 2026-08-24 15:23:36 +03:00
build: move curl stat struct type to the curlx namespace
To match surrounding curlx symbols and functions.
Follow-up to a84b041281 #20496
Closes #20508
This commit is contained in:
parent
fdca2e0fd3
commit
443a539fcf
18 changed files with 30 additions and 30 deletions
|
|
@ -291,7 +291,7 @@ static SANITIZEcode rename_if_reserved_dos(char ** const sanitized,
|
|||
* to rename such files. */
|
||||
char *p, *base, *buffer;
|
||||
#ifdef MSDOS
|
||||
curl_struct_stat st_buf;
|
||||
curlx_struct_stat st_buf;
|
||||
#endif
|
||||
size_t len, bufsize;
|
||||
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ int getfiletime(const char *filename, curl_off_t *stamp)
|
|||
GetLastError());
|
||||
}
|
||||
#else
|
||||
curl_struct_stat statbuf;
|
||||
curlx_struct_stat statbuf;
|
||||
if(curlx_stat(filename, &statbuf) != -1) {
|
||||
*stamp = (curl_off_t)statbuf.st_mtime;
|
||||
rc = 0;
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ static struct tool_mime *tool_mime_new_filedata(struct tool_mime *parent,
|
|||
char *data = NULL;
|
||||
curl_off_t size;
|
||||
curl_off_t origin;
|
||||
curl_struct_stat sbuf;
|
||||
curlx_struct_stat sbuf;
|
||||
|
||||
CURLX_SET_BINMODE(stdin);
|
||||
origin = ftell(stdin);
|
||||
|
|
|
|||
|
|
@ -2208,7 +2208,7 @@ static ParameterError existingfile(char **store,
|
|||
const struct LongShort *a,
|
||||
const char *filename)
|
||||
{
|
||||
curl_struct_stat info;
|
||||
curlx_struct_stat info;
|
||||
if(curlx_stat(filename, &info)) {
|
||||
errorf("The file '%s' provided to --%s does not exist",
|
||||
filename, a->lname);
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ static bool is_pkcs11_uri(const char *string)
|
|||
*
|
||||
*/
|
||||
static curl_off_t vms_realfilesize(const char *name,
|
||||
const curl_struct_stat *stat_buf)
|
||||
const curlx_struct_stat *stat_buf)
|
||||
{
|
||||
char buffer[8192];
|
||||
curl_off_t count;
|
||||
|
|
@ -177,7 +177,7 @@ static curl_off_t vms_realfilesize(const char *name,
|
|||
*
|
||||
*/
|
||||
static curl_off_t VmsSpecialSize(const char *name,
|
||||
const curl_struct_stat *stat_buf)
|
||||
const curlx_struct_stat *stat_buf)
|
||||
{
|
||||
switch(stat_buf->st_fab_rfm) {
|
||||
case FAB$C_VAR:
|
||||
|
|
@ -248,7 +248,7 @@ static struct per_transfer *del_per_transfer(struct per_transfer *per)
|
|||
static CURLcode pre_transfer(struct per_transfer *per)
|
||||
{
|
||||
curl_off_t uploadfilesize = -1;
|
||||
curl_struct_stat fileinfo;
|
||||
curlx_struct_stat fileinfo;
|
||||
CURLcode result = CURLE_OK;
|
||||
|
||||
if(per->uploadfile && !stdin_upload(per->uploadfile)) {
|
||||
|
|
@ -548,7 +548,7 @@ static CURLcode retrycheck(struct OperationConfig *config,
|
|||
}
|
||||
|
||||
if(truncate && outs->bytes && outs->filename && outs->stream) {
|
||||
curl_struct_stat fileinfo;
|
||||
curlx_struct_stat fileinfo;
|
||||
|
||||
/* The output can be a named pipe or a character device etc that
|
||||
cannot be truncated. Only truncate regular files. */
|
||||
|
|
@ -718,7 +718,7 @@ static CURLcode post_per_transfer(struct per_transfer *per,
|
|||
errorf("curl: (%d) Failed writing body", result);
|
||||
}
|
||||
if(result && config->rm_partial) {
|
||||
curl_struct_stat st;
|
||||
curlx_struct_stat st;
|
||||
if(!curlx_stat(outs->filename, &st) && S_ISREG(st.st_mode)) {
|
||||
if(!unlink(outs->filename))
|
||||
notef("Removed output file: %s", outs->filename);
|
||||
|
|
@ -1040,7 +1040,7 @@ static CURLcode setup_outfile(struct OperationConfig *config,
|
|||
}
|
||||
|
||||
if(config->skip_existing) {
|
||||
curl_struct_stat fileinfo;
|
||||
curlx_struct_stat fileinfo;
|
||||
if(!curlx_stat(per->outfile, &fileinfo)) {
|
||||
/* file is present */
|
||||
notef("skips transfer, \"%s\" exists locally", per->outfile);
|
||||
|
|
@ -1052,7 +1052,7 @@ static CURLcode setup_outfile(struct OperationConfig *config,
|
|||
if(config->resume_from_current) {
|
||||
/* We are told to continue from where we are now. Get the size
|
||||
of the file as it is now and open it for append instead */
|
||||
curl_struct_stat fileinfo;
|
||||
curlx_struct_stat fileinfo;
|
||||
/* VMS -- Danger, the filesize is only valid for stream files */
|
||||
if(curlx_stat(per->outfile, &fileinfo) == 0)
|
||||
/* set offset to current file size: */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue