libtool/libltdl/ltdl.h

301 lines
9.4 KiB
C
Raw Normal View History

1998-11-04 Alexandre Oliva <oliva@dcc.unicamp.br> * ltconfig.in, ltmain.in: updated and fixed the patches below 1998-11-04 Thomas Tanner <tanner@gmx.de> * mdemo/*: added new demo to demonstrate building of dlopenend modules * tests/Makefile.am, tests/mdemo*: added some tests for mdemo 1998-11-04 Gary V. Vaughan <gvaughan@oranda.demon.co.uk> * demo/configure.in: added AC_EXEEXT macro so that the tests can work on cywin32/mingw32 hosts. This requires the current CVS autoconf 1998-11-04 Thomas Tanner <tanner@gmx.de> * ltmain.in: New flag -export-symbols; new dlpreopen system * demo/dlmain.c: removed dld_preloaded_symbol_count 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltmain.in: On installation, don't get confused if the same name appears more than once in the list of library names. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add objext and libext variables. Check for object suffix. Check for mingw32* as well as cygwin32*. Use objext when testing compiler. Add support for Visual C++ on cygwin32 when not using gcc. Add objext, libext, and fix_srcfile_path to generated libtool script. * ltmain.in: Use .${objext} rather than .o. Use fix_srcfile_path if it is set. Check for .obj as well as for .o, and for .lib as well as for .a. Use .${libext} rather than .a when creating old libraries. * libtoolize.in: Change initial /bin/sh to @SHELL@. * libtool.m4 (AM_PROG_LIBTOOL): Add AC_REQUIRE for AC_CANONICAL_BUILD, so that autoconf doesn't get mixed up by the AC_REQUIRE in AC_CHECK_TOOL. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Look in the right directory for libtool.c in archive_cmds for cygwin32. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Fix cygwin32 support to avoid using a double extension, to delete the def file, to set version_type to windows, and to include versuffix in the DLL name. * ltmain.in: Add support for a version_type of windows. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add cygwin32 support. * libtool.m4 (AM_PROG_LIBTOOL): Call AM_SYS_LIBTOOL_CYGWIN32 on a cygwin32 host. Pass DLLTOOL and AS to ltconfig. (AM_SYS_LIBTOOL_CYGWIN32): New macro.
1998-11-04 17:43:29 +08:00
/* ltdl.h -- generic dlopen functions
Copyright (C) 1998-2000 Free Software Foundation, Inc.
Originally by Thomas Tanner <tanner@ffii.org>
1998-11-04 Alexandre Oliva <oliva@dcc.unicamp.br> * ltconfig.in, ltmain.in: updated and fixed the patches below 1998-11-04 Thomas Tanner <tanner@gmx.de> * mdemo/*: added new demo to demonstrate building of dlopenend modules * tests/Makefile.am, tests/mdemo*: added some tests for mdemo 1998-11-04 Gary V. Vaughan <gvaughan@oranda.demon.co.uk> * demo/configure.in: added AC_EXEEXT macro so that the tests can work on cywin32/mingw32 hosts. This requires the current CVS autoconf 1998-11-04 Thomas Tanner <tanner@gmx.de> * ltmain.in: New flag -export-symbols; new dlpreopen system * demo/dlmain.c: removed dld_preloaded_symbol_count 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltmain.in: On installation, don't get confused if the same name appears more than once in the list of library names. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add objext and libext variables. Check for object suffix. Check for mingw32* as well as cygwin32*. Use objext when testing compiler. Add support for Visual C++ on cygwin32 when not using gcc. Add objext, libext, and fix_srcfile_path to generated libtool script. * ltmain.in: Use .${objext} rather than .o. Use fix_srcfile_path if it is set. Check for .obj as well as for .o, and for .lib as well as for .a. Use .${libext} rather than .a when creating old libraries. * libtoolize.in: Change initial /bin/sh to @SHELL@. * libtool.m4 (AM_PROG_LIBTOOL): Add AC_REQUIRE for AC_CANONICAL_BUILD, so that autoconf doesn't get mixed up by the AC_REQUIRE in AC_CHECK_TOOL. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Look in the right directory for libtool.c in archive_cmds for cygwin32. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Fix cygwin32 support to avoid using a double extension, to delete the def file, to set version_type to windows, and to include versuffix in the DLL name. * ltmain.in: Add support for a version_type of windows. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add cygwin32 support. * libtool.m4 (AM_PROG_LIBTOOL): Call AM_SYS_LIBTOOL_CYGWIN32 on a cygwin32 host. Pass DLLTOOL and AS to ltconfig. (AM_SYS_LIBTOOL_CYGWIN32): New macro.
1998-11-04 17:43:29 +08:00
This file is part of GNU Libtool.
1998-11-24 05:26:38 +08:00
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
1998-11-24 05:26:38 +08:00
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
1998-11-04 Alexandre Oliva <oliva@dcc.unicamp.br> * ltconfig.in, ltmain.in: updated and fixed the patches below 1998-11-04 Thomas Tanner <tanner@gmx.de> * mdemo/*: added new demo to demonstrate building of dlopenend modules * tests/Makefile.am, tests/mdemo*: added some tests for mdemo 1998-11-04 Gary V. Vaughan <gvaughan@oranda.demon.co.uk> * demo/configure.in: added AC_EXEEXT macro so that the tests can work on cywin32/mingw32 hosts. This requires the current CVS autoconf 1998-11-04 Thomas Tanner <tanner@gmx.de> * ltmain.in: New flag -export-symbols; new dlpreopen system * demo/dlmain.c: removed dld_preloaded_symbol_count 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltmain.in: On installation, don't get confused if the same name appears more than once in the list of library names. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add objext and libext variables. Check for object suffix. Check for mingw32* as well as cygwin32*. Use objext when testing compiler. Add support for Visual C++ on cygwin32 when not using gcc. Add objext, libext, and fix_srcfile_path to generated libtool script. * ltmain.in: Use .${objext} rather than .o. Use fix_srcfile_path if it is set. Check for .obj as well as for .o, and for .lib as well as for .a. Use .${libext} rather than .a when creating old libraries. * libtoolize.in: Change initial /bin/sh to @SHELL@. * libtool.m4 (AM_PROG_LIBTOOL): Add AC_REQUIRE for AC_CANONICAL_BUILD, so that autoconf doesn't get mixed up by the AC_REQUIRE in AC_CHECK_TOOL. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Look in the right directory for libtool.c in archive_cmds for cygwin32. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Fix cygwin32 support to avoid using a double extension, to delete the def file, to set version_type to windows, and to include versuffix in the DLL name. * ltmain.in: Add support for a version_type of windows. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add cygwin32 support. * libtool.m4 (AM_PROG_LIBTOOL): Call AM_SYS_LIBTOOL_CYGWIN32 on a cygwin32 host. Pass DLLTOOL and AS to ltconfig. (AM_SYS_LIBTOOL_CYGWIN32): New macro.
1998-11-04 17:43:29 +08:00
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.
1998-11-24 05:26:38 +08:00
This library is distributed in the hope that it will be useful,
1998-11-04 Alexandre Oliva <oliva@dcc.unicamp.br> * ltconfig.in, ltmain.in: updated and fixed the patches below 1998-11-04 Thomas Tanner <tanner@gmx.de> * mdemo/*: added new demo to demonstrate building of dlopenend modules * tests/Makefile.am, tests/mdemo*: added some tests for mdemo 1998-11-04 Gary V. Vaughan <gvaughan@oranda.demon.co.uk> * demo/configure.in: added AC_EXEEXT macro so that the tests can work on cywin32/mingw32 hosts. This requires the current CVS autoconf 1998-11-04 Thomas Tanner <tanner@gmx.de> * ltmain.in: New flag -export-symbols; new dlpreopen system * demo/dlmain.c: removed dld_preloaded_symbol_count 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltmain.in: On installation, don't get confused if the same name appears more than once in the list of library names. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add objext and libext variables. Check for object suffix. Check for mingw32* as well as cygwin32*. Use objext when testing compiler. Add support for Visual C++ on cygwin32 when not using gcc. Add objext, libext, and fix_srcfile_path to generated libtool script. * ltmain.in: Use .${objext} rather than .o. Use fix_srcfile_path if it is set. Check for .obj as well as for .o, and for .lib as well as for .a. Use .${libext} rather than .a when creating old libraries. * libtoolize.in: Change initial /bin/sh to @SHELL@. * libtool.m4 (AM_PROG_LIBTOOL): Add AC_REQUIRE for AC_CANONICAL_BUILD, so that autoconf doesn't get mixed up by the AC_REQUIRE in AC_CHECK_TOOL. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Look in the right directory for libtool.c in archive_cmds for cygwin32. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Fix cygwin32 support to avoid using a double extension, to delete the def file, to set version_type to windows, and to include versuffix in the DLL name. * ltmain.in: Add support for a version_type of windows. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add cygwin32 support. * libtool.m4 (AM_PROG_LIBTOOL): Call AM_SYS_LIBTOOL_CYGWIN32 on a cygwin32 host. Pass DLLTOOL and AS to ltconfig. (AM_SYS_LIBTOOL_CYGWIN32): New macro.
1998-11-04 17:43:29 +08:00
but WITHOUT ANY WARRANTY; without even the implied warranty of
1998-11-24 05:26:38 +08:00
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
1998-11-04 Alexandre Oliva <oliva@dcc.unicamp.br> * ltconfig.in, ltmain.in: updated and fixed the patches below 1998-11-04 Thomas Tanner <tanner@gmx.de> * mdemo/*: added new demo to demonstrate building of dlopenend modules * tests/Makefile.am, tests/mdemo*: added some tests for mdemo 1998-11-04 Gary V. Vaughan <gvaughan@oranda.demon.co.uk> * demo/configure.in: added AC_EXEEXT macro so that the tests can work on cywin32/mingw32 hosts. This requires the current CVS autoconf 1998-11-04 Thomas Tanner <tanner@gmx.de> * ltmain.in: New flag -export-symbols; new dlpreopen system * demo/dlmain.c: removed dld_preloaded_symbol_count 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltmain.in: On installation, don't get confused if the same name appears more than once in the list of library names. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add objext and libext variables. Check for object suffix. Check for mingw32* as well as cygwin32*. Use objext when testing compiler. Add support for Visual C++ on cygwin32 when not using gcc. Add objext, libext, and fix_srcfile_path to generated libtool script. * ltmain.in: Use .${objext} rather than .o. Use fix_srcfile_path if it is set. Check for .obj as well as for .o, and for .lib as well as for .a. Use .${libext} rather than .a when creating old libraries. * libtoolize.in: Change initial /bin/sh to @SHELL@. * libtool.m4 (AM_PROG_LIBTOOL): Add AC_REQUIRE for AC_CANONICAL_BUILD, so that autoconf doesn't get mixed up by the AC_REQUIRE in AC_CHECK_TOOL. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Look in the right directory for libtool.c in archive_cmds for cygwin32. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Fix cygwin32 support to avoid using a double extension, to delete the def file, to set version_type to windows, and to include versuffix in the DLL name. * ltmain.in: Add support for a version_type of windows. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add cygwin32 support. * libtool.m4 (AM_PROG_LIBTOOL): Call AM_SYS_LIBTOOL_CYGWIN32 on a cygwin32 host. Pass DLLTOOL and AS to ltconfig. (AM_SYS_LIBTOOL_CYGWIN32): New macro.
1998-11-04 17:43:29 +08:00
You should have received a copy of the GNU Lesser General Public
1998-11-24 05:26:38 +08:00
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA
1998-11-24 05:26:38 +08:00
*/
1998-11-04 Alexandre Oliva <oliva@dcc.unicamp.br> * ltconfig.in, ltmain.in: updated and fixed the patches below 1998-11-04 Thomas Tanner <tanner@gmx.de> * mdemo/*: added new demo to demonstrate building of dlopenend modules * tests/Makefile.am, tests/mdemo*: added some tests for mdemo 1998-11-04 Gary V. Vaughan <gvaughan@oranda.demon.co.uk> * demo/configure.in: added AC_EXEEXT macro so that the tests can work on cywin32/mingw32 hosts. This requires the current CVS autoconf 1998-11-04 Thomas Tanner <tanner@gmx.de> * ltmain.in: New flag -export-symbols; new dlpreopen system * demo/dlmain.c: removed dld_preloaded_symbol_count 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltmain.in: On installation, don't get confused if the same name appears more than once in the list of library names. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add objext and libext variables. Check for object suffix. Check for mingw32* as well as cygwin32*. Use objext when testing compiler. Add support for Visual C++ on cygwin32 when not using gcc. Add objext, libext, and fix_srcfile_path to generated libtool script. * ltmain.in: Use .${objext} rather than .o. Use fix_srcfile_path if it is set. Check for .obj as well as for .o, and for .lib as well as for .a. Use .${libext} rather than .a when creating old libraries. * libtoolize.in: Change initial /bin/sh to @SHELL@. * libtool.m4 (AM_PROG_LIBTOOL): Add AC_REQUIRE for AC_CANONICAL_BUILD, so that autoconf doesn't get mixed up by the AC_REQUIRE in AC_CHECK_TOOL. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Look in the right directory for libtool.c in archive_cmds for cygwin32. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Fix cygwin32 support to avoid using a double extension, to delete the def file, to set version_type to windows, and to include versuffix in the DLL name. * ltmain.in: Add support for a version_type of windows. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add cygwin32 support. * libtool.m4 (AM_PROG_LIBTOOL): Call AM_SYS_LIBTOOL_CYGWIN32 on a cygwin32 host. Pass DLLTOOL and AS to ltconfig. (AM_SYS_LIBTOOL_CYGWIN32): New macro.
1998-11-04 17:43:29 +08:00
/* Only include this header file once. */
#ifndef LTDL_H
#define LTDL_H 1
#include <sys/types.h> /* for size_t declaration */
/* --- MACROS FOR PORTABILITY --- */
1998-11-04 Alexandre Oliva <oliva@dcc.unicamp.br> * ltconfig.in, ltmain.in: updated and fixed the patches below 1998-11-04 Thomas Tanner <tanner@gmx.de> * mdemo/*: added new demo to demonstrate building of dlopenend modules * tests/Makefile.am, tests/mdemo*: added some tests for mdemo 1998-11-04 Gary V. Vaughan <gvaughan@oranda.demon.co.uk> * demo/configure.in: added AC_EXEEXT macro so that the tests can work on cywin32/mingw32 hosts. This requires the current CVS autoconf 1998-11-04 Thomas Tanner <tanner@gmx.de> * ltmain.in: New flag -export-symbols; new dlpreopen system * demo/dlmain.c: removed dld_preloaded_symbol_count 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltmain.in: On installation, don't get confused if the same name appears more than once in the list of library names. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add objext and libext variables. Check for object suffix. Check for mingw32* as well as cygwin32*. Use objext when testing compiler. Add support for Visual C++ on cygwin32 when not using gcc. Add objext, libext, and fix_srcfile_path to generated libtool script. * ltmain.in: Use .${objext} rather than .o. Use fix_srcfile_path if it is set. Check for .obj as well as for .o, and for .lib as well as for .a. Use .${libext} rather than .a when creating old libraries. * libtoolize.in: Change initial /bin/sh to @SHELL@. * libtool.m4 (AM_PROG_LIBTOOL): Add AC_REQUIRE for AC_CANONICAL_BUILD, so that autoconf doesn't get mixed up by the AC_REQUIRE in AC_CHECK_TOOL. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Look in the right directory for libtool.c in archive_cmds for cygwin32. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Fix cygwin32 support to avoid using a double extension, to delete the def file, to set version_type to windows, and to include versuffix in the DLL name. * ltmain.in: Add support for a version_type of windows. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add cygwin32 support. * libtool.m4 (AM_PROG_LIBTOOL): Call AM_SYS_LIBTOOL_CYGWIN32 on a cygwin32 host. Pass DLLTOOL and AS to ltconfig. (AM_SYS_LIBTOOL_CYGWIN32): New macro.
1998-11-04 17:43:29 +08:00
/* LTDL_BEGIN_C_DECLS should be used at the beginning of your declarations,
so that C++ compilers don't mangle their names. Use LTDL_END_C_DECLS at
1998-11-04 Alexandre Oliva <oliva@dcc.unicamp.br> * ltconfig.in, ltmain.in: updated and fixed the patches below 1998-11-04 Thomas Tanner <tanner@gmx.de> * mdemo/*: added new demo to demonstrate building of dlopenend modules * tests/Makefile.am, tests/mdemo*: added some tests for mdemo 1998-11-04 Gary V. Vaughan <gvaughan@oranda.demon.co.uk> * demo/configure.in: added AC_EXEEXT macro so that the tests can work on cywin32/mingw32 hosts. This requires the current CVS autoconf 1998-11-04 Thomas Tanner <tanner@gmx.de> * ltmain.in: New flag -export-symbols; new dlpreopen system * demo/dlmain.c: removed dld_preloaded_symbol_count 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltmain.in: On installation, don't get confused if the same name appears more than once in the list of library names. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add objext and libext variables. Check for object suffix. Check for mingw32* as well as cygwin32*. Use objext when testing compiler. Add support for Visual C++ on cygwin32 when not using gcc. Add objext, libext, and fix_srcfile_path to generated libtool script. * ltmain.in: Use .${objext} rather than .o. Use fix_srcfile_path if it is set. Check for .obj as well as for .o, and for .lib as well as for .a. Use .${libext} rather than .a when creating old libraries. * libtoolize.in: Change initial /bin/sh to @SHELL@. * libtool.m4 (AM_PROG_LIBTOOL): Add AC_REQUIRE for AC_CANONICAL_BUILD, so that autoconf doesn't get mixed up by the AC_REQUIRE in AC_CHECK_TOOL. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Look in the right directory for libtool.c in archive_cmds for cygwin32. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Fix cygwin32 support to avoid using a double extension, to delete the def file, to set version_type to windows, and to include versuffix in the DLL name. * ltmain.in: Add support for a version_type of windows. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add cygwin32 support. * libtool.m4 (AM_PROG_LIBTOOL): Call AM_SYS_LIBTOOL_CYGWIN32 on a cygwin32 host. Pass DLLTOOL and AS to ltconfig. (AM_SYS_LIBTOOL_CYGWIN32): New macro.
1998-11-04 17:43:29 +08:00
the end of C declarations. */
#ifdef __cplusplus
# define LT_BEGIN_C_DECLS extern "C" {
# define LT_END_C_DECLS }
1998-11-04 Alexandre Oliva <oliva@dcc.unicamp.br> * ltconfig.in, ltmain.in: updated and fixed the patches below 1998-11-04 Thomas Tanner <tanner@gmx.de> * mdemo/*: added new demo to demonstrate building of dlopenend modules * tests/Makefile.am, tests/mdemo*: added some tests for mdemo 1998-11-04 Gary V. Vaughan <gvaughan@oranda.demon.co.uk> * demo/configure.in: added AC_EXEEXT macro so that the tests can work on cywin32/mingw32 hosts. This requires the current CVS autoconf 1998-11-04 Thomas Tanner <tanner@gmx.de> * ltmain.in: New flag -export-symbols; new dlpreopen system * demo/dlmain.c: removed dld_preloaded_symbol_count 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltmain.in: On installation, don't get confused if the same name appears more than once in the list of library names. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add objext and libext variables. Check for object suffix. Check for mingw32* as well as cygwin32*. Use objext when testing compiler. Add support for Visual C++ on cygwin32 when not using gcc. Add objext, libext, and fix_srcfile_path to generated libtool script. * ltmain.in: Use .${objext} rather than .o. Use fix_srcfile_path if it is set. Check for .obj as well as for .o, and for .lib as well as for .a. Use .${libext} rather than .a when creating old libraries. * libtoolize.in: Change initial /bin/sh to @SHELL@. * libtool.m4 (AM_PROG_LIBTOOL): Add AC_REQUIRE for AC_CANONICAL_BUILD, so that autoconf doesn't get mixed up by the AC_REQUIRE in AC_CHECK_TOOL. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Look in the right directory for libtool.c in archive_cmds for cygwin32. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Fix cygwin32 support to avoid using a double extension, to delete the def file, to set version_type to windows, and to include versuffix in the DLL name. * ltmain.in: Add support for a version_type of windows. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add cygwin32 support. * libtool.m4 (AM_PROG_LIBTOOL): Call AM_SYS_LIBTOOL_CYGWIN32 on a cygwin32 host. Pass DLLTOOL and AS to ltconfig. (AM_SYS_LIBTOOL_CYGWIN32): New macro.
1998-11-04 17:43:29 +08:00
#else
# define LT_BEGIN_C_DECLS /* empty */
# define LT_END_C_DECLS /* empty */
1998-11-04 Alexandre Oliva <oliva@dcc.unicamp.br> * ltconfig.in, ltmain.in: updated and fixed the patches below 1998-11-04 Thomas Tanner <tanner@gmx.de> * mdemo/*: added new demo to demonstrate building of dlopenend modules * tests/Makefile.am, tests/mdemo*: added some tests for mdemo 1998-11-04 Gary V. Vaughan <gvaughan@oranda.demon.co.uk> * demo/configure.in: added AC_EXEEXT macro so that the tests can work on cywin32/mingw32 hosts. This requires the current CVS autoconf 1998-11-04 Thomas Tanner <tanner@gmx.de> * ltmain.in: New flag -export-symbols; new dlpreopen system * demo/dlmain.c: removed dld_preloaded_symbol_count 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltmain.in: On installation, don't get confused if the same name appears more than once in the list of library names. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add objext and libext variables. Check for object suffix. Check for mingw32* as well as cygwin32*. Use objext when testing compiler. Add support for Visual C++ on cygwin32 when not using gcc. Add objext, libext, and fix_srcfile_path to generated libtool script. * ltmain.in: Use .${objext} rather than .o. Use fix_srcfile_path if it is set. Check for .obj as well as for .o, and for .lib as well as for .a. Use .${libext} rather than .a when creating old libraries. * libtoolize.in: Change initial /bin/sh to @SHELL@. * libtool.m4 (AM_PROG_LIBTOOL): Add AC_REQUIRE for AC_CANONICAL_BUILD, so that autoconf doesn't get mixed up by the AC_REQUIRE in AC_CHECK_TOOL. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Look in the right directory for libtool.c in archive_cmds for cygwin32. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Fix cygwin32 support to avoid using a double extension, to delete the def file, to set version_type to windows, and to include versuffix in the DLL name. * ltmain.in: Add support for a version_type of windows. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add cygwin32 support. * libtool.m4 (AM_PROG_LIBTOOL): Call AM_SYS_LIBTOOL_CYGWIN32 on a cygwin32 host. Pass DLLTOOL and AS to ltconfig. (AM_SYS_LIBTOOL_CYGWIN32): New macro.
1998-11-04 17:43:29 +08:00
#endif
LT_BEGIN_C_DECLS
/* LT_PARAMS is a macro used to wrap function prototypes, so that compilers
1998-11-04 Alexandre Oliva <oliva@dcc.unicamp.br> * ltconfig.in, ltmain.in: updated and fixed the patches below 1998-11-04 Thomas Tanner <tanner@gmx.de> * mdemo/*: added new demo to demonstrate building of dlopenend modules * tests/Makefile.am, tests/mdemo*: added some tests for mdemo 1998-11-04 Gary V. Vaughan <gvaughan@oranda.demon.co.uk> * demo/configure.in: added AC_EXEEXT macro so that the tests can work on cywin32/mingw32 hosts. This requires the current CVS autoconf 1998-11-04 Thomas Tanner <tanner@gmx.de> * ltmain.in: New flag -export-symbols; new dlpreopen system * demo/dlmain.c: removed dld_preloaded_symbol_count 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltmain.in: On installation, don't get confused if the same name appears more than once in the list of library names. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add objext and libext variables. Check for object suffix. Check for mingw32* as well as cygwin32*. Use objext when testing compiler. Add support for Visual C++ on cygwin32 when not using gcc. Add objext, libext, and fix_srcfile_path to generated libtool script. * ltmain.in: Use .${objext} rather than .o. Use fix_srcfile_path if it is set. Check for .obj as well as for .o, and for .lib as well as for .a. Use .${libext} rather than .a when creating old libraries. * libtoolize.in: Change initial /bin/sh to @SHELL@. * libtool.m4 (AM_PROG_LIBTOOL): Add AC_REQUIRE for AC_CANONICAL_BUILD, so that autoconf doesn't get mixed up by the AC_REQUIRE in AC_CHECK_TOOL. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Look in the right directory for libtool.c in archive_cmds for cygwin32. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Fix cygwin32 support to avoid using a double extension, to delete the def file, to set version_type to windows, and to include versuffix in the DLL name. * ltmain.in: Add support for a version_type of windows. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add cygwin32 support. * libtool.m4 (AM_PROG_LIBTOOL): Call AM_SYS_LIBTOOL_CYGWIN32 on a cygwin32 host. Pass DLLTOOL and AS to ltconfig. (AM_SYS_LIBTOOL_CYGWIN32): New macro.
1998-11-04 17:43:29 +08:00
that don't understand ANSI C prototypes still work, and ANSI C
compilers can issue warnings about type mismatches. */
1998-11-04 Alexandre Oliva <oliva@dcc.unicamp.br> * ltconfig.in, ltmain.in: updated and fixed the patches below 1998-11-04 Thomas Tanner <tanner@gmx.de> * mdemo/*: added new demo to demonstrate building of dlopenend modules * tests/Makefile.am, tests/mdemo*: added some tests for mdemo 1998-11-04 Gary V. Vaughan <gvaughan@oranda.demon.co.uk> * demo/configure.in: added AC_EXEEXT macro so that the tests can work on cywin32/mingw32 hosts. This requires the current CVS autoconf 1998-11-04 Thomas Tanner <tanner@gmx.de> * ltmain.in: New flag -export-symbols; new dlpreopen system * demo/dlmain.c: removed dld_preloaded_symbol_count 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltmain.in: On installation, don't get confused if the same name appears more than once in the list of library names. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add objext and libext variables. Check for object suffix. Check for mingw32* as well as cygwin32*. Use objext when testing compiler. Add support for Visual C++ on cygwin32 when not using gcc. Add objext, libext, and fix_srcfile_path to generated libtool script. * ltmain.in: Use .${objext} rather than .o. Use fix_srcfile_path if it is set. Check for .obj as well as for .o, and for .lib as well as for .a. Use .${libext} rather than .a when creating old libraries. * libtoolize.in: Change initial /bin/sh to @SHELL@. * libtool.m4 (AM_PROG_LIBTOOL): Add AC_REQUIRE for AC_CANONICAL_BUILD, so that autoconf doesn't get mixed up by the AC_REQUIRE in AC_CHECK_TOOL. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Look in the right directory for libtool.c in archive_cmds for cygwin32. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Fix cygwin32 support to avoid using a double extension, to delete the def file, to set version_type to windows, and to include versuffix in the DLL name. * ltmain.in: Add support for a version_type of windows. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add cygwin32 support. * libtool.m4 (AM_PROG_LIBTOOL): Call AM_SYS_LIBTOOL_CYGWIN32 on a cygwin32 host. Pass DLLTOOL and AS to ltconfig. (AM_SYS_LIBTOOL_CYGWIN32): New macro.
1998-11-04 17:43:29 +08:00
#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(WIN32) || defined(__cplusplus)
# define LT_PARAMS(protos) protos
# define lt_ptr void*
1998-11-04 Alexandre Oliva <oliva@dcc.unicamp.br> * ltconfig.in, ltmain.in: updated and fixed the patches below 1998-11-04 Thomas Tanner <tanner@gmx.de> * mdemo/*: added new demo to demonstrate building of dlopenend modules * tests/Makefile.am, tests/mdemo*: added some tests for mdemo 1998-11-04 Gary V. Vaughan <gvaughan@oranda.demon.co.uk> * demo/configure.in: added AC_EXEEXT macro so that the tests can work on cywin32/mingw32 hosts. This requires the current CVS autoconf 1998-11-04 Thomas Tanner <tanner@gmx.de> * ltmain.in: New flag -export-symbols; new dlpreopen system * demo/dlmain.c: removed dld_preloaded_symbol_count 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltmain.in: On installation, don't get confused if the same name appears more than once in the list of library names. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add objext and libext variables. Check for object suffix. Check for mingw32* as well as cygwin32*. Use objext when testing compiler. Add support for Visual C++ on cygwin32 when not using gcc. Add objext, libext, and fix_srcfile_path to generated libtool script. * ltmain.in: Use .${objext} rather than .o. Use fix_srcfile_path if it is set. Check for .obj as well as for .o, and for .lib as well as for .a. Use .${libext} rather than .a when creating old libraries. * libtoolize.in: Change initial /bin/sh to @SHELL@. * libtool.m4 (AM_PROG_LIBTOOL): Add AC_REQUIRE for AC_CANONICAL_BUILD, so that autoconf doesn't get mixed up by the AC_REQUIRE in AC_CHECK_TOOL. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Look in the right directory for libtool.c in archive_cmds for cygwin32. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Fix cygwin32 support to avoid using a double extension, to delete the def file, to set version_type to windows, and to include versuffix in the DLL name. * ltmain.in: Add support for a version_type of windows. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add cygwin32 support. * libtool.m4 (AM_PROG_LIBTOOL): Call AM_SYS_LIBTOOL_CYGWIN32 on a cygwin32 host. Pass DLLTOOL and AS to ltconfig. (AM_SYS_LIBTOOL_CYGWIN32): New macro.
1998-11-04 17:43:29 +08:00
#else
# define LT_PARAMS(protos) ()
# define lt_ptr char*
1998-11-04 Alexandre Oliva <oliva@dcc.unicamp.br> * ltconfig.in, ltmain.in: updated and fixed the patches below 1998-11-04 Thomas Tanner <tanner@gmx.de> * mdemo/*: added new demo to demonstrate building of dlopenend modules * tests/Makefile.am, tests/mdemo*: added some tests for mdemo 1998-11-04 Gary V. Vaughan <gvaughan@oranda.demon.co.uk> * demo/configure.in: added AC_EXEEXT macro so that the tests can work on cywin32/mingw32 hosts. This requires the current CVS autoconf 1998-11-04 Thomas Tanner <tanner@gmx.de> * ltmain.in: New flag -export-symbols; new dlpreopen system * demo/dlmain.c: removed dld_preloaded_symbol_count 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltmain.in: On installation, don't get confused if the same name appears more than once in the list of library names. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add objext and libext variables. Check for object suffix. Check for mingw32* as well as cygwin32*. Use objext when testing compiler. Add support for Visual C++ on cygwin32 when not using gcc. Add objext, libext, and fix_srcfile_path to generated libtool script. * ltmain.in: Use .${objext} rather than .o. Use fix_srcfile_path if it is set. Check for .obj as well as for .o, and for .lib as well as for .a. Use .${libext} rather than .a when creating old libraries. * libtoolize.in: Change initial /bin/sh to @SHELL@. * libtool.m4 (AM_PROG_LIBTOOL): Add AC_REQUIRE for AC_CANONICAL_BUILD, so that autoconf doesn't get mixed up by the AC_REQUIRE in AC_CHECK_TOOL. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Look in the right directory for libtool.c in archive_cmds for cygwin32. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Fix cygwin32 support to avoid using a double extension, to delete the def file, to set version_type to windows, and to include versuffix in the DLL name. * ltmain.in: Add support for a version_type of windows. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add cygwin32 support. * libtool.m4 (AM_PROG_LIBTOOL): Call AM_SYS_LIBTOOL_CYGWIN32 on a cygwin32 host. Pass DLLTOOL and AS to ltconfig. (AM_SYS_LIBTOOL_CYGWIN32): New macro.
1998-11-04 17:43:29 +08:00
#endif
/* LT_STMT_START/END are used to create macros which expand to a
a single compound statement in a portable way. */
#if defined (__GNUC__) && !defined (__STRICT_ANSI__) && !defined (__cplusplus)
# define LT_STMT_START (void)(
# define LT_STMT_END )
#else
# if (defined (sun) || defined (__sun__))
# define LT_STMT_START if (1)
# define LT_STMT_END else (void)0
# else
# define LT_STMT_START do
# define LT_STMT_END while (0)
# endif
#endif
/* LT_CONC creates a new concatenated symbol for the compiler
in a portable way. */
#if defined(__STDC__) || defined(__cplusplus)
# define LT_CONC(s,t) s##t
#else
# define LT_CONC(s,t) s/**/t
#endif
/* --- WINDOWS SUPPORT --- */
/* Canonicalise Windows and Cygwin recognition macros. */
#ifdef __CYGWIN32__
# ifndef __CYGWIN__
# define __CYGWIN__ __CYGWIN32__
# endif
#endif
#if defined(_WIN32) || defined(WIN32)
# ifndef __WINDOWS__
# ifdef _WIN32
# define __WINDOWS__ _WIN32
# else
# ifdef WIN32
# define __WINDOWS__ WIN32
# endif
# endif
# endif
#endif
#ifdef __WINDOWS__
# ifndef __CYGWIN__
/* LT_DIRSEP_CHAR is accepted *in addition* to '/' as a directory
separator when it is set. */
# define LT_DIRSEP_CHAR '\\'
# define LT_PATHSEP_CHAR ';'
# endif
#endif
#ifndef LT_PATHSEP_CHAR
# define LT_PATHSEP_CHAR ':'
#endif
/* DLL building support on win32 hosts; mostly to workaround their
ridiculous implementation of data symbol exporting. */
#ifndef LT_SCOPE
# ifdef __WINDOWS__
# ifdef DLL_EXPORT /* defined by libtool (if required) */
# define LT_SCOPE __declspec(dllexport)
# endif
# ifdef LIBLTDL_DLL_IMPORT /* define if linking with this dll */
# define LT_SCOPE extern __declspec(dllimport)
# endif
# endif
# ifndef LT_SCOPE /* static linking or !__WINDOWS__ */
# define LT_SCOPE extern
# endif
#endif
/* --- DYNAMIC MODULE LOADING API --- */
typedef struct lt_dlhandle *lt_dlhandle; /* A loaded module. */
/* Initialisation and finalisation functions for libltdl. */
extern int lt_dlinit LT_PARAMS((void));
extern int lt_dlexit LT_PARAMS((void));
/* Module search path manipultation. */
extern int lt_dladdsearchdir LT_PARAMS((const char *search_dir));
extern int lt_dlsetsearchpath LT_PARAMS((const char *search_path));
extern const char *lt_dlgetsearchpath LT_PARAMS((void));
/* Portable libltdl versions of the system dlopen() API. */
extern lt_dlhandle lt_dlopen LT_PARAMS((const char *filename));
extern lt_dlhandle lt_dlopenext LT_PARAMS((const char *filename));
extern lt_ptr lt_dlsym LT_PARAMS((lt_dlhandle handle,
const char *name));
extern const char *lt_dlerror LT_PARAMS((void));
extern int lt_dlclose LT_PARAMS((lt_dlhandle handle));
/* Pointers to memory management functions to be used by libltdl. */
LT_SCOPE lt_ptr (*lt_dlmalloc) LT_PARAMS((size_t size));
LT_SCOPE void (*lt_dlfree) LT_PARAMS((lt_ptr ptr));
/* --- PRELOADED MODULE SUPPORT --- */
1998-11-04 Alexandre Oliva <oliva@dcc.unicamp.br> * ltconfig.in, ltmain.in: updated and fixed the patches below 1998-11-04 Thomas Tanner <tanner@gmx.de> * mdemo/*: added new demo to demonstrate building of dlopenend modules * tests/Makefile.am, tests/mdemo*: added some tests for mdemo 1998-11-04 Gary V. Vaughan <gvaughan@oranda.demon.co.uk> * demo/configure.in: added AC_EXEEXT macro so that the tests can work on cywin32/mingw32 hosts. This requires the current CVS autoconf 1998-11-04 Thomas Tanner <tanner@gmx.de> * ltmain.in: New flag -export-symbols; new dlpreopen system * demo/dlmain.c: removed dld_preloaded_symbol_count 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltmain.in: On installation, don't get confused if the same name appears more than once in the list of library names. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add objext and libext variables. Check for object suffix. Check for mingw32* as well as cygwin32*. Use objext when testing compiler. Add support for Visual C++ on cygwin32 when not using gcc. Add objext, libext, and fix_srcfile_path to generated libtool script. * ltmain.in: Use .${objext} rather than .o. Use fix_srcfile_path if it is set. Check for .obj as well as for .o, and for .lib as well as for .a. Use .${libext} rather than .a when creating old libraries. * libtoolize.in: Change initial /bin/sh to @SHELL@. * libtool.m4 (AM_PROG_LIBTOOL): Add AC_REQUIRE for AC_CANONICAL_BUILD, so that autoconf doesn't get mixed up by the AC_REQUIRE in AC_CHECK_TOOL. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Look in the right directory for libtool.c in archive_cmds for cygwin32. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Fix cygwin32 support to avoid using a double extension, to delete the def file, to set version_type to windows, and to include versuffix in the DLL name. * ltmain.in: Add support for a version_type of windows. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add cygwin32 support. * libtool.m4 (AM_PROG_LIBTOOL): Call AM_SYS_LIBTOOL_CYGWIN32 on a cygwin32 host. Pass DLLTOOL and AS to ltconfig. (AM_SYS_LIBTOOL_CYGWIN32): New macro.
1998-11-04 17:43:29 +08:00
* NEWS: updated. * doc/libtool.texi (Libltdl interface): Moved user defined module loader documentation from here... (Module loaders for libltdl) ...to here, and updated the text and added examples. * ltdl.m4 (AC_CHECK_FUNCS): check strcmp for lt_find_dlloader. * libltdl/ltdl.h: Reformatted and commented for readability. (struct lt_user_dlloader): New data type for passing initialisation pointers to lt_add_dlloader. (LTDL_ERROR_INVALID_LOADER): New error message when non loader handles are passed to the user loader API. (LTDL_ERROR_INIT_LOADER): New error when loader initialisation fails. (LTDL_ERROR_REMOVE_LOADER): New error when loader removal fails. (lt_module_open_t): renamed from lt_lib_open_t. (lt_module_close_t): renamed from lt_lib_close_t. (lt_dlloader_exit_t): renamed from lt_dlloader_exit_t. * libltdl/ltdl.c: Reordered builtin loaders so that the "dld" loader no longer occurs before "dlopen" on some platforms and after it on others. (lt_dlloader_t): Moved here from ltdl.h, added a field, "loader_name", for identifying the loader, and renamed from lt_dltype_t. Renamed type variables to loader IFF of type lt_dlloader_t. (lt_module_t): Renamed from lt_syshandle. Renamed handle variables to module IFF of type lt_module_t. (LTDL_TYPE_TOP): Deleted. No longer required. (sys_dl): Initialised as a struct lt_user_dlloader. (sys_dl_init): Deleted. No longer required. (sys_dl_exit): Ditto. (sys_shl): Initialised as a struct lt_user_dlloader. (sys_shl_init): Deleted. No longer required. (sys_shl_exit): Ditto. (sys_wll): Initialised as a struct lt_user_dlloader. (sys_wll_init): Deleted. No longer required. (sys_wll_exit): Ditto. (sys_bedl): Initialised as a struct lt_user_dlloader. (sys_bedl_init): Deleted. No longer required. (sys_bedl_exit): Ditto. (sys_dld): Initialised as a struct lt_user_dlloader. (sys_dld_init): Deleted. No longer required. (sys_dld_exit): Ditto. (sys_presym): Initialised as a struct lt_user_dlloader. (lt_mod_init_t): Moved to here from ltdl.h. (lt_dlinit): Add builtin loaders using the user loader API. (lt_dlexit): Unregister and free all loaders. (lt_add_dlloader): New function to add a new module loader after the loader specified in the argument. (lt_remove_dlloader): New function to remove a module loader. (lt_next_dlloader): New function for iterating over module loaders. (lt_dlloader_name): Accessor function for name of dlloader. (lt_find_dlloader): New function to get a reference to a registered module loader. (strcmp): static implementation incase the host has none. (lt_dlgettypes, lt_dlsettypes): Removed.
2000-02-03 06:43:14 +08:00
/* A preopened symbol. Arrays of this type comprise the exported
symbols for a dlpreopened module. */
1999-01-13 04:42:47 +08:00
typedef struct {
const char *name;
lt_ptr address;
1999-01-13 04:42:47 +08:00
} lt_dlsymlist;
extern int lt_dlpreload LT_PARAMS((const lt_dlsymlist *preloaded));
extern int lt_dlpreload_default
LT_PARAMS((const lt_dlsymlist *preloaded));
#define LTDL_SET_PRELOADED_SYMBOLS() LT_STMT_START{ \
extern const lt_dlsymlist lt_preloaded_symbols[]; \
lt_dlpreload_default(lt_preloaded_symbols); \
}LT_STMT_END
/* --- MODULE INFORMATION --- */
* NEWS: updated. * doc/libtool.texi (Libltdl interface): Moved user defined module loader documentation from here... (Module loaders for libltdl) ...to here, and updated the text and added examples. * ltdl.m4 (AC_CHECK_FUNCS): check strcmp for lt_find_dlloader. * libltdl/ltdl.h: Reformatted and commented for readability. (struct lt_user_dlloader): New data type for passing initialisation pointers to lt_add_dlloader. (LTDL_ERROR_INVALID_LOADER): New error message when non loader handles are passed to the user loader API. (LTDL_ERROR_INIT_LOADER): New error when loader initialisation fails. (LTDL_ERROR_REMOVE_LOADER): New error when loader removal fails. (lt_module_open_t): renamed from lt_lib_open_t. (lt_module_close_t): renamed from lt_lib_close_t. (lt_dlloader_exit_t): renamed from lt_dlloader_exit_t. * libltdl/ltdl.c: Reordered builtin loaders so that the "dld" loader no longer occurs before "dlopen" on some platforms and after it on others. (lt_dlloader_t): Moved here from ltdl.h, added a field, "loader_name", for identifying the loader, and renamed from lt_dltype_t. Renamed type variables to loader IFF of type lt_dlloader_t. (lt_module_t): Renamed from lt_syshandle. Renamed handle variables to module IFF of type lt_module_t. (LTDL_TYPE_TOP): Deleted. No longer required. (sys_dl): Initialised as a struct lt_user_dlloader. (sys_dl_init): Deleted. No longer required. (sys_dl_exit): Ditto. (sys_shl): Initialised as a struct lt_user_dlloader. (sys_shl_init): Deleted. No longer required. (sys_shl_exit): Ditto. (sys_wll): Initialised as a struct lt_user_dlloader. (sys_wll_init): Deleted. No longer required. (sys_wll_exit): Ditto. (sys_bedl): Initialised as a struct lt_user_dlloader. (sys_bedl_init): Deleted. No longer required. (sys_bedl_exit): Ditto. (sys_dld): Initialised as a struct lt_user_dlloader. (sys_dld_init): Deleted. No longer required. (sys_dld_exit): Ditto. (sys_presym): Initialised as a struct lt_user_dlloader. (lt_mod_init_t): Moved to here from ltdl.h. (lt_dlinit): Add builtin loaders using the user loader API. (lt_dlexit): Unregister and free all loaders. (lt_add_dlloader): New function to add a new module loader after the loader specified in the argument. (lt_remove_dlloader): New function to remove a module loader. (lt_next_dlloader): New function for iterating over module loaders. (lt_dlloader_name): Accessor function for name of dlloader. (lt_find_dlloader): New function to get a reference to a registered module loader. (strcmp): static implementation incase the host has none. (lt_dlgettypes, lt_dlsettypes): Removed.
2000-02-03 06:43:14 +08:00
/* Read only information pertaining to a loaded module. */
typedef struct {
char *filename; /* file name */
char *name; /* module name */
int ref_count; /* number of times lt_dlopened minus
* NEWS: updated. * doc/libtool.texi (Libltdl interface): Moved user defined module loader documentation from here... (Module loaders for libltdl) ...to here, and updated the text and added examples. * ltdl.m4 (AC_CHECK_FUNCS): check strcmp for lt_find_dlloader. * libltdl/ltdl.h: Reformatted and commented for readability. (struct lt_user_dlloader): New data type for passing initialisation pointers to lt_add_dlloader. (LTDL_ERROR_INVALID_LOADER): New error message when non loader handles are passed to the user loader API. (LTDL_ERROR_INIT_LOADER): New error when loader initialisation fails. (LTDL_ERROR_REMOVE_LOADER): New error when loader removal fails. (lt_module_open_t): renamed from lt_lib_open_t. (lt_module_close_t): renamed from lt_lib_close_t. (lt_dlloader_exit_t): renamed from lt_dlloader_exit_t. * libltdl/ltdl.c: Reordered builtin loaders so that the "dld" loader no longer occurs before "dlopen" on some platforms and after it on others. (lt_dlloader_t): Moved here from ltdl.h, added a field, "loader_name", for identifying the loader, and renamed from lt_dltype_t. Renamed type variables to loader IFF of type lt_dlloader_t. (lt_module_t): Renamed from lt_syshandle. Renamed handle variables to module IFF of type lt_module_t. (LTDL_TYPE_TOP): Deleted. No longer required. (sys_dl): Initialised as a struct lt_user_dlloader. (sys_dl_init): Deleted. No longer required. (sys_dl_exit): Ditto. (sys_shl): Initialised as a struct lt_user_dlloader. (sys_shl_init): Deleted. No longer required. (sys_shl_exit): Ditto. (sys_wll): Initialised as a struct lt_user_dlloader. (sys_wll_init): Deleted. No longer required. (sys_wll_exit): Ditto. (sys_bedl): Initialised as a struct lt_user_dlloader. (sys_bedl_init): Deleted. No longer required. (sys_bedl_exit): Ditto. (sys_dld): Initialised as a struct lt_user_dlloader. (sys_dld_init): Deleted. No longer required. (sys_dld_exit): Ditto. (sys_presym): Initialised as a struct lt_user_dlloader. (lt_mod_init_t): Moved to here from ltdl.h. (lt_dlinit): Add builtin loaders using the user loader API. (lt_dlexit): Unregister and free all loaders. (lt_add_dlloader): New function to add a new module loader after the loader specified in the argument. (lt_remove_dlloader): New function to remove a module loader. (lt_next_dlloader): New function for iterating over module loaders. (lt_dlloader_name): Accessor function for name of dlloader. (lt_find_dlloader): New function to get a reference to a registered module loader. (strcmp): static implementation incase the host has none. (lt_dlgettypes, lt_dlsettypes): Removed.
2000-02-03 06:43:14 +08:00
number of times lt_dlclosed. */
} lt_dlinfo;
extern const lt_dlinfo *lt_dlgetinfo LT_PARAMS((lt_dlhandle handle));
extern int lt_dlforeach LT_PARAMS((
int (*func) (lt_dlhandle handle, lt_ptr data),
lt_ptr data));
/* --- USER MODULE LOADER API --- */
* NEWS: updated. * doc/libtool.texi (Libltdl interface): Moved user defined module loader documentation from here... (Module loaders for libltdl) ...to here, and updated the text and added examples. * ltdl.m4 (AC_CHECK_FUNCS): check strcmp for lt_find_dlloader. * libltdl/ltdl.h: Reformatted and commented for readability. (struct lt_user_dlloader): New data type for passing initialisation pointers to lt_add_dlloader. (LTDL_ERROR_INVALID_LOADER): New error message when non loader handles are passed to the user loader API. (LTDL_ERROR_INIT_LOADER): New error when loader initialisation fails. (LTDL_ERROR_REMOVE_LOADER): New error when loader removal fails. (lt_module_open_t): renamed from lt_lib_open_t. (lt_module_close_t): renamed from lt_lib_close_t. (lt_dlloader_exit_t): renamed from lt_dlloader_exit_t. * libltdl/ltdl.c: Reordered builtin loaders so that the "dld" loader no longer occurs before "dlopen" on some platforms and after it on others. (lt_dlloader_t): Moved here from ltdl.h, added a field, "loader_name", for identifying the loader, and renamed from lt_dltype_t. Renamed type variables to loader IFF of type lt_dlloader_t. (lt_module_t): Renamed from lt_syshandle. Renamed handle variables to module IFF of type lt_module_t. (LTDL_TYPE_TOP): Deleted. No longer required. (sys_dl): Initialised as a struct lt_user_dlloader. (sys_dl_init): Deleted. No longer required. (sys_dl_exit): Ditto. (sys_shl): Initialised as a struct lt_user_dlloader. (sys_shl_init): Deleted. No longer required. (sys_shl_exit): Ditto. (sys_wll): Initialised as a struct lt_user_dlloader. (sys_wll_init): Deleted. No longer required. (sys_wll_exit): Ditto. (sys_bedl): Initialised as a struct lt_user_dlloader. (sys_bedl_init): Deleted. No longer required. (sys_bedl_exit): Ditto. (sys_dld): Initialised as a struct lt_user_dlloader. (sys_dld_init): Deleted. No longer required. (sys_dld_exit): Ditto. (sys_presym): Initialised as a struct lt_user_dlloader. (lt_mod_init_t): Moved to here from ltdl.h. (lt_dlinit): Add builtin loaders using the user loader API. (lt_dlexit): Unregister and free all loaders. (lt_add_dlloader): New function to add a new module loader after the loader specified in the argument. (lt_remove_dlloader): New function to remove a module loader. (lt_next_dlloader): New function for iterating over module loaders. (lt_dlloader_name): Accessor function for name of dlloader. (lt_find_dlloader): New function to get a reference to a registered module loader. (strcmp): static implementation incase the host has none. (lt_dlgettypes, lt_dlsettypes): Removed.
2000-02-03 06:43:14 +08:00
typedef struct lt_dlloader lt_dlloader;
typedef lt_ptr lt_user_data;
typedef lt_ptr lt_module;
* libltdl/ltdl.h (lt_dlloader_data_t): New type for loader instance data. (lt_user_dlloader): New lt_dlloader_data_t field. (lt_module_open_t): Add lt_dlloader_data_t parameter. (lt_module_close_t): Add lt_dlloader_data_t parameter. (lt_find_sym_t): Add lt_dlloader_data_t parameter. (lt_dlloader_exit_t): Add lt_dlloader_data_t parameter. * libltdl/ltdl.c: A sprinkling of /*ARGSUSED*/ markers to reassure lint that the unused arguments are intentional. (lt_dlloader_t): New lt_dlloader_data_t field. (lt_dlloader_data): New function to return the contents of the dlloader_data field. (sys_dl_open): Take an additional lt_dlloader_data_t argument. (sys_dl_close): Ditto. (sys_dl_sym): Ditto. (sys_dl): Initialise lt_dlloader_data_t field. (sys_shl_open, sys_shl_close, sys_shl_sym, sys_shl): As above. (sys_wll_open, sys_wll_close, sys_wll_sym, sys_wll): As above. (sys_bedl_open, sys_bedl_close, sys_bedl_sym, sys_bedl): As above. (sys_dld_open, sys_dld_close, sys_dld_sym, sys_dld): As above. (presym_init, presym_exit, presym_open, presym_close, presym_sym, presym): As above. (lt_dlinit): Call presym_init with additional argument. (lt_dlexit): Call dlloader_exit method with additional argument. (tryall_dlopen): Call module_open method with additional argument. (lt_dlclose): Call module_close method with additional argument. (lt_dlsym): Call find_sym method with additional argument. (lt_add_dlloader): Initialise dlloader_data field. (lt_remove_dlloader): Call dlloader_exit method with additional argument.
2000-02-08 02:17:21 +08:00
* NEWS: updated. * doc/libtool.texi (Libltdl interface): Moved user defined module loader documentation from here... (Module loaders for libltdl) ...to here, and updated the text and added examples. * ltdl.m4 (AC_CHECK_FUNCS): check strcmp for lt_find_dlloader. * libltdl/ltdl.h: Reformatted and commented for readability. (struct lt_user_dlloader): New data type for passing initialisation pointers to lt_add_dlloader. (LTDL_ERROR_INVALID_LOADER): New error message when non loader handles are passed to the user loader API. (LTDL_ERROR_INIT_LOADER): New error when loader initialisation fails. (LTDL_ERROR_REMOVE_LOADER): New error when loader removal fails. (lt_module_open_t): renamed from lt_lib_open_t. (lt_module_close_t): renamed from lt_lib_close_t. (lt_dlloader_exit_t): renamed from lt_dlloader_exit_t. * libltdl/ltdl.c: Reordered builtin loaders so that the "dld" loader no longer occurs before "dlopen" on some platforms and after it on others. (lt_dlloader_t): Moved here from ltdl.h, added a field, "loader_name", for identifying the loader, and renamed from lt_dltype_t. Renamed type variables to loader IFF of type lt_dlloader_t. (lt_module_t): Renamed from lt_syshandle. Renamed handle variables to module IFF of type lt_module_t. (LTDL_TYPE_TOP): Deleted. No longer required. (sys_dl): Initialised as a struct lt_user_dlloader. (sys_dl_init): Deleted. No longer required. (sys_dl_exit): Ditto. (sys_shl): Initialised as a struct lt_user_dlloader. (sys_shl_init): Deleted. No longer required. (sys_shl_exit): Ditto. (sys_wll): Initialised as a struct lt_user_dlloader. (sys_wll_init): Deleted. No longer required. (sys_wll_exit): Ditto. (sys_bedl): Initialised as a struct lt_user_dlloader. (sys_bedl_init): Deleted. No longer required. (sys_bedl_exit): Ditto. (sys_dld): Initialised as a struct lt_user_dlloader. (sys_dld_init): Deleted. No longer required. (sys_dld_exit): Ditto. (sys_presym): Initialised as a struct lt_user_dlloader. (lt_mod_init_t): Moved to here from ltdl.h. (lt_dlinit): Add builtin loaders using the user loader API. (lt_dlexit): Unregister and free all loaders. (lt_add_dlloader): New function to add a new module loader after the loader specified in the argument. (lt_remove_dlloader): New function to remove a module loader. (lt_next_dlloader): New function for iterating over module loaders. (lt_dlloader_name): Accessor function for name of dlloader. (lt_find_dlloader): New function to get a reference to a registered module loader. (strcmp): static implementation incase the host has none. (lt_dlgettypes, lt_dlsettypes): Removed.
2000-02-03 06:43:14 +08:00
/* Function pointer types for creating user defined module loaders. */
typedef lt_module lt_module_open LT_PARAMS((lt_user_data loader_data,
const char *filename));
typedef int lt_module_close LT_PARAMS((lt_user_data loader_data,
lt_module handle));
typedef lt_ptr lt_find_sym LT_PARAMS((lt_user_data loader_data,
lt_module handle,
const char *symbol));
typedef int lt_dlloader_exit LT_PARAMS((lt_user_data loader_data));
* NEWS: Updated. * doc/libtool.texi (Libltdl interface): Document new entry points. * libltdl/ltdl.c (lt_dltype_t): Use new type definitions for existing fields. (lt_dladdtype): New function to add a new ltdl dynamic loader type to the end of the list of valid types.. (lt_dlgettypes): New function to return the complete list of ltdl dynamic loader types. (lt_dlsettypes): New function to replace the list of ltdl dynamic loader types entirely -- e.g. to prepend a new type to the existing list. (sys_dl_open, sys_dl_close, sys_dl_sym): Work with lt_syshandle.. (sys_shl_open, sys_shl_close, sys_shl_sym): ditto. (sys_dld_open, sys_dld_close, sys_dld_sym): ditto. (sys_wll_open, sys_wll_close, sys_wll_sym): ditto. (sys_bedl_open, sys_bedl_close, sys_bedl_sym): ditto. (presym_open, presym_close, presym_sym): ditto. (tryall_dlopen): Call lt_lib_open_t functions lt_syshandle compatibly. (lt_dlclose): Call lt_lib_close_t functions lt_syshandle compatibly. (lt_dlsym): Call lt_find_sym_t functions lt_syshandle compatibly. (lt_dltype_t): moved type declaration from here... * libltdl/ltdl.h (lt_dltype_t): ...to here. (lt_syshandle): new type for low level system handles passed by loader functions (lt_mod_init_t): New type for functions implementing the initialisation for an ltdl dynamic loader. (lt_mod_exit_t): Type of exit functions for the same. (lt_lib_open_t): Type of loader functions for the same. (lt_lib_close_t): Type of unloader functions for the same. (lt_find_sym_t): Type of symbol resolver functions for the same.
2000-01-27 23:14:34 +08:00
struct lt_user_dlloader {
const char *sym_prefix;
lt_module_open *module_open;
lt_module_close *module_close;
lt_find_sym *find_sym;
lt_dlloader_exit *dlloader_exit;
lt_user_data dlloader_data;
};
* NEWS: updated. * doc/libtool.texi (Libltdl interface): Moved user defined module loader documentation from here... (Module loaders for libltdl) ...to here, and updated the text and added examples. * ltdl.m4 (AC_CHECK_FUNCS): check strcmp for lt_find_dlloader. * libltdl/ltdl.h: Reformatted and commented for readability. (struct lt_user_dlloader): New data type for passing initialisation pointers to lt_add_dlloader. (LTDL_ERROR_INVALID_LOADER): New error message when non loader handles are passed to the user loader API. (LTDL_ERROR_INIT_LOADER): New error when loader initialisation fails. (LTDL_ERROR_REMOVE_LOADER): New error when loader removal fails. (lt_module_open_t): renamed from lt_lib_open_t. (lt_module_close_t): renamed from lt_lib_close_t. (lt_dlloader_exit_t): renamed from lt_dlloader_exit_t. * libltdl/ltdl.c: Reordered builtin loaders so that the "dld" loader no longer occurs before "dlopen" on some platforms and after it on others. (lt_dlloader_t): Moved here from ltdl.h, added a field, "loader_name", for identifying the loader, and renamed from lt_dltype_t. Renamed type variables to loader IFF of type lt_dlloader_t. (lt_module_t): Renamed from lt_syshandle. Renamed handle variables to module IFF of type lt_module_t. (LTDL_TYPE_TOP): Deleted. No longer required. (sys_dl): Initialised as a struct lt_user_dlloader. (sys_dl_init): Deleted. No longer required. (sys_dl_exit): Ditto. (sys_shl): Initialised as a struct lt_user_dlloader. (sys_shl_init): Deleted. No longer required. (sys_shl_exit): Ditto. (sys_wll): Initialised as a struct lt_user_dlloader. (sys_wll_init): Deleted. No longer required. (sys_wll_exit): Ditto. (sys_bedl): Initialised as a struct lt_user_dlloader. (sys_bedl_init): Deleted. No longer required. (sys_bedl_exit): Ditto. (sys_dld): Initialised as a struct lt_user_dlloader. (sys_dld_init): Deleted. No longer required. (sys_dld_exit): Ditto. (sys_presym): Initialised as a struct lt_user_dlloader. (lt_mod_init_t): Moved to here from ltdl.h. (lt_dlinit): Add builtin loaders using the user loader API. (lt_dlexit): Unregister and free all loaders. (lt_add_dlloader): New function to add a new module loader after the loader specified in the argument. (lt_remove_dlloader): New function to remove a module loader. (lt_next_dlloader): New function for iterating over module loaders. (lt_dlloader_name): Accessor function for name of dlloader. (lt_find_dlloader): New function to get a reference to a registered module loader. (strcmp): static implementation incase the host has none. (lt_dlgettypes, lt_dlsettypes): Removed.
2000-02-03 06:43:14 +08:00
extern lt_dlloader *lt_dlloader_next LT_PARAMS((lt_dlloader *place));
extern lt_dlloader *lt_dlloader_find LT_PARAMS((
const char *loader_name));
extern const char *lt_dlloader_name LT_PARAMS((lt_dlloader *place));
extern lt_user_data *lt_dlloader_data LT_PARAMS((lt_dlloader *place));
extern int lt_dlloader_add LT_PARAMS((lt_dlloader *place,
const struct lt_user_dlloader *dlloader,
const char *loader_name));
extern int lt_dlloader_remove LT_PARAMS((
const char *loader_name));
* NEWS: updated. * doc/libtool.texi (Libltdl interface): Moved user defined module loader documentation from here... (Module loaders for libltdl) ...to here, and updated the text and added examples. * ltdl.m4 (AC_CHECK_FUNCS): check strcmp for lt_find_dlloader. * libltdl/ltdl.h: Reformatted and commented for readability. (struct lt_user_dlloader): New data type for passing initialisation pointers to lt_add_dlloader. (LTDL_ERROR_INVALID_LOADER): New error message when non loader handles are passed to the user loader API. (LTDL_ERROR_INIT_LOADER): New error when loader initialisation fails. (LTDL_ERROR_REMOVE_LOADER): New error when loader removal fails. (lt_module_open_t): renamed from lt_lib_open_t. (lt_module_close_t): renamed from lt_lib_close_t. (lt_dlloader_exit_t): renamed from lt_dlloader_exit_t. * libltdl/ltdl.c: Reordered builtin loaders so that the "dld" loader no longer occurs before "dlopen" on some platforms and after it on others. (lt_dlloader_t): Moved here from ltdl.h, added a field, "loader_name", for identifying the loader, and renamed from lt_dltype_t. Renamed type variables to loader IFF of type lt_dlloader_t. (lt_module_t): Renamed from lt_syshandle. Renamed handle variables to module IFF of type lt_module_t. (LTDL_TYPE_TOP): Deleted. No longer required. (sys_dl): Initialised as a struct lt_user_dlloader. (sys_dl_init): Deleted. No longer required. (sys_dl_exit): Ditto. (sys_shl): Initialised as a struct lt_user_dlloader. (sys_shl_init): Deleted. No longer required. (sys_shl_exit): Ditto. (sys_wll): Initialised as a struct lt_user_dlloader. (sys_wll_init): Deleted. No longer required. (sys_wll_exit): Ditto. (sys_bedl): Initialised as a struct lt_user_dlloader. (sys_bedl_init): Deleted. No longer required. (sys_bedl_exit): Ditto. (sys_dld): Initialised as a struct lt_user_dlloader. (sys_dld_init): Deleted. No longer required. (sys_dld_exit): Ditto. (sys_presym): Initialised as a struct lt_user_dlloader. (lt_mod_init_t): Moved to here from ltdl.h. (lt_dlinit): Add builtin loaders using the user loader API. (lt_dlexit): Unregister and free all loaders. (lt_add_dlloader): New function to add a new module loader after the loader specified in the argument. (lt_remove_dlloader): New function to remove a module loader. (lt_next_dlloader): New function for iterating over module loaders. (lt_dlloader_name): Accessor function for name of dlloader. (lt_find_dlloader): New function to get a reference to a registered module loader. (strcmp): static implementation incase the host has none. (lt_dlgettypes, lt_dlsettypes): Removed.
2000-02-03 06:43:14 +08:00
/* --- ERROR MESSAGE HANDLING --- */
1999-01-17 19:19:40 +08:00
/* Defining error strings alongside their symbolic names in a macro in
this way allows us to expand the macro in different contexts with
confidence that the enumeration of symbolic names will map correctly
onto the table of error strings. */
#define lt_dlerror_table \
LT_ERROR(UNKNOWN, "unknown error") \
LT_ERROR(DLOPEN_NOT_SUPPORTED, "dlopen support not available") \
LT_ERROR(INVALID_LOADER, "invalid loader") \
LT_ERROR(INIT_LOADER, "loader initialization failed") \
LT_ERROR(REMOVE_LOADER, "loader removal failed") \
LT_ERROR(FILE_NOT_FOUND, "file not found") \
LT_ERROR(DEPLIB_NOT_FOUND, "dependency library not found") \
LT_ERROR(NO_SYMBOLS, "no symbols defined") \
LT_ERROR(CANNOT_OPEN, "can't open the module") \
LT_ERROR(CANNOT_CLOSE, "can't close the module") \
LT_ERROR(SYMBOL_NOT_FOUND, "symbol not found") \
LT_ERROR(NO_MEMORY, "not enough memory") \
LT_ERROR(INVALID_HANDLE, "invalid module handle") \
LT_ERROR(BUFFER_OVERFLOW, "internal buffer overflow") \
LT_ERROR(INVALID_ERRORCODE, "invalid errorcode") \
LT_ERROR(SHUTDOWN, "library already shutdown")
/* Enumerate the symbolic error names. */
enum {
#define LT_ERROR(name, diagnostic) LT_CONC(LT_ERROR_, name),
lt_dlerror_table
#undef LT_ERROR
* NEWS: updated. * doc/libtool.texi (Libltdl interface): Moved user defined module loader documentation from here... (Module loaders for libltdl) ...to here, and updated the text and added examples. * ltdl.m4 (AC_CHECK_FUNCS): check strcmp for lt_find_dlloader. * libltdl/ltdl.h: Reformatted and commented for readability. (struct lt_user_dlloader): New data type for passing initialisation pointers to lt_add_dlloader. (LTDL_ERROR_INVALID_LOADER): New error message when non loader handles are passed to the user loader API. (LTDL_ERROR_INIT_LOADER): New error when loader initialisation fails. (LTDL_ERROR_REMOVE_LOADER): New error when loader removal fails. (lt_module_open_t): renamed from lt_lib_open_t. (lt_module_close_t): renamed from lt_lib_close_t. (lt_dlloader_exit_t): renamed from lt_dlloader_exit_t. * libltdl/ltdl.c: Reordered builtin loaders so that the "dld" loader no longer occurs before "dlopen" on some platforms and after it on others. (lt_dlloader_t): Moved here from ltdl.h, added a field, "loader_name", for identifying the loader, and renamed from lt_dltype_t. Renamed type variables to loader IFF of type lt_dlloader_t. (lt_module_t): Renamed from lt_syshandle. Renamed handle variables to module IFF of type lt_module_t. (LTDL_TYPE_TOP): Deleted. No longer required. (sys_dl): Initialised as a struct lt_user_dlloader. (sys_dl_init): Deleted. No longer required. (sys_dl_exit): Ditto. (sys_shl): Initialised as a struct lt_user_dlloader. (sys_shl_init): Deleted. No longer required. (sys_shl_exit): Ditto. (sys_wll): Initialised as a struct lt_user_dlloader. (sys_wll_init): Deleted. No longer required. (sys_wll_exit): Ditto. (sys_bedl): Initialised as a struct lt_user_dlloader. (sys_bedl_init): Deleted. No longer required. (sys_bedl_exit): Ditto. (sys_dld): Initialised as a struct lt_user_dlloader. (sys_dld_init): Deleted. No longer required. (sys_dld_exit): Ditto. (sys_presym): Initialised as a struct lt_user_dlloader. (lt_mod_init_t): Moved to here from ltdl.h. (lt_dlinit): Add builtin loaders using the user loader API. (lt_dlexit): Unregister and free all loaders. (lt_add_dlloader): New function to add a new module loader after the loader specified in the argument. (lt_remove_dlloader): New function to remove a module loader. (lt_next_dlloader): New function for iterating over module loaders. (lt_dlloader_name): Accessor function for name of dlloader. (lt_find_dlloader): New function to get a reference to a registered module loader. (strcmp): static implementation incase the host has none. (lt_dlgettypes, lt_dlsettypes): Removed.
2000-02-03 06:43:14 +08:00
LT_ERROR_MAX
* NEWS: updated. * doc/libtool.texi (Libltdl interface): Moved user defined module loader documentation from here... (Module loaders for libltdl) ...to here, and updated the text and added examples. * ltdl.m4 (AC_CHECK_FUNCS): check strcmp for lt_find_dlloader. * libltdl/ltdl.h: Reformatted and commented for readability. (struct lt_user_dlloader): New data type for passing initialisation pointers to lt_add_dlloader. (LTDL_ERROR_INVALID_LOADER): New error message when non loader handles are passed to the user loader API. (LTDL_ERROR_INIT_LOADER): New error when loader initialisation fails. (LTDL_ERROR_REMOVE_LOADER): New error when loader removal fails. (lt_module_open_t): renamed from lt_lib_open_t. (lt_module_close_t): renamed from lt_lib_close_t. (lt_dlloader_exit_t): renamed from lt_dlloader_exit_t. * libltdl/ltdl.c: Reordered builtin loaders so that the "dld" loader no longer occurs before "dlopen" on some platforms and after it on others. (lt_dlloader_t): Moved here from ltdl.h, added a field, "loader_name", for identifying the loader, and renamed from lt_dltype_t. Renamed type variables to loader IFF of type lt_dlloader_t. (lt_module_t): Renamed from lt_syshandle. Renamed handle variables to module IFF of type lt_module_t. (LTDL_TYPE_TOP): Deleted. No longer required. (sys_dl): Initialised as a struct lt_user_dlloader. (sys_dl_init): Deleted. No longer required. (sys_dl_exit): Ditto. (sys_shl): Initialised as a struct lt_user_dlloader. (sys_shl_init): Deleted. No longer required. (sys_shl_exit): Ditto. (sys_wll): Initialised as a struct lt_user_dlloader. (sys_wll_init): Deleted. No longer required. (sys_wll_exit): Ditto. (sys_bedl): Initialised as a struct lt_user_dlloader. (sys_bedl_init): Deleted. No longer required. (sys_bedl_exit): Ditto. (sys_dld): Initialised as a struct lt_user_dlloader. (sys_dld_init): Deleted. No longer required. (sys_dld_exit): Ditto. (sys_presym): Initialised as a struct lt_user_dlloader. (lt_mod_init_t): Moved to here from ltdl.h. (lt_dlinit): Add builtin loaders using the user loader API. (lt_dlexit): Unregister and free all loaders. (lt_add_dlloader): New function to add a new module loader after the loader specified in the argument. (lt_remove_dlloader): New function to remove a module loader. (lt_next_dlloader): New function for iterating over module loaders. (lt_dlloader_name): Accessor function for name of dlloader. (lt_find_dlloader): New function to get a reference to a registered module loader. (strcmp): static implementation incase the host has none. (lt_dlgettypes, lt_dlsettypes): Removed.
2000-02-03 06:43:14 +08:00
};
/* These functions are only useful from inside custom module loaders. */
extern int lt_dladderror LT_PARAMS((const char *diagnostic));
extern int lt_dlseterror LT_PARAMS((int errorcode));
* NEWS: updated. * doc/libtool.texi (Libltdl interface): Moved user defined module loader documentation from here... (Module loaders for libltdl) ...to here, and updated the text and added examples. * ltdl.m4 (AC_CHECK_FUNCS): check strcmp for lt_find_dlloader. * libltdl/ltdl.h: Reformatted and commented for readability. (struct lt_user_dlloader): New data type for passing initialisation pointers to lt_add_dlloader. (LTDL_ERROR_INVALID_LOADER): New error message when non loader handles are passed to the user loader API. (LTDL_ERROR_INIT_LOADER): New error when loader initialisation fails. (LTDL_ERROR_REMOVE_LOADER): New error when loader removal fails. (lt_module_open_t): renamed from lt_lib_open_t. (lt_module_close_t): renamed from lt_lib_close_t. (lt_dlloader_exit_t): renamed from lt_dlloader_exit_t. * libltdl/ltdl.c: Reordered builtin loaders so that the "dld" loader no longer occurs before "dlopen" on some platforms and after it on others. (lt_dlloader_t): Moved here from ltdl.h, added a field, "loader_name", for identifying the loader, and renamed from lt_dltype_t. Renamed type variables to loader IFF of type lt_dlloader_t. (lt_module_t): Renamed from lt_syshandle. Renamed handle variables to module IFF of type lt_module_t. (LTDL_TYPE_TOP): Deleted. No longer required. (sys_dl): Initialised as a struct lt_user_dlloader. (sys_dl_init): Deleted. No longer required. (sys_dl_exit): Ditto. (sys_shl): Initialised as a struct lt_user_dlloader. (sys_shl_init): Deleted. No longer required. (sys_shl_exit): Ditto. (sys_wll): Initialised as a struct lt_user_dlloader. (sys_wll_init): Deleted. No longer required. (sys_wll_exit): Ditto. (sys_bedl): Initialised as a struct lt_user_dlloader. (sys_bedl_init): Deleted. No longer required. (sys_bedl_exit): Ditto. (sys_dld): Initialised as a struct lt_user_dlloader. (sys_dld_init): Deleted. No longer required. (sys_dld_exit): Ditto. (sys_presym): Initialised as a struct lt_user_dlloader. (lt_mod_init_t): Moved to here from ltdl.h. (lt_dlinit): Add builtin loaders using the user loader API. (lt_dlexit): Unregister and free all loaders. (lt_add_dlloader): New function to add a new module loader after the loader specified in the argument. (lt_remove_dlloader): New function to remove a module loader. (lt_next_dlloader): New function for iterating over module loaders. (lt_dlloader_name): Accessor function for name of dlloader. (lt_find_dlloader): New function to get a reference to a registered module loader. (strcmp): static implementation incase the host has none. (lt_dlgettypes, lt_dlsettypes): Removed.
2000-02-03 06:43:14 +08:00
#ifdef LT_NON_POSIX_NAMESPACE
# define lt_ptr_t lt_ptr
# define lt_module_t lt_module
# define lt_module_open_t lt_module_open
# define lt_module_close_t lt_module_close
# define lt_find_sym_t lt_find_sym
# define lt_dlloader_exit_t lt_dlloader_exit
# define lt_dlloader_t lt_dlloader
# define lt_dlloader_data_t lt_user_data
#endif
LT_END_C_DECLS
1998-11-04 Alexandre Oliva <oliva@dcc.unicamp.br> * ltconfig.in, ltmain.in: updated and fixed the patches below 1998-11-04 Thomas Tanner <tanner@gmx.de> * mdemo/*: added new demo to demonstrate building of dlopenend modules * tests/Makefile.am, tests/mdemo*: added some tests for mdemo 1998-11-04 Gary V. Vaughan <gvaughan@oranda.demon.co.uk> * demo/configure.in: added AC_EXEEXT macro so that the tests can work on cywin32/mingw32 hosts. This requires the current CVS autoconf 1998-11-04 Thomas Tanner <tanner@gmx.de> * ltmain.in: New flag -export-symbols; new dlpreopen system * demo/dlmain.c: removed dld_preloaded_symbol_count 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltmain.in: On installation, don't get confused if the same name appears more than once in the list of library names. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add objext and libext variables. Check for object suffix. Check for mingw32* as well as cygwin32*. Use objext when testing compiler. Add support for Visual C++ on cygwin32 when not using gcc. Add objext, libext, and fix_srcfile_path to generated libtool script. * ltmain.in: Use .${objext} rather than .o. Use fix_srcfile_path if it is set. Check for .obj as well as for .o, and for .lib as well as for .a. Use .${libext} rather than .a when creating old libraries. * libtoolize.in: Change initial /bin/sh to @SHELL@. * libtool.m4 (AM_PROG_LIBTOOL): Add AC_REQUIRE for AC_CANONICAL_BUILD, so that autoconf doesn't get mixed up by the AC_REQUIRE in AC_CHECK_TOOL. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Look in the right directory for libtool.c in archive_cmds for cygwin32. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Fix cygwin32 support to avoid using a double extension, to delete the def file, to set version_type to windows, and to include versuffix in the DLL name. * ltmain.in: Add support for a version_type of windows. 1998-11-04 Ian Lance Taylor <ian@cygnus.com> * ltconfig.in: Add cygwin32 support. * libtool.m4 (AM_PROG_LIBTOOL): Call AM_SYS_LIBTOOL_CYGWIN32 on a cygwin32 host. Pass DLLTOOL and AS to ltconfig. (AM_SYS_LIBTOOL_CYGWIN32): New macro.
1998-11-04 17:43:29 +08:00
#endif /* !LTDL_H */