| OLD | NEW |
| 1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ | 1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
| 2 /* ***** BEGIN LICENSE BLOCK ***** | 2 /* ***** BEGIN LICENSE BLOCK ***** |
| 3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | 3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
| 4 * | 4 * |
| 5 * The contents of this file are subject to the Mozilla Public License Version | 5 * The contents of this file are subject to the Mozilla Public License Version |
| 6 * 1.1 (the "License"); you may not use this file except in compliance with | 6 * 1.1 (the "License"); you may not use this file except in compliance with |
| 7 * the License. You may obtain a copy of the License at | 7 * the License. You may obtain a copy of the License at |
| 8 * http://www.mozilla.org/MPL/ | 8 * http://www.mozilla.org/MPL/ |
| 9 * | 9 * |
| 10 * Software distributed under the License is distributed on an "AS IS" basis, | 10 * Software distributed under the License is distributed on an "AS IS" basis, |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 | 110 |
| 111 /* | 111 /* |
| 112 ** pr_FindSymbolInProg | 112 ** pr_FindSymbolInProg |
| 113 ** | 113 ** |
| 114 ** Find the specified data symbol in the program and return | 114 ** Find the specified data symbol in the program and return |
| 115 ** its address. | 115 ** its address. |
| 116 */ | 116 */ |
| 117 | 117 |
| 118 #ifdef HAVE_DLL | 118 #ifdef HAVE_DLL |
| 119 | 119 |
| 120 #ifdef USE_DLFCN | 120 #if defined(USE_DLFCN) && !defined(NO_DLOPEN_NULL) |
| 121 | 121 |
| 122 #include <dlfcn.h> | 122 #include <dlfcn.h> |
| 123 | 123 |
| 124 static void * | 124 static void * |
| 125 pr_FindSymbolInProg(const char *name) | 125 pr_FindSymbolInProg(const char *name) |
| 126 { | 126 { |
| 127 void *h; | 127 void *h; |
| 128 void *sym; | 128 void *sym; |
| 129 | 129 |
| 130 h = dlopen(0, RTLD_LAZY); | 130 h = dlopen(0, RTLD_LAZY); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 143 pr_FindSymbolInProg(const char *name) | 143 pr_FindSymbolInProg(const char *name) |
| 144 { | 144 { |
| 145 shl_t h = NULL; | 145 shl_t h = NULL; |
| 146 void *sym; | 146 void *sym; |
| 147 | 147 |
| 148 if (shl_findsym(&h, name, TYPE_DATA, &sym) == -1) | 148 if (shl_findsym(&h, name, TYPE_DATA, &sym) == -1) |
| 149 return NULL; | 149 return NULL; |
| 150 return sym; | 150 return sym; |
| 151 } | 151 } |
| 152 | 152 |
| 153 #elif defined(USE_MACH_DYLD) | 153 #elif defined(USE_MACH_DYLD) || defined(NO_DLOPEN_NULL) |
| 154 | 154 |
| 155 static void * | 155 static void * |
| 156 pr_FindSymbolInProg(const char *name) | 156 pr_FindSymbolInProg(const char *name) |
| 157 { | 157 { |
| 158 /* FIXME: not implemented */ | 158 /* FIXME: not implemented */ |
| 159 return NULL; | 159 return NULL; |
| 160 } | 160 } |
| 161 | 161 |
| 162 #else | 162 #else |
| 163 | 163 |
| (...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 717 } | 717 } |
| 718 | 718 |
| 719 void _PR_InitMem(void) | 719 void _PR_InitMem(void) |
| 720 { | 720 { |
| 721 PRStatus rv; | 721 PRStatus rv; |
| 722 rv = _PR_MallocInit(); | 722 rv = _PR_MallocInit(); |
| 723 PR_ASSERT(PR_SUCCESS == rv); | 723 PR_ASSERT(PR_SUCCESS == rv); |
| 724 } | 724 } |
| 725 | 725 |
| 726 #endif /* _PR_OVERRIDE_MALLOC */ | 726 #endif /* _PR_OVERRIDE_MALLOC */ |
| OLD | NEW |