From 688dcc1d742cdb6fa270da2c9f5c67a4139066a3 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Sun, 9 Jul 2023 09:39:24 +0100 Subject: [PATCH] Add Windows wrapper for rename function --- src/stdafx.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/stdafx.h b/src/stdafx.h index 6d96d82c51..e859993ce2 100644 --- a/src/stdafx.h +++ b/src/stdafx.h @@ -220,6 +220,7 @@ # define fopen(file, mode) _wfopen(OTTD2FS(file).c_str(), _T(mode)) # define unlink(file) _wunlink(OTTD2FS(file).c_str()) +# define rename(oldname, newname) _wrename(OTTD2FS(oldname).c_str(), OTTD2FS(newname).c_str()) std::string FS2OTTD(const std::wstring &name); std::wstring OTTD2FS(const std::string &name);