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

« back to all changes in this revision

Viewing changes to src/backend/port/dynloader/cygwin.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
 * Dynamic loader declarations for Cygwin
 
4
 *
 
5
 * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
 
6
 * Portions Copyright (c) 1994, Regents of the University of California
 
7
 *
 
8
 * $PostgreSQL$
 
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
 * In some older systems, the RTLD_NOW flag isn't defined and the mode
 
20
 * argument to dlopen must always be 1.  The RTLD_GLOBAL flag is wanted
 
21
 * if available, but it doesn't exist everywhere.
 
22
 * If it doesn't exist, set it to 0 so it has no effect.
 
23
 */
 
24
#ifndef RTLD_NOW
 
25
#define RTLD_NOW 1
 
26
#endif
 
27
#ifndef RTLD_GLOBAL
 
28
#define RTLD_GLOBAL 0
 
29
#endif
 
30
 
 
31
#define pg_dlopen(f)    dlopen((f), RTLD_NOW | RTLD_GLOBAL)
 
32
#define pg_dlsym                dlsym
 
33
#define pg_dlclose              dlclose
 
34
#define pg_dlerror              dlerror
 
35
 
 
36
#endif   /* PORT_PROTOS_H */