head	1.3;
access;
symbols
	release_4_2:1.3
	aix_ok:1.2;
locks; strict;
comment	@ * @;


1.3
date	94.02.07.11.40.58;	author aoki;	state Exp;
branches;
next	1.2;

1.2
date	93.08.04.23.31.10;	author aoki;	state Exp;
branches;
next	1.1;

1.1
date	93.07.29.01.26.26;	author andrew;	state Exp;
branches;
next	;


desc
@Dynamic loader for alpha
@


1.3
log
@proto fixes
@
text
@
/*
 *  $Header: /faerie/aoki/postgres/src/backend/port/alpha/RCS/dynloader.c,v 1.2 1993/08/04 23:31:10 aoki Exp aoki $
 */

#include <stdio.h>
#include <dlfcn.h>

#include "tmp/postgres.h"
#include "fmgr.h"			/* for func_ptr */
#include "utils/dynamic_loader.h"	/* for protos */
#include "port-protos.h"		/* for #define'd pg_dl* */

/*
 * Dynamic Loader on Alpha OSF/1.x
 *
 * this dynamic loader uses the system dynamic loading interface for shared 
 * libraries (ie. dlopen/dlsym/dlclose). The user must specify a shared
 * library as the file to be dynamically loaded.
 *
 * Note that only pg_dlopen is defined here. pg_dlsym and pg_dlclose
 * are actually macros.
 */

/*
 * pg_dlopen--
 *    attempts to dynamically loaded in filename and returns error in
 *    err, if any. 
 */
void *pg_dlopen( filename, err )
     char *filename; char **err;
{
    void *handle= NULL;

    if ((handle=dlopen(filename, RTLD_LAZY))==NULL) {
	*err = dlerror();
    }
    return (void *)handle;
}

@


1.2
log
@added some missing #includes
@
text
@d3 1
a3 1
 *  $Header: /home2/aoki/master/src/backend/port/alpha/RCS/dynloader.c,v 1.1 1993/07/29 01:26:26 andrew Exp aoki $
d9 1
@


1.1
log
@Initial revision
@
text
@d3 1
a3 1
 *  $Header: /private/src/postgres/src/backend/port/ultrix4/RCS/dynloader.c,v 1.29 1993/07/29 00:02:51 andrew Exp $
d9 3
a11 1
#include "port-protos.h"
@
