1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-09 22:41:56 +03:00

Move more to dynloader subdir

This commit is contained in:
Marc G. Fournier
1997-12-20 04:48:11 +00:00
parent 44be631dd8
commit 1783963cab
5 changed files with 3 additions and 50 deletions

View File

@ -1,59 +0,0 @@
/*-------------------------------------------------------------------------
*
* dynloader.c--
* dynamic loader for HP-UX using the shared library mechanism
*
* Copyright (c) 1994, Regents of the University of California
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/hpux/Attic/dynloader.c,v 1.3 1997/09/08 02:26:15 momjian Exp $
*
* NOTES
* all functions are defined here -- it's impossible to trace the
* shl_* routines from the bundled HP-UX debugger.
*
*-------------------------------------------------------------------------
*/
/* System includes */
#include <stdio.h>
#include <a.out.h>
#include <dl.h>
#include "c.h"
#include "fmgr.h"
#include "utils/dynamic_loader.h"
#include "port-protos.h"
void *
pg_dlopen(char *filename)
{
shl_t handle = shl_load(filename, BIND_DEFERRED, 0);
return ((void *) handle);
}
func_ptr
pg_dlsym(void *handle, char *funcname)
{
func_ptr f;
if (shl_findsym((shl_t *) & handle, funcname, TYPE_PROCEDURE, &f) == -1)
{
f = (func_ptr) NULL;
}
return (f);
}
void
pg_dlclose(void *handle)
{
shl_unload((shl_t) handle);
}
char *
pg_dlerror()
{
static char errmsg[] = "shl_load failed";
return errmsg;
}