OSDN Git Service

Update copyright for 2009.
[pg-rex/syncrep.git] / src / backend / port / dynloader / sco.h
1 /*-------------------------------------------------------------------------
2  *
3  * sco.h
4  *        port-specific prototypes for SCO 3.2v5.2
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: pgsql/src/backend/port/dynloader/sco.h,v 1.21 2009/01/01 17:23:46 momjian Exp $
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef PORT_PROTOS_H
15 #define PORT_PROTOS_H
16
17 #include <dlfcn.h>
18 #include "utils/dynamic_loader.h"
19
20 /*
21  * Dynamic Loader on SCO 3.2v5.0.2
22  *
23  * this dynamic loader uses the system dynamic loading interface for shared
24  * libraries (ie. dlopen/dlsym/dlclose). The user must specify a shared
25  * library as the file to be dynamically loaded.
26  */
27
28 /*
29  * In some older systems, the RTLD_NOW flag isn't defined and the mode
30  * argument to dlopen must always be 1.  The RTLD_GLOBAL flag is wanted
31  * if available, but it doesn't exist everywhere.
32  * If it doesn't exist, set it to 0 so it has no effect.
33  */
34 #ifndef RTLD_NOW
35 #define RTLD_NOW 1
36 #endif
37 #ifndef RTLD_GLOBAL
38 #define RTLD_GLOBAL 0
39 #endif
40
41 #define pg_dlopen(f)    dlopen((f), RTLD_NOW | RTLD_GLOBAL)
42 #define pg_dlsym                dlsym
43 #define pg_dlclose              dlclose
44 #define pg_dlerror              dlerror
45
46 #endif   /* PORT_PROTOS_H */