Header And Logo

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

cygwin.h

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