Header And Logo

PostgreSQL
| The world's most advanced open source database.

unixware.h

Go to the documentation of this file.
00001 /*
00002  * src/backend/port/dynloader/unixware.h
00003  *
00004  *-------------------------------------------------------------------------
00005  *
00006  * unixware.h
00007  *    port-specific prototypes for Intel x86/UNIXWARE 7
00008  *
00009  *
00010  * Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group
00011  * Portions Copyright (c) 1994, Regents of the University of California
00012  *
00013  * unixware.h,v 1.2 1995/03/17 06:40:18 andrew Exp
00014  *
00015  *-------------------------------------------------------------------------
00016   */
00017 #ifndef PORT_PROTOS_H
00018 #define PORT_PROTOS_H
00019 
00020 #include <dlfcn.h>
00021 #include "utils/dynamic_loader.h"       /* pgrminclude ignore */
00022 
00023 /*
00024  * Dynamic Loader on UnixWare.
00025  *
00026  * this dynamic loader uses the system dynamic loading interface for shared
00027  * libraries (ie. dlopen/dlsym/dlclose). The user must specify a shared
00028  * library as the file to be dynamically loaded.
00029  */
00030 
00031 /*
00032  * In some older systems, the RTLD_NOW flag isn't defined and the mode
00033  * argument to dlopen must always be 1.  The RTLD_GLOBAL flag is wanted
00034  * if available, but it doesn't exist everywhere.
00035  * If it doesn't exist, set it to 0 so it has no effect.
00036  */
00037 #ifndef RTLD_NOW
00038 #define RTLD_NOW 1
00039 #endif
00040 #ifndef RTLD_GLOBAL
00041 #define RTLD_GLOBAL 0
00042 #endif
00043 
00044 #define pg_dlopen(f)    dlopen((f), RTLD_NOW | RTLD_GLOBAL)
00045 #define pg_dlsym        dlsym
00046 #define pg_dlclose      dlclose
00047 #define pg_dlerror      dlerror
00048 
00049 #endif   /* PORT_PROTOS_H */