1996-08-28 03:59:28 +02:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
|
|
|
* dynamic_loader.h--
|
1997-09-07 07:04:48 +02:00
|
|
|
*
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
|
|
|
*
|
|
|
|
* Copyright (c) 1994, Regents of the University of California
|
|
|
|
*
|
1997-09-07 07:04:48 +02:00
|
|
|
* $Id: dynamic_loader.h,v 1.6 1997/09/07 05:02:22 momjian Exp $
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
#ifndef DYNAMIC_LOADER_H
|
|
|
|
#define DYNAMIC_LOADER_H
|
|
|
|
|
1996-11-04 09:14:05 +01:00
|
|
|
#include <sys/types.h>
|
1997-09-07 07:04:48 +02:00
|
|
|
#include <sys/param.h> /* For MAXPATHLEN */
|
1996-11-04 09:14:05 +01:00
|
|
|
|
1996-11-26 04:20:35 +01:00
|
|
|
#include <postgres.h>
|
|
|
|
|
1996-08-28 03:59:28 +02:00
|
|
|
#ifdef MIN
|
|
|
|
#undef MIN
|
|
|
|
#undef MAX
|
1997-09-07 07:04:48 +02:00
|
|
|
#endif /* MIN */
|
1996-08-28 03:59:28 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* List of dynamically loaded files.
|
|
|
|
*/
|
|
|
|
|
1997-09-07 07:04:48 +02:00
|
|
|
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;
|
1996-08-28 03:59:28 +02:00
|
|
|
|
1997-09-07 07:04:48 +02:00
|
|
|
extern void *pg_dlopen(char *filename);
|
1996-08-28 03:59:28 +02:00
|
|
|
extern func_ptr pg_dlsym(void *handle, char *funcname);
|
1997-09-07 07:04:48 +02:00
|
|
|
extern void pg_dlclose(void *handle);
|
|
|
|
extern char *pg_dlerror(void);
|
1996-08-28 03:59:28 +02:00
|
|
|
|
1997-09-07 07:04:48 +02:00
|
|
|
#endif /* DYNAMIC_LOADER_H */
|