Header And Logo

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

solaris.h

Go to the documentation of this file.
00001 /*-------------------------------------------------------------------------
00002  *
00003  * solaris.h
00004  *    port-specific prototypes for Solaris
00005  *
00006  *
00007  * Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group
00008  * Portions Copyright (c) 1994, Regents of the University of California
00009  *
00010  * src/backend/port/dynloader/solaris.h
00011  *
00012  *-------------------------------------------------------------------------
00013  */
00014 #ifndef PORT_PROTOS_H
00015 #define PORT_PROTOS_H
00016 
00017 #include <dlfcn.h>
00018 #include "utils/dynamic_loader.h"       /* pgrminclude ignore */
00019 
00020 /*
00021  * In some older systems, the RTLD_NOW flag isn't defined and the mode
00022  * argument to dlopen must always be 1.  The RTLD_GLOBAL flag is wanted
00023  * if available, but it doesn't exist everywhere.
00024  * If it doesn't exist, set it to 0 so it has no effect.
00025  */
00026 #ifndef RTLD_NOW
00027 #define RTLD_NOW 1
00028 #endif
00029 #ifndef RTLD_GLOBAL
00030 #define RTLD_GLOBAL 0
00031 #endif
00032 
00033 #define pg_dlopen(f)    dlopen((f), RTLD_NOW | RTLD_GLOBAL)
00034 #define pg_dlsym        dlsym
00035 #define pg_dlclose      dlclose
00036 #define pg_dlerror      dlerror
00037 
00038 #endif   /* PORT_PROTOS_H */