]> wimlib.net Git - wimlib/blobdiff - src/win32_common.c
mount_image.c: add fallback definitions of RENAME_* constants
[wimlib] / src / win32_common.c
index d3007916c89ef53c6f98b718f85af18b30a8850f..408650b0d4a942df93f6e463cc2e2374007a8a62 100644 (file)
  * details.
  *
  * You should have received a copy of the GNU Lesser General Public License
- * along with this file; if not, see http://www.gnu.org/licenses/.
+ * along with this file; if not, see https://www.gnu.org/licenses/.
  */
 
-#ifdef __WIN32__
+#ifdef _WIN32
 
 #ifdef HAVE_CONFIG_H
 #  include "config.h"
@@ -220,7 +220,7 @@ win32_get_drive_path(const wchar_t *file_path, wchar_t drive_path[7])
        return 0;
 }
 
-/* Try to attach an instance of the Windows Overlay File System Filter Driver to
+/* Try to attach an instance of the Windows Overlay Filesystem filter driver to
  * the specified drive (such as C:)  */
 bool
 win32_try_to_attach_wof(const wchar_t *drive)
@@ -274,9 +274,12 @@ windows_msg(u32 code, const wchar_t *format, va_list va,
        size_t buflen = ARRAY_LEN(_buf);
        size_t ret;
        size_t n;
+       va_list va2;
 
 retry:
-       n = vsnwprintf(buf, buflen, format, va);
+       va_copy(va2, va);
+       n = vsnwprintf(buf, buflen, format, va2);
+       va_end(va2);
 
        if (n >= buflen)
                goto realloc;
@@ -404,4 +407,4 @@ winnt_fsctl(HANDLE h, u32 code, const void *in, u32 in_size,
        return status;
 }
 
-#endif /* __WIN32__ */
+#endif /* _WIN32 */