globus_common 18.14
Loading...
Searching...
No Matches
globus_preload.h
1/*
2 * Copyright 1999-2014 University of Chicago
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef GLOBUS_PRELOAD_H
18#define GLOBUS_PRELOAD_H 1
19
20#include "ltdl.h"
21
22#ifndef lt_preloaded_symbols
23#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
24/* DATA imports from DLLs on WIN32 con't be const, because runtime
25 relocations are performed -- see ld's documentation on pseudo-relocs. */
26# define LT_DLSYM_CONST
27#elif defined(__osf__)
28 /* This system does not cope well with relocations in const data. */
29# define LT_DLSYM_CONST
30#else
31# define LT_DLSYM_CONST const
32#endif
33#define lt_preloaded_symbols lt__PROGRAM__LTX_preloaded_symbols
34/* Ensure C linkage. */
35extern LT_DLSYM_CONST lt_dlsymlist lt__PROGRAM__LTX_preloaded_symbols[];
36
37#ifdef LTDL_SET_PRELOADED_SYMBOLS
38#undef LTDL_SET_PRELOADED_SYMBOLS
39#endif
40
41#define LTDL_SET_PRELOADED_SYMBOLS() \
42 lt_dlpreload_default(lt_preloaded_symbols)
43#endif
44
45#endif /* GLOBUS_PRELOAD_H */