aboutsummaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend')
-rwxr-xr-xsrc/backend/port/aix/mkldexport.sh7
-rw-r--r--src/backend/port/dynloader/aix.c9
-rw-r--r--src/backend/port/dynloader/aix.h27
3 files changed, 34 insertions, 9 deletions
diff --git a/src/backend/port/aix/mkldexport.sh b/src/backend/port/aix/mkldexport.sh
index 4a42a9729c8..4e6c98541de 100755
--- a/src/backend/port/aix/mkldexport.sh
+++ b/src/backend/port/aix/mkldexport.sh
@@ -43,7 +43,12 @@ fi
if [ -z "$2" ]; then
echo '#!'
else
- echo '#!' $2/$OBJNAME
+ if [ "$2" = "." ]; then
+ # for the base executable (AIX 4.2 and up)
+ echo '#! .'
+ else
+ echo '#!' $2/$OBJNAME
+ fi
fi
$NM -Bg $1 | \
egrep ' [TDB] ' | \
diff --git a/src/backend/port/dynloader/aix.c b/src/backend/port/dynloader/aix.c
index c6295406e22..c1556bb1c20 100644
--- a/src/backend/port/dynloader/aix.c
+++ b/src/backend/port/dynloader/aix.c
@@ -14,6 +14,13 @@
#include "postgres.h"
#include "dynloader.h"
+#ifndef HAVE_DLOPEN
+
+/*
+ * AIX 4.3 and up has dlopen() and friends in -ldl.
+ * A la long, the homebrewn dl*() functions below should be obsolete.
+ */
+
/*
* We simulate dlopen() et al. through a call to load. Because AIX has
* no call to find an exported symbol we read the loader section of the
@@ -601,3 +608,5 @@ findMain(void)
free(buf);
return ret;
}
+
+#endif /* HAVE_DLOPEN */
diff --git a/src/backend/port/dynloader/aix.h b/src/backend/port/dynloader/aix.h
index ee19b47ea45..35b3a0d0aa2 100644
--- a/src/backend/port/dynloader/aix.h
+++ b/src/backend/port/dynloader/aix.h
@@ -1,13 +1,19 @@
/*
- * $Id: aix.h,v 1.2 1998/09/01 04:30:51 momjian Exp $
+ * $Id: aix.h,v 1.3 2000/09/29 22:00:43 momjian Exp $
*
* @(#)dlfcn.h 1.4 revision of 95/04/25 09:36:52
* This is an unpublished work copyright (c) 1992 HELIOS Software GmbH
* 30159 Hannover, Germany
*/
-#ifndef __dlfcn_h__
-#define __dlfcn_h__
+#ifndef PORT_PROTOS_H
+#define PORT_PROTOS_H
+
+#ifdef HAVE_DLOPEN
+
+#include <dlfcn.h>
+
+#else /* HAVE_DLOPEN */
#ifdef __cplusplus
extern "C"
@@ -48,9 +54,14 @@ extern "C"
#endif
-#define pg_dlopen(f) dlopen(filename, RTLD_LAZY)
-#define pg_dlsym(h,f) dlsym(h, f)
-#define pg_dlclose(h) dlclose(h)
-#define pg_dlerror() dlerror()
+#endif /* HAVE_DLOPEN */
+
+#include "fmgr.h"
+#include "utils/dynamic_loader.h"
+
+#define pg_dlopen(f) dlopen(f, RTLD_LAZY)
+#define pg_dlsym dlsym
+#define pg_dlclose dlclose
+#define pg_dlerror dlerror
-#endif /* __dlfcn_h__ */
+#endif /* PORT_PROTOS_H */