Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
2 * Portions Copyright (c) 2006 Nokia Corporation
6 * The Regents of the University of California. All rights reserved.
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 * 4. Neither the name of the University nor the names of its contributors
17 * may be used to endorse or promote products derived from this software
18 * without specific prior written permission.
20 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * $FreeBSD: src/include/dlfcn.h,v 1.19 2003/02/13 17:47:43 kan Exp $
38 #include <sys/_types.h>
41 * Modes and flags for dlopen().
43 #define RTLD_LAZY 1 /* Bind function calls lazily. */
44 #define RTLD_NOW 2 /* Bind function calls immediately. */
45 #define RTLD_MODEMASK 0x3
46 #define RTLD_GLOBAL 0x100 /* Make symbols globally available. */
47 #define RTLD_LOCAL 0 /* Opposite of RTLD_GLOBAL, and the default. */
48 #define RTLD_TRACE 0x200 /* Trace loaded objects and exit. */
51 * Request arguments for dlinfo().
53 #define RTLD_DI_LINKMAP 2 /* Obtain link map. */
54 #define RTLD_DI_SERINFO 4 /* Obtain search path info. */
55 #define RTLD_DI_SERINFOSIZE 5 /* ... query for required space. */
56 #define RTLD_DI_ORIGIN 6 /* Obtain object origin */
57 #define RTLD_DI_MAX RTLD_DI_ORIGIN
60 * Special handle arguments for dlsym()/dlinfo().
62 #define RTLD_NEXT ((void *) -1) /* Search subsequent objects. */
63 #define RTLD_DEFAULT ((void *) -2) /* Use default search algorithm. */
64 #define RTLD_SELF ((void *) -3) /* Search the caller itself. */
68 #ifndef _SIZE_T_DECLARED
69 typedef __size_t size_t;
70 #define _SIZE_T_DECLARED
74 * Structure filled in by dladdr().
76 typedef struct dl_info {
77 const char *dli_fname; /* Pathname of shared object. */
78 void *dli_fbase; /* Base address of shared object. */
79 const char *dli_sname; /* Name of nearest symbol. */
80 void *dli_saddr; /* Address of nearest symbol. */
84 * The actual type declared by this typedef is immaterial, provided that
85 * it is a function pointer. Its purpose is to provide a return type for
86 * dlfunc() which can be cast to a function pointer type without depending
87 * on behavior undefined by the C standard, which might trigger a compiler
88 * diagnostic. We intentionally declare a unique type signature to force
89 * a diagnostic should the application not cast the return value of dlfunc()
96 typedef void (*dlfunc_t)(struct __dlfunc_arg);
99 * Structures, returned by the RTLD_DI_SERINFO dlinfo() request.
101 typedef struct dl_serpath {
102 char * dls_name; /* single search path entry */
103 unsigned int dls_flags; /* path information */
106 typedef struct dl_serinfo {
107 size_t dls_size; /* total buffer size */
108 unsigned int dls_cnt; /* number of path entries */
109 Dl_serpath dls_serpath[1]; /* there may be more than one */
112 #endif /* __BSD_VISIBLE */
115 /* XSI functions first. */
117 IMPORT_C void *dlopen(const char *filename, int flag);
119 IMPORT_C void *dlsym(void *handle, const char *symbol);
121 IMPORT_C char *dlerror(void);
123 IMPORT_C int dlclose(void *handle);
127 #endif /* !_DLFCN_H_ */