git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b5d2929)
Remove obsolete linux dynloader code
2018年7月10日 13:50:28 +0000 (15:50 +0200)
2018年8月13日 21:21:01 +0000 (23:21 +0200)
This has been obsolete probably since the late 1990s.


diff --git a/configure b/configure
index 26652133d53c985e073eccf7763a3ad1a493a2b9..067fc43e4e3239fc25208b8903ed8d21b8ecbd99 100755 (executable)
--- a/configure
+++ b/configure
@@ -12495,7 +12495,7 @@ $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
fi
-for ac_header in atomic.h crypt.h dld.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h mbarrier.h poll.h sys/epoll.h sys/ipc.h sys/prctl.h sys/procctl.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/sockio.h sys/tas.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h
+for ac_header in atomic.h crypt.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h mbarrier.h poll.h sys/epoll.h sys/ipc.h sys/prctl.h sys/procctl.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/sockio.h sys/tas.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
diff --git a/configure.in b/configure.in
index 397f6bc76514d3d296fd4ef7301f41b2ce5e9830..49257e530106c21121468e148a2e829790a2993c 100644 (file)
--- a/configure.in
+++ b/configure.in
@@ -1260,7 +1260,7 @@ AC_SUBST(UUID_LIBS)
AC_HEADER_STDBOOL
-AC_CHECK_HEADERS([atomic.h crypt.h dld.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h mbarrier.h poll.h sys/epoll.h sys/ipc.h sys/prctl.h sys/procctl.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/sockio.h sys/tas.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h])
+AC_CHECK_HEADERS([atomic.h crypt.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h mbarrier.h poll.h sys/epoll.h sys/ipc.h sys/prctl.h sys/procctl.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/sockio.h sys/tas.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h])
# On BSD, test for net/if.h will fail unless sys/socket.h
# is included first.
diff --git a/src/backend/port/dynloader/linux.c b/src/backend/port/dynloader/linux.c
index 8735767add893a3d459a24131e309c56be43f10b..2126576e8f88a46bc6de9e7959f7573338b50d0f 100644 (file)
--- a/src/backend/port/dynloader/linux.c
+++ b/src/backend/port/dynloader/linux.c
@@ -1,133 +1,7 @@
-/*-------------------------------------------------------------------------
+/*
+ * src/backend/port/dynloader/linux.c
*
- * linux.c
- * Dynamic Loader for Postgres for Linux, generated from those for
- * Ultrix.
+ * Dummy file used for nothing at this point
*
- * You need to install the dld library on your Linux system!
- *
- * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- *
- * IDENTIFICATION
- * src/backend/port/dynloader/linux.c
- *
- *-------------------------------------------------------------------------
+ * see linux.h
*/
-
-#include "postgres.h"
-
-#ifdef HAVE_DLD_H
-#include <dld.h>
-#endif
-
-#include "dynloader.h"
-#include "miscadmin.h"
-
-
-#ifndef HAVE_DLOPEN
-
-void *
-pg_dlopen(const char *filename)
-{
-#ifndef HAVE_DLD_H
- elog(ERROR, "dynamic load not supported");
- return NULL;
-#else
- static int dl_initialized = 0;
-
- /*
- * initializes the dynamic loader with the executable's pathname. (only
- * needs to do this the first time pg_dlopen is called.)
- */
- if (!dl_initialized)
- {
- if (dld_init(dld_find_executable(my_exec_path)))
- return NULL;
-
- /*
- * if there are undefined symbols, we want dl to search from the
- * following libraries also.
- */
- dl_initialized = 1;
- }
-
- /*
- * link the file, then check for undefined symbols!
- */
- if (dld_link(filename))
- return NULL;
-
- /*
- * If undefined symbols: try to link with the C and math libraries! This
- * could be smarter, if the dynamic linker was able to handle shared libs!
- */
- if (dld_undefined_sym_count > 0)
- {
- if (dld_link("/usr/lib/libc.a"))
- {
- elog(WARNING, "could not link C library");
- return NULL;
- }
- if (dld_undefined_sym_count > 0)
- {
- if (dld_link("/usr/lib/libm.a"))
- {
- elog(WARNING, "could not link math library");
- return NULL;
- }
- if (dld_undefined_sym_count > 0)
- {
- int count = dld_undefined_sym_count;
- char **list = dld_list_undefined_sym();
-
- /* list the undefined symbols, if any */
- do
- {
- elog(WARNING, "\"%s\" is undefined", *list);
- list++;
- count--;
- } while (count > 0);
-
- dld_unlink_by_file(filename, 1);
- return NULL;
- }
- }
- }
-
- return (void *) strdup(filename);
-#endif
-}
-
-PGFunction
-pg_dlsym(void *handle, const char *funcname)
-{
-#ifndef HAVE_DLD_H
- return NULL;
-#else
- return (PGFunction) dld_get_func((funcname));
-#endif
-}
-
-void
-pg_dlclose(void *handle)
-{
-#ifndef HAVE_DLD_H
-#else
- dld_unlink_by_file(handle, 1);
- free(handle);
-#endif
-}
-
-char *
-pg_dlerror(void)
-{
-#ifndef HAVE_DLD_H
- return "dynaloader unsupported";
-#else
- return dld_strerror(dld_errno);
-#endif
-}
-
-#endif /* !HAVE_DLOPEN */
diff --git a/src/backend/port/dynloader/linux.h b/src/backend/port/dynloader/linux.h
index df2852ac58b7d63784decbc95eb6da53df38691a..6beb3d63f8e20836104308ade11e7bd4d443c572 100644 (file)
--- a/src/backend/port/dynloader/linux.h
+++ b/src/backend/port/dynloader/linux.h
@@ -15,12 +15,7 @@
#define PORT_PROTOS_H
#include "utils/dynamic_loader.h" /* pgrminclude ignore */
-#ifdef HAVE_DLOPEN
#include <dlfcn.h>
-#endif
-
-
-#ifdef HAVE_DLOPEN
/*
* In some older systems, the RTLD_NOW flag isn't defined and the mode
@@ -39,6 +34,5 @@
#define pg_dlsym dlsym
#define pg_dlclose dlclose
#define pg_dlerror dlerror
-#endif /* HAVE_DLOPEN */
#endif /* PORT_PROTOS_H */
diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in
index b7e469670f4663476379ba78496845e1de9f6815..827574ee40df49268b567cb389f5086b81ab7196 100644 (file)
--- a/src/include/pg_config.h.in
+++ b/src/include/pg_config.h.in
@@ -186,9 +186,6 @@
don't. */
#undef HAVE_DECL_VSNPRINTF
-/* Define to 1 if you have the <dld.h> header file. */
-#undef HAVE_DLD_H
-
/* Define to 1 if you have the `dlopen' function. */
#undef HAVE_DLOPEN
diff --git a/src/include/pg_config.h.win32 b/src/include/pg_config.h.win32
index ab276f7a95794217fe30497cfd25104477082fb2..46ce49def2f3f0c7878ac57488ad15b3d89ba8a5 100644 (file)
--- a/src/include/pg_config.h.win32
+++ b/src/include/pg_config.h.win32
@@ -143,9 +143,6 @@
don't. */
#define HAVE_DECL_VSNPRINTF 1
-/* Define to 1 if you have the <dld.h> header file. */
-/* #undef HAVE_DLD_H */
-
/* Define to 1 if you have the `dlopen' function. */
/* #undef HAVE_DLOPEN */
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /