Skip to content

Commit

Permalink
Use C++ standard library function instead of POSIX function
Browse files Browse the repository at this point in the history
  • Loading branch information
tautschnig committed Jun 20, 2018
1 parent 972c08d commit 2cadc86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/util/tempfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Author: Daniel Kroening
#include <fcntl.h>

#include <cstdlib>
#include <cstdio>
#include <cstring>

#if defined(__linux__) || \
Expand All @@ -31,7 +32,6 @@ Author: Daniel Kroening
defined(__CYGWIN__) || \
defined(__MACH__)
#include <unistd.h>
#include <sys/time.h>
#endif

/// Substitute for mkstemps (OpenBSD standard) for Windows, where it is
Expand Down Expand Up @@ -136,5 +136,5 @@ std::string get_temporary_file(
temporary_filet::~temporary_filet()
{
if(!name.empty())
unlink(name.c_str());
std::remove(name.c_str());
}

0 comments on commit 2cadc86

Please sign in to comment.