~vcs-imports/mammoth-replicator/trunk

« back to all changes in this revision

Viewing changes to src/backend/port/dynloader/dgux.h

  • Committer: alvherre
  • Date: 2005-12-16 21:24:52 UTC
  • Revision ID: svn-v4:db760fc0-0f08-0410-9d63-cc6633f64896:trunk:1
Initial import of the REL8_0_3 sources from the Pgsql CVS repository.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*-------------------------------------------------------------------------
 
2
 *
 
3
 * dgux.h
 
4
 *
 
5
 * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
 
6
 * Portions Copyright (c) 1994, Regents of the University of California
 
7
 *
 
8
 * $PostgreSQL: pgsql/src/backend/port/dynloader/dgux.h,v 1.19 2004-12-31 22:00:32 pgsql Exp $
 
9
 *
 
10
 *-------------------------------------------------------------------------
 
11
 */
 
12
#ifndef PORT_PROTOS_H
 
13
#define PORT_PROTOS_H
 
14
 
 
15
#include <dlfcn.h>
 
16
#include "utils/dynamic_loader.h"
 
17
 
 
18
/*
 
19
 * Dynamic Loader on DG/UX.
 
20
 *
 
21
 * this dynamic loader uses the system dynamic loading interface for shared
 
22
 * libraries (ie. dlopen/dlsym/dlclose). The user must specify a shared
 
23
 * library as the file to be dynamically loaded.
 
24
 */
 
25
 
 
26
/*
 
27
 * In some older systems, the RTLD_NOW flag isn't defined and the mode
 
28
 * argument to dlopen must always be 1.  The RTLD_GLOBAL flag is wanted
 
29
 * if available, but it doesn't exist everywhere.
 
30
 * If it doesn't exist, set it to 0 so it has no effect.
 
31
 */
 
32
#ifndef RTLD_NOW
 
33
#define RTLD_NOW 1
 
34
#endif
 
35
#ifndef RTLD_GLOBAL
 
36
#define RTLD_GLOBAL 0
 
37
#endif
 
38
 
 
39
#define pg_dlopen(f)    dlopen((f), RTLD_NOW | RTLD_GLOBAL)
 
40
#define pg_dlsym                dlsym
 
41
#define pg_dlclose              dlclose
 
42
#define pg_dlerror              dlerror
 
43
 
 
44
#endif   /* PORT_PROTOS_H */