]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
fopen.h: simplify curl memory macro mappings
authorViktor Szakats <commit@vsz.me>
Tue, 3 Feb 2026 10:34:07 +0000 (11:34 +0100)
committerViktor Szakats <commit@vsz.me>
Tue, 3 Feb 2026 14:13:37 +0000 (15:13 +0100)
Closes #20506

lib/curlx/fopen.h

index 7ced9098c1417a5e30dc8ec74a6e6b26e18928ad..cd415d20b74f41d640ab103d87b6651e31bb70e1 100644 (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