зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1385115 - Unbreak build on Tier3 after bug 1382883. r=cpearce
MozReview-Commit-ID: ISTOw1qfxiy --HG-- extra : rebase_source : 4444849c190f7128d67c53483866ac59c73b2eb9
This commit is contained in:
Родитель
8f7083a841
Коммит
5c4a94b509
|
@ -15,7 +15,7 @@
|
|||
#include "GMPLog.h"
|
||||
#include "mozilla/Move.h"
|
||||
|
||||
#if defined(XP_MACOSX) || defined(XP_LINUX)
|
||||
#ifndef XP_WIN
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
@ -198,7 +198,7 @@ HostFile::HostFile(const nsCString& aPath)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(XP_MACOSX) || defined(XP_LINUX)
|
||||
#ifndef XP_WIN
|
||||
HostFile::HostFile(const nsCString& aPath)
|
||||
: mPath(aPath)
|
||||
{
|
||||
|
|
|
@ -17,7 +17,7 @@ struct GMPPlatformAPI;
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
#if defined(OS_WIN)
|
||||
#if defined(XP_WIN)
|
||||
typedef nsString HostFileString;
|
||||
#else
|
||||
typedef nsCString HostFileString;
|
||||
|
|
|
@ -345,15 +345,15 @@ GMPChild::GetUTF8LibPath(nsACString& aOutLibPath)
|
|||
#endif
|
||||
}
|
||||
|
||||
#if defined(XP_MACOSX)
|
||||
#define FIREFOX_FILE NS_LITERAL_STRING("firefox")
|
||||
#define XUL_LIB_FILE NS_LITERAL_STRING("XUL")
|
||||
#elif defined(XP_LINUX)
|
||||
#define FIREFOX_FILE NS_LITERAL_STRING("firefox")
|
||||
#define XUL_LIB_FILE NS_LITERAL_STRING("libxul.so")
|
||||
#elif defined(OS_WIN)
|
||||
#if defined(XP_WIN)
|
||||
#define FIREFOX_FILE NS_LITERAL_STRING("firefox.exe")
|
||||
#define XUL_LIB_FILE NS_LITERAL_STRING("xul.dll")
|
||||
#elif defined(XP_MACOSX)
|
||||
#define FIREFOX_FILE NS_LITERAL_STRING("firefox")
|
||||
#define XUL_LIB_FILE NS_LITERAL_STRING("XUL")
|
||||
#else
|
||||
#define FIREFOX_FILE NS_LITERAL_STRING("firefox")
|
||||
#define XUL_LIB_FILE NS_LITERAL_STRING("libxul.so")
|
||||
#endif
|
||||
|
||||
#if defined(XP_MACOSX)
|
||||
|
@ -412,19 +412,19 @@ GMPChild::MakeCDMHostVerificationPaths()
|
|||
|
||||
// Firefox application binary path.
|
||||
nsCOMPtr<nsIFile> appDir;
|
||||
#if defined(XP_WIN) || defined(XP_LINUX)
|
||||
// Note: re-using 'path' var here, as on Windows/Linux we assume Firefox
|
||||
// executable is in the same directory as plugin-container.
|
||||
if (NS_SUCCEEDED(path->GetParent(getter_AddRefs(appDir))) &&
|
||||
#if defined(XP_MACOSX)
|
||||
// On MacOS the firefox binary is a few parent directories up from
|
||||
// plugin-container.
|
||||
if (GetFirefoxAppPath(path, appDir) &&
|
||||
NS_SUCCEEDED(appDir->Clone(getter_AddRefs(path))) &&
|
||||
NS_SUCCEEDED(path->Append(FIREFOX_FILE)) && FileExists(path) &&
|
||||
ResolveLinks(path) && NS_SUCCEEDED(path->GetPath(str))) {
|
||||
paths.AppendElement(NS_ConvertUTF16toUTF8(str));
|
||||
}
|
||||
#elif defined(XP_MACOSX)
|
||||
// On MacOS the firefox binary is a few parent directories up from
|
||||
// plugin-container.
|
||||
if (GetFirefoxAppPath(path, appDir) &&
|
||||
#else
|
||||
// Note: re-using 'path' var here, as on Windows/Linux we assume Firefox
|
||||
// executable is in the same directory as plugin-container.
|
||||
if (NS_SUCCEEDED(path->GetParent(getter_AddRefs(appDir))) &&
|
||||
NS_SUCCEEDED(appDir->Clone(getter_AddRefs(path))) &&
|
||||
NS_SUCCEEDED(path->Append(FIREFOX_FILE)) && FileExists(path) &&
|
||||
ResolveLinks(path) && NS_SUCCEEDED(path->GetPath(str))) {
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "content_decryption_module.h"
|
||||
#include "content_decryption_module_ext.h"
|
||||
|
||||
#if defined(XP_MACOSX) || defined(XP_LINUX)
|
||||
#ifndef XP_WIN
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
@ -88,10 +88,8 @@ CanReadSome(cdm::PlatformFile aFile)
|
|||
DWORD bytesRead = 0;
|
||||
return ReadFile(aFile, &data.front(), TEST_READ_SIZE, &bytesRead, nullptr) &&
|
||||
bytesRead > 0;
|
||||
#elif defined(XP_MACOSX) || defined(XP_LINUX)
|
||||
return read(aFile, &data.front(), TEST_READ_SIZE) > 0;
|
||||
#else
|
||||
return false;
|
||||
return read(aFile, &data.front(), TEST_READ_SIZE) > 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -100,7 +98,7 @@ ClosePlatformFile(cdm::PlatformFile aFile)
|
|||
{
|
||||
#ifdef XP_WIN
|
||||
CloseHandle(aFile);
|
||||
#elif defined(XP_MACOSX) || defined(XP_LINUX)
|
||||
#else
|
||||
close(aFile);
|
||||
#endif
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче