~vcs-imports/mammoth-replicator/trunk

« back to all changes in this revision

Viewing changes to src/backend/port/dynloader/aix.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
 * $PostgreSQL: pgsql/src/backend/port/dynloader/aix.h,v 1.12 2003-11-29 22:39:51 pgsql Exp $
 
3
 *
 
4
 * @(#)dlfcn.h  1.4 revision of 95/04/25  09:36:52
 
5
 * This is an unpublished work copyright (c) 1992 HELIOS Software GmbH
 
6
 * 30159 Hannover, Germany
 
7
 */
 
8
 
 
9
#ifndef PORT_PROTOS_H
 
10
#define PORT_PROTOS_H
 
11
 
 
12
#ifdef HAVE_DLOPEN
 
13
 
 
14
#include <dlfcn.h>
 
15
 
 
16
#else                                                   /* HAVE_DLOPEN */
 
17
 
 
18
#ifdef __cplusplus
 
19
extern          "C"
 
20
{
 
21
#endif
 
22
 
 
23
/*
 
24
 * Mode flags for the dlopen routine.
 
25
 */
 
26
#define RTLD_LAZY               1               /* lazy function call binding */
 
27
#define RTLD_NOW                2               /* immediate function call binding */
 
28
#define RTLD_GLOBAL             0x100   /* allow symbols to be global */
 
29
 
 
30
/*
 
31
 * To be able to intialize, a library may provide a dl_info structure
 
32
 * that contains functions to be called to initialize and terminate.
 
33
 */
 
34
struct dl_info
 
35
{
 
36
        void            (*init) (void);
 
37
        void            (*fini) (void);
 
38
};
 
39
 
 
40
#if __STDC__ || defined(_IBMR2)
 
41
void       *dlopen(const char *path, int mode);
 
42
void       *dlsym(void *handle, const char *symbol);
 
43
char       *dlerror(void);
 
44
int                     dlclose(void *handle);
 
45
 
 
46
#else
 
47
void       *dlopen();
 
48
void       *dlsym();
 
49
char       *dlerror();
 
50
int                     dlclose();
 
51
#endif
 
52
 
 
53
#ifdef __cplusplus
 
54
}
 
55
#endif
 
56
#endif   /* HAVE_DLOPEN */
 
57
 
 
58
#include "utils/dynamic_loader.h"
 
59
 
 
60
#define  pg_dlopen(f)   dlopen((f), RTLD_NOW | RTLD_GLOBAL)
 
61
#define  pg_dlsym       dlsym
 
62
#define  pg_dlclose dlclose
 
63
#define  pg_dlerror dlerror
 
64
 
 
65
#endif   /* PORT_PROTOS_H */