Commit c8740c4b authored by atraczyk's avatar atraczyk Committed by gerrit2

fix: replace WIN32_NATIVE flags with RING_UWP

- replaces the WIN32_NATIVE flags from older patches with RING_UWP

Change-Id: I7e49006189111c7d05f547dc783d34703ae80f40
Tuleap: #790
parent f211d38d
......@@ -42,7 +42,7 @@
#include "client/ring_signal.h"
#include "upnp/upnp_context.h"
#ifdef WIN32_NATIVE
#ifdef RING_UWP
#include "windirent.h"
#else
#include <dirent.h>
......
......@@ -42,11 +42,11 @@
#include <sys/types.h>
#include <sys/stat.h>
#ifndef WIN32_NATIVE
#ifndef RING_UWP
#include <libgen.h>
#endif
#ifdef WIN32_NATIVE
#ifdef RING_UWP
#include "windirent.h"
#else
#include <dirent.h>
......@@ -381,7 +381,7 @@ static std::string cache_path;
static std::string config_path;
#else
static char *program_dir = NULL;
#ifndef WIN32_NATIVE
#ifndef RING_UWP
void set_program_dir(char *program_path)
{
program_dir = dirname(program_path);
......
......@@ -45,7 +45,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#ifndef WIN32_NATIVE
#ifndef RING_UWP
#include <libgen.h>
#endif
......@@ -846,7 +846,7 @@ TlsValidator::CheckResult TlsValidator::privateKeyDirectoryPermissions()
if (privateKeyPath_.empty())
return TlsValidator::CheckResult(CheckValues::UNSUPPORTED, "");
#ifndef WIN32_NATIVE
#ifndef RING_UWP
auto path = std::unique_ptr<char, decltype(free)&> (strdup(privateKeyPath_.c_str()), free);
const char* dir = dirname(path.get());
#else
......@@ -869,7 +869,7 @@ TlsValidator::CheckResult TlsValidator::privateKeyDirectoryPermissions()
TlsValidator::CheckResult TlsValidator::publicKeyDirectoryPermissions()
{
#ifndef WIN32_NATIVE
#ifndef RING_UWP
auto path = std::unique_ptr<char, decltype(free)&>(strdup(certificatePath_.c_str()), free);
const char* dir = dirname(path.get());
#else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment