head	1.10;
access;
symbols
	release_4_2:1.10
	aix_ok:1.10
	Version_2_1:1.5
	Version_2:1.1;
locks; strict;
comment	@ * @;


1.10
date	93.07.29.00.16.25;	author andrew;	state Exp;
branches;
next	1.9;

1.9
date	93.06.24.04.05.16;	author aoki;	state Exp;
branches;
next	1.8;

1.8
date	93.06.03.23.50.13;	author andrew;	state Exp;
branches;
next	1.7;

1.7
date	92.01.13.02.23.22;	author mao;	state Exp;
branches;
next	1.6;

1.6
date	91.12.15.02.00.52;	author glass;	state Exp;
branches;
next	1.5;

1.5
date	90.10.25.02.40.41;	author kemnitz;	state Exp;
branches;
next	1.4;

1.4
date	90.10.22.19.25.36;	author kemnitz;	state Exp;
branches;
next	1.3;

1.3
date	90.10.12.21.49.37;	author kemnitz;	state Exp;
branches;
next	1.2;

1.2
date	90.08.17.08.54.07;	author cimarron;	state Exp;
branches;
next	1.1;

1.1
date	89.09.17.23.26.50;	author dillon;	state Version_2;
branches;
next	;


desc
@Used to be local to utils/fmgr, but now that the dynamic_loader
is spread out in the port directories ...

This is a common .h file
@


1.10
log
@dynloader interface restructured. (Gotten rid of the HPUX ifdef's)
DynamicFileList now has a "handle" field used by the pg_dl* layer.
(The pg_dl* layer consists of pg_dlopen for opening a file,
pg_dlsym for retrieving a symbol and pg_dlclose for closing a file.)
@
text
@/*
 *	DYNAMIC_LOADER.H
 *
 *	$Header: /private/src/postgres/src/backend/utils/RCS/dynamic_loader.h,v 1.9 1993/06/24 04:05:16 aoki Exp andrew $
 */

#ifndef Dynamic_loaderHIncluded
#define Dynamic_loaderHIncluded 1 /* include once only */

#ifdef MIN
#undef MIN
#undef MAX
#endif /* MIN */

#include <sys/param.h>			/* for MAXPATHLEN */
#include <sys/types.h>			/* for dev_t, ino_t, etc. */

typedef struct {
    func_ptr    func;
    char        *name;
} FList;

extern FList ExtSyms[];

/*
 * The new dynamic loader scheme loads each file one at a time.  Therefore,
 * we must note each function in the file at load time.
 *
 */


/*
 * Dynamically loaded function list. 
 */

typedef struct df_list {
    char *funcname;			/* Name of function */
    func_ptr func;			/* Function address */
    struct df_list *next;
} DynamicFunctionList;


/*
 * List of dynamically loaded files.
 */

typedef struct df_files {
    char filename[MAXPATHLEN];		/* Full pathname of file */
    dev_t device;			/* Device file is on */
    ino_t inode;			/* Inode number of file */
    void *handle;			/* a handle for pg_dl* functions */
    struct df_files *next;
} DynamicFileList;

void *pg_dlopen ARGS((char *filename, char **errmsg));
func_ptr pg_dlsym  ARGS((void *handle, char *funcname));
void pg_dlclose ARGS((void *handle));

#endif Dynamic_loaderHIncluded
@


1.9
log
@added (conditional) fields for hpux shlib handles
@
text
@d4 1
a4 1
 *	$Header: /private/src/postgres/src/backend/utils/RCS/dynamic_loader.h,v 1.8 1993/06/03 23:50:13 andrew Exp $
a16 3
#ifdef PORTNAME_hpux
#include <dl.h>				/* for shl_t */
#endif /* PORTNAME_hpux */
d31 1
d33 1
a33 1
 * Dynamically loaded function list.
d42 1
d51 1
a51 3
    DynamicFunctionList *func_list;	/* List of functions */
    char *address;			/* Memory allocated for file */
    long size;				/* Size of memory allocated for file */
a52 4
#ifdef PORTNAME_hpux
    shl_t handle;			/* Handle for shared library */
    char shlib[MAXPATHLEN];		/* File of dynamic loader */
#endif /* PORTNAME_hpux */
d55 4
@


1.8
log
@handles funcname longer than 16 chars
@
text
@a0 1

d4 1
a4 1
 *	$Header: /private/src/postgres/src/backend/utils/RCS/dynamic_loader.h,v 1.7 1992/01/13 02:23:22 mao Exp andrew $
d10 10
a19 4
#include <sys/types.h>


func_ptr	dynamic_load();
d38 3
a40 4
typedef struct df_list
{
    char *funcname;				/* Name of function */
    func_ptr func;					/* Function address */
d42 1
a42 2
}
DynamicFunctionList;
d48 4
a51 5
typedef struct df_files
{
    char filename[256];				/* Full pathname of file */
	dev_t device;					/* Device file is on */
	ino_t inode;					/* Inode number of file */
d53 2
a54 2
	char *address;					/* Memory allocated for file */
	long size;						/* Size of memory allocated for file */
d56 5
a60 2
}
DynamicFileList;
@


1.7
log
@flatten include file graph
@
text
@d5 1
a5 1
 *	$Header: /n/hermes/usr5/postgres/mao/postgres/src/lib/H/utils/RCS/dynamic_loader.h,v 1.6 1991/12/15 02:00:52 glass Exp mao $
d35 1
a35 1
    char funcname[16];				/* Name of function */
@


1.6
log
@fmgr cleanups
@
text
@d5 1
a5 1
 *	$Header: lib/H/utils/RCS/dynamic_loader.h,v 1.5 90/10/25 02:40:41 kemnitz Exp Locker: glass $
d10 2
@


1.5
log
@New fields added to support file uniqueness guarantee.
@
text
@d5 1
a5 1
 *	$Header: src/lib/H/utils/RCS/dynamic_loader.h,v 1.4 90/10/22 19:25:36 kemnitz Exp Locker: kemnitz $
a10 1
typedef char *	((*func_ptr)());
@


1.4
log
@Added new fields to structs used to maintain the loader function table.
@
text
@d5 1
a5 1
 *	$Header: RCS/dynamic_loader.h,v 1.3 90/10/12 21:49:37 kemnitz Exp Locker: kemnitz $
d47 2
@


1.3
log
@Added new structs used by dfmgr and the new dynamic loader.
@
text
@d5 1
a5 1
 *	$Header: RCS/dynamic_loader.h,v 1.2 90/08/17 08:54:07 cimarron Exp Locker: kemnitz $
a10 2
#include "tmp/c.h"

d48 2
@


1.2
log
@added pathnames to #include statements
@
text
@d5 1
a5 1
 *	$Header: RCS/dynamic_loader.h,v 1.1 89/09/17 23:26:50 dillon Version_2 Locker: cimarron $
d23 30
@


1.1
log
@Initial revision
@
text
@d5 1
a5 1
 *	$Header: RCS/dynamic_loader.h,v 1.2 89/09/06 17:14:26 dillon Exp Locker: dillon $
d8 2
a9 3
#ifndef CIncluded
#include "c.h"
#endif
d11 2
d24 1
@
