summaryrefslogtreecommitdiff
path: root/src/io/lock.cpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-04-14 11:02:47 -0700
committerBen Longbons <b.r.longbons@gmail.com>2014-04-14 11:32:36 -0700
commit56e149a51562b9d2620bc9037a81735c29ea95af (patch)
tree3a4bd218f69c5cbfec0dd8dcada34413c0ddc715 /src/io/lock.cpp
parent1a1bfc8fd8a3613bf7d3c320dcaff29a9402f50c (diff)
downloadtmwa-56e149a51562b9d2620bc9037a81735c29ea95af.tar.gz
tmwa-56e149a51562b9d2620bc9037a81735c29ea95af.tar.bz2
tmwa-56e149a51562b9d2620bc9037a81735c29ea95af.tar.xz
tmwa-56e149a51562b9d2620bc9037a81735c29ea95af.zip
Ditch gcc 4.6 support
Diffstat (limited to 'src/io/lock.cpp')
-rw-r--r--src/io/lock.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/io/lock.cpp b/src/io/lock.cpp
index 96c3649..1342915 100644
--- a/src/io/lock.cpp
+++ b/src/io/lock.cpp
@@ -49,7 +49,7 @@ namespace io
AString newfile;
do
{
- newfile = STRPRINTF("%s_%d.tmp", filename, no++);
+ newfile = STRPRINTF("%s_%d.tmp"_fmt, filename, no++);
fd = FD::open(newfile, O_WRONLY | O_CREAT | O_EXCL, 0666);
}
while (fd == FD() && errno == EEXIST);
@@ -67,21 +67,21 @@ namespace io
if (!WriteFile::close())
{
// leave partial file
- FPRINTF(stderr, "Warning: failed to write replacement for %s\n", filename);
+ FPRINTF(stderr, "Warning: failed to write replacement for %s\n"_fmt, filename);
abort();
}
int n = backup_count;
- AString old_filename = STRPRINTF("%s.%d", filename, n);
+ AString old_filename = STRPRINTF("%s.%d"_fmt, filename, n);
while (--n)
{
- AString newer_filename = STRPRINTF("%s.%d", filename, n);
+ AString newer_filename = STRPRINTF("%s.%d"_fmt, filename, n);
rename(newer_filename.c_str(), old_filename.c_str());
old_filename = std::move(newer_filename);
}
rename(filename.c_str(), old_filename.c_str());
- AString tmpfile = STRPRINTF("%s_%d.tmp", filename, tmp_suffix);
+ AString tmpfile = STRPRINTF("%s_%d.tmp"_fmt, filename, tmp_suffix);
rename(tmpfile.c_str(), filename.c_str());
}
} // namespace io