Annotation of sql/pgsql/libltdl/ltdl.h, revision 1.1
1.1 ! parser 1: /* ltdl.h -- generic dlopen functions
! 2: Copyright (C) 1998-1999 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 Library 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 Library General Public License,
! 12: if you distribute this file as part of a program that uses GNU libtool
! 13: to create libraries and programs, 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: Library General Public License for more details.
! 20:
! 21: You should have received a copy of the GNU Library General Public
! 22: License along with this library; if not, write to the Free
! 23: Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
! 24: 02111-1307 USA
! 25: */
! 26:
! 27: /* Only include this header file once. */
! 28: #ifndef _LTDL_H_
! 29: #define _LTDL_H_ 1
! 30:
! 31: /* __BEGIN_DECLS should be used at the beginning of your declarations,
! 32: so that C++ compilers don't mangle their names. Use __END_DECLS at
! 33: the end of C declarations. */
! 34: #undef __BEGIN_DECLS
! 35: #undef __END_DECLS
! 36: #ifdef __cplusplus
! 37: # define __BEGIN_DECLS extern "C" {
! 38: # define __END_DECLS }
! 39: #else
! 40: # define __BEGIN_DECLS /* empty */
! 41: # define __END_DECLS /* empty */
! 42: #endif
! 43:
! 44: /* LTDL_PARAMS is a macro used to wrap function prototypes, so that compilers
! 45: that don't understand ANSI C prototypes still work, and ANSI C
! 46: compilers can issue warnings about type mismatches. */
! 47: #undef LTDL_PARAMS
! 48: #undef lt_ptr_t
! 49: #if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(WIN32) || defined(__cplusplus)
! 50: # define LTDL_PARAMS(protos) protos
! 51: # define lt_ptr_t void*
! 52: #else
! 53: # define LTDL_PARAMS(protos) ()
! 54: # ifdef _MSC_VER
! 55: # define lt_ptr_t void*
! 56: # else
! 57: # define lt_ptr_t char*
! 58: # endif
! 59: #endif
! 60:
! 61: #include <stdlib.h>
! 62:
! 63: #ifdef _LTDL_COMPILE_
! 64: typedef struct lt_dlhandle_t *lt_dlhandle;
! 65: #else
! 66: typedef lt_ptr_t lt_dlhandle;
! 67: #endif
! 68:
! 69: typedef struct {
! 70: const char *name;
! 71: lt_ptr_t address;
! 72: } lt_dlsymlist;
! 73:
! 74: __BEGIN_DECLS
! 75: extern int lt_dlinit LTDL_PARAMS((void));
! 76: extern int lt_dlpreload LTDL_PARAMS((const lt_dlsymlist *preloaded));
! 77: extern int lt_dlpreload_default LTDL_PARAMS((const lt_dlsymlist *preloaded));
! 78: extern int lt_dlexit LTDL_PARAMS((void));
! 79: extern lt_dlhandle lt_dlopen LTDL_PARAMS((const char *filename));
! 80: extern lt_dlhandle lt_dlopenext LTDL_PARAMS((const char *filename));
! 81: extern int lt_dlclose LTDL_PARAMS((lt_dlhandle handle));
! 82: extern lt_ptr_t lt_dlsym LTDL_PARAMS((lt_dlhandle handle, const char *name));
! 83: extern const char *lt_dlerror LTDL_PARAMS((void));
! 84: extern int lt_dladdsearchdir LTDL_PARAMS((const char *search_dir));
! 85: extern int lt_dlsetsearchpath LTDL_PARAMS((const char *search_path));
! 86: extern const char *lt_dlgetsearchpath LTDL_PARAMS((void));
! 87:
! 88: extern const lt_dlsymlist lt_preloaded_symbols[];
! 89: #define LTDL_SET_PRELOADED_SYMBOLS() lt_dlpreload_default(lt_preloaded_symbols)
! 90:
! 91: extern lt_ptr_t (*lt_dlmalloc)LTDL_PARAMS((size_t size));
! 92: extern void (*lt_dlfree)LTDL_PARAMS((lt_ptr_t ptr));
! 93:
! 94: __END_DECLS
! 95:
! 96: #endif /* !_LTDL_H_ */
E-mail: