1996-07-09 08:22:35 +02:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
2002-02-13 00:41:25 +01:00
|
|
|
* linux.h
|
|
|
|
* Port-specific prototypes for Linux
|
1996-07-09 08:22:35 +02:00
|
|
|
*
|
|
|
|
*
|
2010-01-02 17:58:17 +01:00
|
|
|
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
|
2000-01-26 06:58:53 +01:00
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
1996-07-09 08:22:35 +02:00
|
|
|
*
|
2010-01-02 17:58:17 +01:00
|
|
|
* $PostgreSQL: pgsql/src/backend/port/dynloader/linux.h,v 1.29 2010/01/02 16:57:50 momjian Exp $
|
1996-07-09 08:22:35 +02:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
#ifndef PORT_PROTOS_H
|
|
|
|
#define PORT_PROTOS_H
|
|
|
|
|
|
|
|
#include "utils/dynamic_loader.h"
|
2001-05-14 23:45:53 +02:00
|
|
|
#ifdef HAVE_DLOPEN
|
1999-07-16 01:04:24 +02:00
|
|
|
#include <dlfcn.h>
|
1996-07-09 08:22:35 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2002-10-15 18:04:17 +02:00
|
|
|
#ifdef HAVE_DLOPEN
|
2001-05-14 23:45:53 +02:00
|
|
|
|
2002-02-13 00:41:25 +01:00
|
|
|
/*
|
|
|
|
* In some older systems, the RTLD_NOW flag isn't defined and the mode
|
|
|
|
* argument to dlopen must always be 1. The RTLD_GLOBAL flag is wanted
|
|
|
|
* if available, but it doesn't exist everywhere.
|
|
|
|
* If it doesn't exist, set it to 0 so it has no effect.
|
|
|
|
*/
|
|
|
|
#ifndef RTLD_NOW
|
|
|
|
#define RTLD_NOW 1
|
|
|
|
#endif
|
|
|
|
#ifndef RTLD_GLOBAL
|
|
|
|
#define RTLD_GLOBAL 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define pg_dlopen(f) dlopen((f), RTLD_NOW | RTLD_GLOBAL)
|
1997-09-07 07:04:48 +02:00
|
|
|
#define pg_dlsym dlsym
|
|
|
|
#define pg_dlclose dlclose
|
|
|
|
#define pg_dlerror dlerror
|
2001-11-05 18:46:40 +01:00
|
|
|
#endif /* HAVE_DLOPEN */
|
2001-10-28 07:26:15 +01:00
|
|
|
|
2001-11-05 18:46:40 +01:00
|
|
|
#endif /* PORT_PROTOS_H */
|