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:
Viktor Szakats 2026-02-03 15:06:07 +01:00
parent fdca2e0fd3
commit 443a539fcf
No known key found for this signature in database
18 changed files with 30 additions and 30 deletions

View file

@ -89,7 +89,7 @@ CURLcode Curl_fopen(struct Curl_easy *data, const char *filename,
unsigned char randbuf[41];
char *tempstore = NULL;
#ifndef _WIN32
curl_struct_stat sb;
curlx_struct_stat sb;
#endif
int fd = -1;
char *dir = NULL;

View file

@ -405,7 +405,7 @@ FILE *curlx_win32_freopen(const char *filename, const char *mode, FILE *fp)
return result;
}
int curlx_win32_stat(const char *path, curl_struct_stat *buffer)
int curlx_win32_stat(const char *path, curlx_struct_stat *buffer)
{
int result = -1;
TCHAR *fixed = NULL;

View file

@ -45,10 +45,10 @@ HANDLE curlx_CreateFile(const char *filename,
HANDLE hTemplateFile);
#endif /* !CURL_WINDOWS_UWP */
#define curlx_fstat _fstati64
#define curl_struct_stat struct _stati64
#define curlx_struct_stat struct _stati64
FILE *curlx_win32_fopen(const char *filename, const char *mode);
FILE *curlx_win32_freopen(const char *filename, const char *mode, FILE *fh);
int curlx_win32_stat(const char *path, curl_struct_stat *buffer);
int curlx_win32_stat(const char *path, curlx_struct_stat *buffer);
int curlx_win32_open(const char *filename, int oflag, ...);
int curlx_win32_rename(const char *oldpath, const char *newpath);
#define CURLX_FOPEN_LOW curlx_win32_fopen
@ -60,7 +60,7 @@ int curlx_win32_rename(const char *oldpath, const char *newpath);
#define curlx_rename curlx_win32_rename
#else
#define curlx_fstat fstat
#define curl_struct_stat struct stat
#define curlx_struct_stat struct stat
#define CURLX_FOPEN_LOW fopen
#define CURLX_FREOPEN_LOW freopen
#define CURLX_FDOPEN_LOW fdopen

View file

@ -270,7 +270,7 @@ static CURLcode file_upload(struct Curl_easy *data,
CURLcode result = CURLE_OK;
char *xfer_ulbuf;
size_t xfer_ulblen;
curl_struct_stat file_stat;
curlx_struct_stat file_stat;
const char *sendbuf;
bool eos = FALSE;
@ -390,7 +390,7 @@ static CURLcode file_do(struct Curl_easy *data, bool *done)
*/
struct FILEPROTO *file = Curl_meta_get(data, CURL_META_FILE_EASY);
CURLcode result = CURLE_OK;
curl_struct_stat statbuf;
curlx_struct_stat statbuf;
curl_off_t expected_size = -1;
bool size_known;
bool fstated = FALSE;

View file

@ -107,7 +107,7 @@ static const char aschex[] =
* and CD/DVD images should be either a STREAM_LF format or a fixed format.
*
*/
curl_off_t VmsRealFileSize(const char *name, const curl_struct_stat *stat_buf)
curl_off_t VmsRealFileSize(const char *name, const curlx_struct_stat *stat_buf)
{
char buffer[8192];
curl_off_t count;
@ -137,7 +137,7 @@ curl_off_t VmsRealFileSize(const char *name, const curl_struct_stat *stat_buf)
*
*/
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:
@ -161,7 +161,7 @@ static curl_off_t VmsSpecialSize(const char *name,
*/
static FILE *vmsfopenread(const char *file, const char *mode)
{
curl_struct_stat statbuf;
curlx_struct_stat statbuf;
int result;
result = curlx_stat(file, &statbuf);
@ -1308,7 +1308,7 @@ CURLcode curl_mime_filedata(curl_mimepart *part, const char *filename)
if(filename) {
char *base;
curl_struct_stat sbuf;
curlx_struct_stat sbuf;
if(curlx_stat(filename, &sbuf))
result = CURLE_READ_ERROR;

View file

@ -1089,7 +1089,7 @@ static CURLcode ssh_state_pkey_init(struct Curl_easy *data,
/* To ponder about: should really the lib be messing about with the
HOME environment variable etc? */
char *home = curl_getenv("HOME");
curl_struct_stat sbuf;
curlx_struct_stat sbuf;
/* If no private key file is specified, try some common paths. */
if(home) {