summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorUri Lublin <uril@redhat.com>2014-11-05 10:20:30 -0500
committerUri Lublin <uril@redhat.com>2014-12-30 17:17:24 +0200
commita6383f29dc0788a401b64ca2f3aca07190d49e2b (patch)
treedf6a2bd281a54176bf8393f8c177681addeebd0a /common
parentdd53b1766e80aaa6fcdf593e1e2f6f005704efbd (diff)
vdcommon.h: add comment about OLDMSVCRT
Diffstat (limited to 'common')
-rw-r--r--common/vdcommon.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/common/vdcommon.h b/common/vdcommon.h
index 177721c..3d0f794 100644
--- a/common/vdcommon.h
+++ b/common/vdcommon.h
@@ -43,6 +43,23 @@ typedef CRITICAL_SECTION mutex_t;
#define ALIGN_VC __declspec (align(1))
#endif
+/*
+ * Note: OLDMSVCRT, which is defined (in the Makefile) for mingw builds, and
+ * is not defined for Visual Studio builds.
+ *
+ * On Windows XP some those functions are missing from the msvcrt.dll
+ * When compiled with mingw, the program fails to run due to missing functions.
+ * One can link to a newer runtime dll, e.g. msvcr100.dll, but that would
+ * require installing that DLL on the guest. That can be done by downloading
+ * and installing Microsoft Visual C++ 2010 Redistributable Package.
+ * (same for 110.dll and 2012 Redistributable Package, etc).
+ *
+ * Since we do not want to add this dependency, we use functions that are
+ * available in msvcrt.dll (and use define in the code).
+ *
+ * Currently Visual Studio builds are built with /MT (static mode) such that
+ * those functions are not required to be in that dll on the guest.
+ */
#ifdef OLDMSVCRT
#define swprintf_s(buf, sz, format...) swprintf(buf, format)
#endif