aboutsummaryrefslogtreecommitdiff
path: root/src/backend/port/dynloader/solaris.h
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2018-09-06 10:07:24 +0200
committerPeter Eisentraut <peter_e@gmx.net>2018-09-06 11:33:04 +0200
commit842cb9fa62fc99598086166bdeec9d6ae6e3c50f (patch)
treea1c3c19d6d8eb66fd1b162fcf616e711ea2cafd1 /src/backend/port/dynloader/solaris.h
parentac27c74def5d8544530b13d5901308a342f072ac (diff)
downloadpostgresql-842cb9fa62fc99598086166bdeec9d6ae6e3c50f.tar.gz
postgresql-842cb9fa62fc99598086166bdeec9d6ae6e3c50f.zip
Refactor dlopen() support
Nowadays, all platforms except Windows and older HP-UX have standard dlopen() support. So having a separate implementation per platform under src/backend/port/dynloader/ is a bit excessive. Instead, treat dlopen() like other library functions that happen to be missing sometimes and put a replacement implementation under src/port/. Discussion: https://www.postgresql.org/message-id/flat/e11a49cb-570a-60b7-707d-7084c8de0e61%402ndquadrant.com#54e735ae37476a121abb4e33c2549b03
Diffstat (limited to 'src/backend/port/dynloader/solaris.h')
-rw-r--r--src/backend/port/dynloader/solaris.h38
1 files changed, 0 insertions, 38 deletions
diff --git a/src/backend/port/dynloader/solaris.h b/src/backend/port/dynloader/solaris.h
deleted file mode 100644
index b583c266cfa..00000000000
--- a/src/backend/port/dynloader/solaris.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * solaris.h
- * port-specific prototypes for Solaris
- *
- *
- * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/backend/port/dynloader/solaris.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PORT_PROTOS_H
-#define PORT_PROTOS_H
-
-#include <dlfcn.h>
-#include "utils/dynamic_loader.h" /* pgrminclude ignore */
-
-/*
- * 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)
-#define pg_dlsym dlsym
-#define pg_dlclose dlclose
-#define pg_dlerror dlerror
-
-#endif /* PORT_PROTOS_H */