~ubuntu-branches/ubuntu/karmic/gnustep-base/karmic

« back to all changes in this revision

Viewing changes to Source/simple-load.h

  • Committer: Bazaar Package Importer
  • Author(s): Eric Heintzmann
  • Date: 2005-04-17 00:14:38 UTC
  • mfrom: (1.2.1 upstream) (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050417001438-enf0y07c9tku85z1
Tags: 1.10.3-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
 
13
13
*/
14
14
 
15
 
#ifndef __sunos_load_h_INCLUDE
16
 
#define __sunos_load_h_INCLUDE
 
15
#ifndef __simple_load_h_INCLUDE
 
16
#define __simple_load_h_INCLUDE
17
17
 
 
18
#ifndef __USE_GNU
 
19
#define __USE_GNU
 
20
#endif
18
21
#include <dlfcn.h>
19
22
 
20
23
/* This is the GNU name for the CTOR list */
23
26
#ifndef RTLD_GLOBAL
24
27
#define RTLD_GLOBAL 0
25
28
#endif
 
29
#ifndef RTLD_DEFAULT
 
30
#define RTLD_DEFAULT 0
 
31
#endif
26
32
 
27
33
/* Types defined appropriately for the dynamic linker */
28
34
typedef void* dl_handle_t;
47
53
}
48
54
 
49
55
/* Return the address of a symbol given by the name 'symbol' from the module
50
 
   associated with 'handle'
51
 
*/
 
56
 * associated with 'handle'
 
57
 * This function is not always used, so we mark it as unused to avoid warnings.
 
58
 */ 
 
59
static dl_symbol_t 
 
60
__objc_dynamic_find_symbol(dl_handle_t handle, const char* symbol)
 
61
    __attribute__((unused));
52
62
static dl_symbol_t 
53
63
__objc_dynamic_find_symbol(dl_handle_t handle, const char* symbol)
54
64
{
84
94
    return NULL;
85
95
}
86
96
 
87
 
static char *
 
97
static const char *
88
98
__objc_dynamic_get_symbol_path(dl_handle_t handle, dl_symbol_t symbol)
89
99
{
90
100
#ifdef HAVE_DLADDR
91
101
  dl_symbol_t sym;
92
102
  Dl_info     info;
93
103
 
 
104
  if (handle == 0)
 
105
    handle = RTLD_DEFAULT;
 
106
 
94
107
  sym = dlsym(handle, symbol);
95
108
 
96
109
  if (!sym)
105
118
#endif
106
119
}
107
120
 
108
 
#endif /* __sunos_load_h_INCLUDE */
 
121
#endif /* __simple_load_h_INCLUDE */