Header And Logo

PostgreSQL
| The world's most advanced open source database.

Functions

hpux.c File Reference

#include "postgres.h"
#include <a.out.h>
#include <dl.h>
#include "dynloader.h"
#include "utils/dynamic_loader.h"
Include dependency graph for hpux.c:

Go to the source code of this file.

Functions

void * pg_dlopen (char *filename)
PGFunction pg_dlsym (void *handle, char *funcname)
void pg_dlclose (void *handle)
char * pg_dlerror (void)

Function Documentation

void pg_dlclose ( void *  handle  ) 

Definition at line 54 of file hpux.c.

{
    shl_unload((shl_t) handle);
}

char* pg_dlerror ( void   ) 

Definition at line 60 of file hpux.c.

References errmsg(), and strerror().

{
    static char errmsg[] = "shl_load failed";

    if (errno)
        return strerror(errno);

    return errmsg;
}

void* pg_dlopen ( char *  filename  ) 

Definition at line 29 of file hpux.c.

{
    /*
     * Use BIND_IMMEDIATE so that undefined symbols cause a failure return
     * from shl_load(), rather than an abort() later on when we attempt to
     * call the library!
     */
    shl_t       handle = shl_load(filename,
                                BIND_IMMEDIATE | BIND_VERBOSE | DYNAMIC_PATH,
                                  0L);

    return (void *) handle;
}

PGFunction pg_dlsym ( void *  handle,
char *  funcname 
)

Definition at line 44 of file hpux.c.

References NULL.

{
    PGFunction  f;

    if (shl_findsym((shl_t *) & handle, funcname, TYPE_PROCEDURE, &f) == -1)
        f = (PGFunction) NULL;
    return f;
}