#ifdef _WIN32 switch for get_token_filename() and daemonize()

ENGINE-187
Roker 6 years ago
parent 4f3d91a629
commit 00c1d1856a

@ -1,5 +1,14 @@
#include "daemonize.hh"
#ifdef _WIN32
void daemonize()
{
// do nothing
}
#else
// Unix/Linux implementation
#include <cstdlib>
#include <unistd.h>
@ -49,3 +58,5 @@ void daemonize()
}
}
}
#endif // ! _WIN32

@ -38,6 +38,12 @@ namespace
namespace js = json_spirit;
// platform dependent:
#ifdef _WIN32
#error "Please implement get_token_filename() for Win32"
#else
// version for POSIX-compliant systems:
std::string get_token_filename()
{
const char* const temp_dir = getenv("TEMP");
@ -47,6 +53,8 @@ std::string get_token_filename()
return ret;
}
#endif // ! _WIN32
// creates a file with restrictive access rights that contains a security token.
std::string create_security_token(const std::string& server_address, unsigned port_nr, const std::string& path)
{

Loading…
Cancel
Save