Header And Logo

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

aix.h

Go to the documentation of this file.
00001 /*-------------------------------------------------------------------------
00002  *
00003  * aix.h
00004  *    prototypes for AIX-specific routines
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/aix.h
00011  *
00012  *-------------------------------------------------------------------------
00013  */
00014 
00015 #ifndef PORT_PROTOS_H
00016 #define PORT_PROTOS_H
00017 
00018 #include <dlfcn.h>
00019 #include "utils/dynamic_loader.h"       /* pgrminclude ignore */
00020 
00021 /*
00022  * In some older systems, the RTLD_NOW flag isn't defined and the mode
00023  * argument to dlopen must always be 1.  The RTLD_GLOBAL flag is wanted
00024  * if available, but it doesn't exist everywhere.
00025  * If it doesn't exist, set it to 0 so it has no effect.
00026  */
00027 #ifndef RTLD_NOW
00028 #define RTLD_NOW 1
00029 #endif
00030 #ifndef RTLD_GLOBAL
00031 #define RTLD_GLOBAL 0
00032 #endif
00033 
00034 #define  pg_dlopen(f)   dlopen((f), RTLD_NOW | RTLD_GLOBAL)
00035 #define  pg_dlsym(h, f) ((PGFunction) dlsym(h, f))
00036 #define  pg_dlclose(h)  dlclose(h)
00037 #define  pg_dlerror()   dlerror()
00038 
00039 #endif   /* PORT_PROTOS_H */