~ubuntu-branches/ubuntu/natty/postgresql-8.4/natty-updates

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-03-20 12:00:13 UTC
  • Revision ID: james.westby@ubuntu.com-20090320120013-hogj7egc5mjncc5g
Tags: upstream-8.4~0cvs20090328
ImportĀ upstreamĀ versionĀ 8.4~0cvs20090328

Show diffs side-by-side

added added

removed removed

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