File tree Expand file tree Collapse file tree 5 files changed +29
-8
lines changed Expand file tree Collapse file tree 5 files changed +29
-8
lines changed Original file line number Diff line number Diff line change 10
10
*
11
11
*
12
12
* IDENTIFICATION
13
- * $Header: /cvsroot/pgsql/src/backend/port/linux/Attic/dynloader.c,v 1.1.1.1 1996/07/09 06:21:44 scrappy Exp $
13
+ * $Header: /cvsroot/pgsql/src/backend/port/linux/Attic/dynloader.c,v 1.2 1997/02/06 08:39:40 scrappy Exp $
14
14
*
15
15
*-------------------------------------------------------------------------
16
16
*/
17
17
#include <stdio.h>
18
+ #ifdef HAVE_DLD_H
18
19
#include <dld.h>
20
+ #endif
19
21
#include "postgres.h"
20
22
#include "port-protos.h"
21
23
#include "utils/elog.h"
@@ -26,6 +28,10 @@ extern char pg_pathname[];
26
28
void *
27
29
pg_dlopen (char * filename )
28
30
{
31
+ #ifndef HAVE_DLD_H
32
+ elog (WARN , "dynamic load not supported" );
33
+ return (NULL );
34
+ #else
29
35
static int dl_initialized = 0 ;
30
36
31
37
/*
@@ -84,10 +90,15 @@ pg_dlopen(char *filename)
84
90
}
85
91
86
92
return (void * ) strdup (filename );
93
+ #endif
87
94
}
88
95
89
96
char *
90
97
pg_dlerror ()
91
98
{
99
+ #ifndef HAVE_DLD_H
100
+ return ("dynaloader unspported" );
101
+ #else
92
102
return dld_strerror (dld_errno );
103
+ #endif
93
104
}
Original file line number Diff line number Diff line change 6
6
*
7
7
* Copyright (c) 1994, Regents of the University of California
8
8
*
9
- * $Id: port-protos.h,v 1.1.1.1 1996/07/09 06:21:44 scrappy Exp $
9
+ * $Id: port-protos.h,v 1.2 1997/02/06 08:39:53 scrappy Exp $
10
10
*
11
11
*-------------------------------------------------------------------------
12
12
*/
22
22
/* dynloader.c */
23
23
24
24
#ifndef LINUX_ELF
25
+ # ifndef HAVE_DLD_H
26
+ #define pg_dlsym (handle , funcname ) (NULL)
27
+ # define pg_dlclose (handle ) ({})
28
+ # else
25
29
#define pg_dlsym (handle , funcname ) ((func_ptr) dld_get_func((funcname)))
26
- #define pg_dlclose (handle ) ({ dld_unlink_by_file(handle, 1); free(handle); })
30
+ # define pg_dlclose (handle ) ({ dld_unlink_by_file(handle, 1); free(handle); })
31
+ # endif
27
32
#else
28
33
/* #define pg_dlopen(f) dlopen(f, 1) */
29
34
#define pg_dlopen (f ) dlopen(f, 2)
Original file line number Diff line number Diff line change @@ -2255,7 +2255,7 @@ else
2255
2255
fi
2256
2256
done
2257
2257
2258
- for ac_hdr in readline.h history.h
2258
+ for ac_hdr in readline.h history.h dld.h
2259
2259
do
2260
2260
ac_safe=` echo " $ac_hdr " | sed ' y%./+-%__p_%' `
2261
2261
echo $ac_n " checking for $ac_hdr " " ... $ac_c " 1>&6
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ dnl Checks for header files.
120
120
AC_HEADER_STDC
121
121
AC_HEADER_SYS_WAIT
122
122
AC_CHECK_HEADERS(limits.h unistd.h termios.h values.h sys/select.h)
123
- AC_CHECK_HEADERS(readline.h history.h)
123
+ AC_CHECK_HEADERS(readline.h history.h dld.h )
124
124
125
125
dnl Checks for typedefs, structures, and compiler characteristics.
126
126
AC_C_CONST
Original file line number Diff line number Diff line change 32
32
/* Set to 1 if you have <history.h> */
33
33
#undef HAVE_HISTORY
34
34
35
+ /* Set to 1 if you have <dld.h> */
36
+ #undef HAVE_DLD_H
37
+
35
38
/* Set to 1 if you have isinf() */
36
39
#undef HAVE_ISINF
37
40
162
165
*/
163
166
# define JMP_BUF
164
167
# define USE_POSIX_TIME
165
- # define NEED_I386_TAS_ASM
166
- # define HAS_TEST_AND_SET
167
- typedef unsigned char slock_t ;
168
+ # if !defined(PPC )
169
+ # define NEED_I386_TAS_ASM
170
+ # define HAS_TEST_AND_SET
171
+ typedef unsigned char slock_t ;
172
+ # endif
168
173
#endif
169
174
170
175
#if defined(nextstep )
You can’t perform that action at this time.
0 commit comments