diff options
author | Jay Berkenbilt <ejb@ql.org> | 2013-02-28 21:49:08 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2013-03-05 19:35:46 +0100 |
commit | 66c3c8fdf7c60b34039bc9f70cd9bb00e0c0235d (patch) | |
tree | 503703336ef242487024d13c257e25d4fff3ae59 /examples/pdf-mod-info.cc | |
parent | 6b9297882e0106b5c0af53320673d6341b9bea91 (diff) | |
download | qpdf-66c3c8fdf7c60b34039bc9f70cd9bb00e0c0235d.tar.zst |
Use portable versions of some UNIX-specific calls
Remove needless calls to open, close, and fileno; call remove instead
of unlink.
Diffstat (limited to 'examples/pdf-mod-info.cc')
-rw-r--r-- | examples/pdf-mod-info.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/pdf-mod-info.cc b/examples/pdf-mod-info.cc index e8defa32..8bd9f5d6 100644 --- a/examples/pdf-mod-info.cc +++ b/examples/pdf-mod-info.cc @@ -8,6 +8,7 @@ #include <iostream> #include <string.h> #include <stdlib.h> +#include <stdio.h> #ifdef _WIN32 #include <Windows.h> #include <direct.h> @@ -219,7 +220,7 @@ int main(int argc, char* argv[]) try { - (void) unlink(fl_out); + (void) remove(fl_out); QUtil::os_wrapper("rename " + fl_tmp + " " + std::string(fl_out), rename(fl_tmp.c_str(), fl_out)); } |