summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2016-01-28 09:56:02 -0500
committerKeith Bostic <keith@wiredtiger.com>2016-01-28 09:56:02 -0500
commit5e67035b24d85848a87f5f99ea73b1ce1fdf3ac5 (patch)
tree779bac8ce22daeff35e6ec046f4586f4237adcca
parent1a72dbfb0dc19b3b937097573fa8b1a5e04124ec (diff)
downloadmongo-5e67035b24d85848a87f5f99ea73b1ce1fdf3ac5.tar.gz
Set the Windows program name globally so all error messages make sense.
-rw-r--r--test/format/t.c4
-rw-r--r--test/format/wts.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/test/format/t.c b/test/format/t.c
index 37ba982c987..ccbc0442e4a 100644
--- a/test/format/t.c
+++ b/test/format/t.c
@@ -45,10 +45,14 @@ main(int argc, char *argv[])
config = NULL;
+#ifdef _WIN32
+ g.progname = "t_format.exe";
+#else
if ((g.progname = strrchr(argv[0], DIR_DELIM)) == NULL)
g.progname = argv[0];
else
++g.progname;
+#endif
#if 0
/* Configure the GNU malloc for debugging. */
diff --git a/test/format/wts.c b/test/format/wts.c
index e46f644401e..46b13f3461d 100644
--- a/test/format/wts.c
+++ b/test/format/wts.c
@@ -143,11 +143,7 @@ wts_open(const char *home, int set_api, WT_CONNECTION **connp)
"create,checkpoint_sync=false,cache_size=%" PRIu32 "MB",
g.c_cache);
-#ifdef _WIN32
- p += snprintf(p, REMAIN(p, end), ",error_prefix=\"t_format.exe\"");
-#else
p += snprintf(p, REMAIN(p, end), ",error_prefix=\"%s\"", g.progname);
-#endif
/* In-memory configuration. */
if (g.c_in_memory != 0)