| 1 | /* dlfcn.h,v 1.1 2003/05/26 09:28:55 bird Exp */
|
|---|
| 2 | /** @file
|
|---|
| 3 | * Dynamic Library Loading.
|
|---|
| 4 | *
|
|---|
| 5 | * Copyright (c) 2001-2003 knut st. osmundsen <bird@anduin.net>
|
|---|
| 6 | *
|
|---|
| 7 | * This program is free software; you can redistribute it and/or modify
|
|---|
| 8 | * it under the terms of the GNU Lesser General Public License as published
|
|---|
| 9 | * by the Free Software Foundation; either version 2 of the License, or
|
|---|
| 10 | * (at your option) any later version.
|
|---|
| 11 | *
|
|---|
| 12 | * This program is distributed in the hope that it will be useful,
|
|---|
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 15 | * GNU Lesser General Public License for more details.
|
|---|
| 16 | *
|
|---|
| 17 | * You should have received a copy of the GNU Lesser General Public License
|
|---|
| 18 | * along with This program; if not, write to the Free Software
|
|---|
| 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|---|
| 20 | *
|
|---|
| 21 | */
|
|---|
| 22 |
|
|---|
| 23 | #ifndef _DLFCN_H_
|
|---|
| 24 | #define _DLFCN_H_
|
|---|
| 25 |
|
|---|
| 26 | #include <sys/cdefs.h>
|
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 | /** @name dlopen flags
|
|---|
| 30 | * @{ */
|
|---|
| 31 | /** Relocations are performed at an implementation-defined time.
|
|---|
| 32 | * OS2: Happens when the pages are touched. Option is ignored. */
|
|---|
| 33 | #define RTLD_LAZY 1
|
|---|
| 34 | /** Relocations are performed when the object is loaded.
|
|---|
| 35 | * OS2: Happens when the pages are touched. Option is ignored. */
|
|---|
| 36 | #define RTLD_NOW 2
|
|---|
| 37 | /** All symbols are available for relocation processing of other modules.
|
|---|
| 38 | * OS2: Ignored as symbols are resolved using explicit link time reference. */
|
|---|
| 39 | #define RTLD_GLOBAL 0x100
|
|---|
| 40 | /** All symbols are not made available for relocation processing by other modules.
|
|---|
| 41 | * OS2: Ignored as symbols are resolved using explicit link time reference. */
|
|---|
| 42 | #define RTLD_LOCAL 0
|
|---|
| 43 | /** @} */
|
|---|
| 44 |
|
|---|
| 45 | __BEGIN_DECLS
|
|---|
| 46 |
|
|---|
| 47 | void * dlopen(const char * pszLibrary, int flFlags);
|
|---|
| 48 | const char * dlerror(void);
|
|---|
| 49 | void * dlsym(void *pvHandle, const char * pszSymbol);
|
|---|
| 50 | int dlclose(void *pvHandle);
|
|---|
| 51 |
|
|---|
| 52 | #if __BSD_VISIBLE
|
|---|
| 53 | struct __dlfunc_arg
|
|---|
| 54 | {
|
|---|
| 55 | int __dlfunc_dummy;
|
|---|
| 56 | };
|
|---|
| 57 | typedef void (*dlfunc_t)(struct __dlfunc_arg);
|
|---|
| 58 | dlfunc_t dlfunc(void * __restrict, const char * __restrict);
|
|---|
| 59 | #endif
|
|---|
| 60 |
|
|---|
| 61 | __END_DECLS
|
|---|
| 62 |
|
|---|
| 63 | #endif
|
|---|
| 64 |
|
|---|