mirror of
https://github.com/boostorg/serialization.git
synced 2026-01-26 19:12:08 +00:00
assert on failure
[SVN r23851]
This commit is contained in:
@@ -17,6 +17,8 @@
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
|
||||
#include <cstdlib> // getenv
|
||||
#include <cassert>
|
||||
|
||||
#ifdef BOOST_NO_STDC_NAMESPACE
|
||||
namespace std {
|
||||
using ::getenv;
|
||||
@@ -33,8 +35,10 @@ char * tmpdir(){
|
||||
dirname = std::getenv("TMPDIR");
|
||||
if(NULL == dirname)
|
||||
dirname = std::getenv("TEMP");
|
||||
if(NULL == dirname)
|
||||
dirname = "/tmp";
|
||||
if(NULL == dirname){
|
||||
assert(false); // no temp directory found
|
||||
dirname = ".";
|
||||
}
|
||||
return dirname;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user