* guile-ltdl.h: main header file for guile's internal
authorRob Browning <rlb@defaultvalue.org>
Sat, 5 Oct 2002 04:51:36 +0000 (04:51 +0000)
committerRob Browning <rlb@defaultvalue.org>
Sat, 5 Oct 2002 04:51:36 +0000 (04:51 +0000)
libguile-ltdl.

* raw-ltdl.c: Remove custom realloc. (#define rpl_realloc
realloc).  You can't define realloc like this unless you also
define malloc.  This is a quick hack for now; we may want
something cleaner later.
(memcpy): coerce ptrs to (char *) before copying characters
through them -- I can't recall for sure, but I believe this was
causing an overrun error at times.
(realloc): commented out -- as mentioned above, you can't define
your own malloc unless you know enough about the malloc in use to
be able to tell how big the src ptr is.  The disabled code
incorrectly used the *destination* ptr to decide how much to copy.
This sometimes results in out-of-bound accesses which cause
segfaults.
(tryall_dlopen_module): check to be sure (dirname_len > 0) before
testing first character against '/'.
(try_dlopen): check for feof(file) in read loop -- otherwise
infloop?
(scm_lt_dlopenext): remove unused variable file_found.
(LT_EOS_CHAR): moved here from guile-ltdl.h.

libguile-ltdl/guile-ltdl.h [new file with mode: 0644]

diff --git a/libguile-ltdl/guile-ltdl.h b/libguile-ltdl/guile-ltdl.h
new file mode 100644 (file)
index 0000000..65b820f
--- /dev/null
@@ -0,0 +1,39 @@
+/* guile-ltdl.h -- dlopen function actually used by guile
+   Copyright (C) 1998-2000, 2002 Free Software Foundation, Inc.
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2 of the License, or (at your option) any later version.
+
+As a special exception to the GNU Lesser General Public License,
+if you distribute this file as part of a program or library that
+is built using GNU libtool, you may include it under the same
+distribution terms that you use for the rest of that program.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free
+Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307  USA
+*/
+
+/* Only include this header file once. */
+#ifndef SCM_LTDL_H
+#define SCM_LTDL_H 1
+
+typedef struct scm_i_lt_dlhandle_struct *scm_lt_dlhandle;
+typedef void * scm_lt_ptr;
+
+void            scm_lt_dlset_preloaded_symbols (void);
+int             scm_lt_dlinit (void);
+scm_lt_dlhandle scm_lt_dlopenext (const char *filename);
+scm_lt_ptr      scm_lt_dlsym (scm_lt_dlhandle handle, const char *name);
+const char     *scm_lt_dlerror (void);
+int             scm_lt_dlclose (scm_lt_dlhandle handle);
+
+#endif /* !SCM_LTDL_H */