prlink.c (palemoon-29.4.1-source.tar.xz) | : | prlink.c (palemoon-29.4.2-source.tar.xz) | ||
---|---|---|---|---|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ | |||
/* This Source Code Form is subject to the terms of the Mozilla Public | /* This Source Code Form is subject to the terms of the Mozilla Public | |||
* License, v. 2.0. If a copy of the MPL was not distributed with this | * License, v. 2.0. If a copy of the MPL was not distributed with this | |||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | |||
#include "primpl.h" | #include "primpl.h" | |||
#include <string.h> | #include <string.h> | |||
#if defined(XP_MACOSX) && defined(USE_MACH_DYLD) | ||||
#include <Carbon/Carbon.h> | ||||
#include <CoreFoundation/CoreFoundation.h> | ||||
#endif | ||||
#ifdef XP_UNIX | #ifdef XP_UNIX | |||
#ifdef USE_DLFCN | #ifdef USE_DLFCN | |||
#include <dlfcn.h> | #include <dlfcn.h> | |||
/* Define these on systems that don't have them. */ | /* Define these on systems that don't have them. */ | |||
#ifndef RTLD_NOW | #ifndef RTLD_NOW | |||
#define RTLD_NOW 0 | #define RTLD_NOW 0 | |||
#endif | #endif | |||
#ifndef RTLD_LAZY | #ifndef RTLD_LAZY | |||
#define RTLD_LAZY RTLD_NOW | #define RTLD_LAZY RTLD_NOW | |||
#endif | #endif | |||
skipping to change at line 792 | skipping to change at line 787 | |||
} | } | |||
if (flags & PR_LD_NOW) { | if (flags & PR_LD_NOW) { | |||
dl_flags |= RTLD_NOW; | dl_flags |= RTLD_NOW; | |||
} | } | |||
if (flags & PR_LD_GLOBAL) { | if (flags & PR_LD_GLOBAL) { | |||
dl_flags |= RTLD_GLOBAL; | dl_flags |= RTLD_GLOBAL; | |||
} | } | |||
if (flags & PR_LD_LOCAL) { | if (flags & PR_LD_LOCAL) { | |||
dl_flags |= RTLD_LOCAL; | dl_flags |= RTLD_LOCAL; | |||
} | } | |||
#if defined(DARWIN) | ||||
/* ensure the file exists if it contains a slash character i.e. path */ | ||||
/* DARWIN's dlopen ignores the provided path and checks for the */ | ||||
/* plain filename in DYLD_LIBRARY_PATH */ | ||||
if (strchr(name, PR_DIRECTORY_SEPARATOR) == NULL || | ||||
PR_Access(name, PR_ACCESS_EXISTS) == PR_SUCCESS) { | ||||
h = dlopen(name, dl_flags); | ||||
} | ||||
#else | ||||
h = dlopen(name, dl_flags); | h = dlopen(name, dl_flags); | |||
#endif | ||||
#elif defined(USE_HPSHL) | #elif defined(USE_HPSHL) | |||
int shl_flags = 0; | int shl_flags = 0; | |||
shl_t h; | shl_t h; | |||
/* | /* | |||
* Use the DYNAMIC_PATH flag only if 'name' is a plain file | * Use the DYNAMIC_PATH flag only if 'name' is a plain file | |||
* name (containing no directory) to match the behavior of | * name (containing no directory) to match the behavior of | |||
* dlopen(). | * dlopen(). | |||
*/ | */ | |||
if (strchr(name, PR_DIRECTORY_SEPARATOR) == NULL) { | if (strchr(name, PR_DIRECTORY_SEPARATOR) == NULL) { | |||
End of changes. 3 change blocks. | ||||
15 lines changed or deleted | 0 lines changed or added |