Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
351855fc
Commit
351855fc
authored
Jul 10, 2018
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove obsolete linux dynloader code
This has been obsolete probably since the late 1990s.
parent
b5d29299
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
6 additions
and
144 deletions
+6
-144
configure
configure
+1
-1
configure.in
configure.in
+1
-1
src/backend/port/dynloader/linux.c
src/backend/port/dynloader/linux.c
+4
-130
src/backend/port/dynloader/linux.h
src/backend/port/dynloader/linux.h
+0
-6
src/include/pg_config.h.in
src/include/pg_config.h.in
+0
-3
src/include/pg_config.h.win32
src/include/pg_config.h.win32
+0
-3
No files found.
configure
View file @
351855fc
...
@@ -12495,7 +12495,7 @@ $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
...
@@ -12495,7 +12495,7 @@ $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
fi
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
:
do
:
as_ac_Header
=
`
$as_echo
"ac_cv_header_
$ac_header
"
|
$as_tr_sh
`
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
"
ac_fn_c_check_header_mongrel
"
$LINENO
"
"
$ac_header
"
"
$as_ac_Header
"
"
$ac_includes_default
"
...
...
configure.in
View file @
351855fc
...
@@ -1260,7 +1260,7 @@ AC_SUBST(UUID_LIBS)
...
@@ -1260,7 +1260,7 @@ AC_SUBST(UUID_LIBS)
AC_HEADER_STDBOOL
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
# On BSD, test for net/if.h will fail unless sys/socket.h
# is included first.
# is included first.
...
...
src/backend/port/dynloader/linux.c
View file @
351855fc
/*-------------------------------------------------------------------------
/*
* src/backend/port/dynloader/linux.c
*
*
* linux.c
* Dummy file used for nothing at this point
* Dynamic Loader for Postgres for Linux, generated from those for
* Ultrix.
*
*
* You need to install the dld library on your Linux system!
* see linux.h
*
* 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
*
*-------------------------------------------------------------------------
*/
*/
#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 */
src/backend/port/dynloader/linux.h
View file @
351855fc
...
@@ -15,12 +15,7 @@
...
@@ -15,12 +15,7 @@
#define PORT_PROTOS_H
#define PORT_PROTOS_H
#include "utils/dynamic_loader.h"
/* pgrminclude ignore */
#include "utils/dynamic_loader.h"
/* pgrminclude ignore */
#ifdef HAVE_DLOPEN
#include <dlfcn.h>
#include <dlfcn.h>
#endif
#ifdef HAVE_DLOPEN
/*
/*
* In some older systems, the RTLD_NOW flag isn't defined and the mode
* In some older systems, the RTLD_NOW flag isn't defined and the mode
...
@@ -39,6 +34,5 @@
...
@@ -39,6 +34,5 @@
#define pg_dlsym dlsym
#define pg_dlsym dlsym
#define pg_dlclose dlclose
#define pg_dlclose dlclose
#define pg_dlerror dlerror
#define pg_dlerror dlerror
#endif
/* HAVE_DLOPEN */
#endif
/* PORT_PROTOS_H */
#endif
/* PORT_PROTOS_H */
src/include/pg_config.h.in
View file @
351855fc
...
@@ -186,9 +186,6 @@
...
@@ -186,9 +186,6 @@
don't. */
don't. */
#undef HAVE_DECL_VSNPRINTF
#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. */
/* Define to 1 if you have the `dlopen' function. */
#undef HAVE_DLOPEN
#undef HAVE_DLOPEN
...
...
src/include/pg_config.h.win32
View file @
351855fc
...
@@ -143,9 +143,6 @@
...
@@ -143,9 +143,6 @@
don't. */
don't. */
#define HAVE_DECL_VSNPRINTF 1
#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. */
/* Define to 1 if you have the `dlopen' function. */
/* #undef HAVE_DLOPEN */
/* #undef HAVE_DLOPEN */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment