diff options
Diffstat (limited to 'lib/Utils/xfuncs.cpp')
-rw-r--r-- | lib/Utils/xfuncs.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Utils/xfuncs.cpp b/lib/Utils/xfuncs.cpp index 0119606..f447b8f 100644 --- a/lib/Utils/xfuncs.cpp +++ b/lib/Utils/xfuncs.cpp @@ -280,3 +280,9 @@ int open_or_warn(const char *pathname, int flags) return open3_or_warn(pathname, flags, 0666); } #endif + +void xunlink(const char *pathname) +{ + if (unlink(pathname)) + perror_msg_and_die("can't remove file '%s'", pathname); +} |