From: Viktor Szakats Date: Tue, 3 Feb 2026 10:34:07 +0000 (+0100) Subject: fopen.h: simplify curl memory macro mappings X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=710d5a28fba92d6b85c80a71fb20031b6fab8c48;p=thirdparty%2Fcurl.git fopen.h: simplify curl memory macro mappings Closes #20506 --- diff --git a/lib/curlx/fopen.h b/lib/curlx/fopen.h index 7ced9098c1..cd415d20b7 100644 --- a/lib/curlx/fopen.h +++ b/lib/curlx/fopen.h @@ -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