Commit | Line | Data |
---|---|---|
c29fbdf2 RB |
1 | /* ltdl.c -- system independent dlopen wrapper |
2 | Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc. | |
3 | Originally by Thomas Tanner <tanner@ffii.org> | |
4 | This file is part of GNU Libtool. | |
5 | ||
6 | This library is free software; you can redistribute it and/or | |
7 | modify it under the terms of the GNU Lesser General Public | |
8 | License as published by the Free Software Foundation; either | |
9 | version 2 of the License, or (at your option) any later version. | |
10 | ||
11 | As a special exception to the GNU Lesser General Public License, | |
12 | if you distribute this file as part of a program or library that | |
13 | is built using GNU libtool, you may include it under the same | |
14 | distribution terms that you use for the rest of that program. | |
15 | ||
16 | This library is distributed in the hope that it will be useful, | |
17 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
19 | Lesser General Public License for more details. | |
20 | ||
21 | You should have received a copy of the GNU Lesser General Public | |
22 | License along with this library; if not, write to the Free Software | |
23 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | |
24 | 02111-1307 USA | |
25 | ||
26 | */ | |
27 | ||
28 | #include "guile-ltdl.h" | |
29 | ||
30 | #define lt_dlhandle_struct scm_i_lt_dlhandle_struct | |
8b1da91c | 31 | #define SCM_INSERTED_DLSYMLIST_STRUCT_DECL scm_i_lt_dlsymlist_struct |
c29fbdf2 RB |
32 | |
33 | #define LT_SCOPE static | |
34 | #define SCMLTXT static | |
35 | #define SCMLTSTATIC static | |
36 | ||
37 | #ifdef __GNUC__ | |
38 | #define SCM_UNUSED __attribute__ ((unused)) | |
39 | #else | |
40 | #define SCM_UNUSED | |
41 | #endif | |
42 | ||
43 | #include "raw-ltdl.h" | |
44 | #include "raw-ltdl.c" | |
45 | ||
46 | void | |
8b1da91c | 47 | scm_lt_dlpreload_default (const scm_lt_dlsymlist *preloads) |
c29fbdf2 | 48 | { |
8b1da91c | 49 | lt_dlpreload_default(preloads); |
c29fbdf2 RB |
50 | } |
51 | ||
52 | int | |
53 | scm_lt_dlinit (void) | |
54 | { | |
55 | return lt_dlinit (); | |
56 | } | |
57 | ||
58 | scm_lt_dlhandle | |
59 | scm_lt_dlopenext (const char *filename) | |
60 | { | |
61 | return lt_dlopenext (filename); | |
62 | } | |
63 | ||
64 | scm_lt_ptr | |
65 | scm_lt_dlsym (scm_lt_dlhandle handle, const char *name) | |
66 | { | |
67 | return lt_dlsym (handle, name); | |
68 | } | |
69 | ||
70 | const char * | |
71 | scm_lt_dlerror (void) | |
72 | { | |
73 | return lt_dlerror (); | |
74 | } | |
75 | ||
76 | int | |
77 | scm_lt_dlclose (scm_lt_dlhandle handle) | |
78 | { | |
79 | return lt_dlclose (handle); | |
80 | } |