fopen.h: simplify curl memory macro mappings

Closes #20506
This commit is contained in:
Viktor Szakats 2026-02-03 11:34:07 +01:00
parent 5bdbad87c5
commit 710d5a28fb
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201

View file

@ -44,30 +44,30 @@ HANDLE curlx_CreateFile(const char *filename,
DWORD dwFlagsAndAttributes,
HANDLE hTemplateFile);
#endif /* !CURL_WINDOWS_UWP */
#define curlx_fstat _fstati64
#define curl_struct_stat struct _stati64
#define curlx_fstat _fstati64
#define curl_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_open(const char *filename, int oflag, ...);
int curlx_win32_rename(const char *oldpath, const char *newpath);
#define CURLX_FOPEN_LOW(fname, mode) curlx_win32_fopen(fname, mode)
#define CURLX_FREOPEN_LOW(fname, mode, fh) curlx_win32_freopen(fname, mode, fh)
#define CURLX_FDOPEN_LOW _fdopen
#define curlx_stat(fname, stp) curlx_win32_stat(fname, stp)
#define curlx_open curlx_win32_open
#define curlx_close _close
#define curlx_rename curlx_win32_rename
#define CURLX_FOPEN_LOW curlx_win32_fopen
#define CURLX_FREOPEN_LOW curlx_win32_freopen
#define CURLX_FDOPEN_LOW _fdopen
#define curlx_stat curlx_win32_stat
#define curlx_open curlx_win32_open
#define curlx_close _close
#define curlx_rename curlx_win32_rename
#else
#define curlx_fstat fstat
#define curl_struct_stat struct stat
#define CURLX_FOPEN_LOW fopen
#define CURLX_FREOPEN_LOW freopen
#define CURLX_FDOPEN_LOW fdopen
#define curlx_stat(fname, stp) stat(fname, stp)
#define curlx_open open
#define curlx_close close
#define curlx_rename rename
#define curlx_fstat fstat
#define curl_struct_stat struct stat
#define CURLX_FOPEN_LOW fopen
#define CURLX_FREOPEN_LOW freopen
#define CURLX_FDOPEN_LOW fdopen
#define curlx_stat stat
#define curlx_open open
#define curlx_close close
#define curlx_rename rename
#endif
#ifdef CURL_MEMDEBUG