Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2c9dbc5

Browse files
committed
Various changes to improve/support Mklinux
Submitted by: Tatsuo Ishii
1 parent9b91412 commit2c9dbc5

File tree

5 files changed

+29
-8
lines changed

5 files changed

+29
-8
lines changed

‎src/backend/port/linux/dynloader.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@
1010
*
1111
*
1212
* 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 $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
1717
#include<stdio.h>
18+
#ifdefHAVE_DLD_H
1819
#include<dld.h>
20+
#endif
1921
#include"postgres.h"
2022
#include"port-protos.h"
2123
#include"utils/elog.h"
@@ -26,6 +28,10 @@ extern char pg_pathname[];
2628
void*
2729
pg_dlopen(char*filename)
2830
{
31+
#ifndefHAVE_DLD_H
32+
elog(WARN,"dynamic load not supported");
33+
return(NULL);
34+
#else
2935
staticintdl_initialized=0;
3036

3137
/*
@@ -84,10 +90,15 @@ pg_dlopen(char *filename)
8490
}
8591

8692
return (void*)strdup(filename);
93+
#endif
8794
}
8895

8996
char*
9097
pg_dlerror()
9198
{
99+
#ifndefHAVE_DLD_H
100+
return("dynaloader unspported");
101+
#else
92102
returndld_strerror(dld_errno);
103+
#endif
93104
}

‎src/backend/port/linux/port-protos.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
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 $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -22,8 +22,13 @@
2222
/* dynloader.c */
2323

2424
#ifndefLINUX_ELF
25+
# ifndefHAVE_DLD_H
26+
#definepg_dlsym(handle,funcname)(NULL)
27+
# definepg_dlclose(handle)({})
28+
# else
2529
#definepg_dlsym(handle,funcname)((func_ptr) dld_get_func((funcname)))
26-
#definepg_dlclose(handle)({ dld_unlink_by_file(handle, 1); free(handle); })
30+
# definepg_dlclose(handle)({ dld_unlink_by_file(handle, 1); free(handle); })
31+
# endif
2732
#else
2833
/* #definepg_dlopen(f)dlopen(f, 1) */
2934
#definepg_dlopen(f)dlopen(f, 2)

‎src/configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2255,7 +2255,7 @@ else
22552255
fi
22562256
done
22572257

2258-
forac_hdrin readline.h history.h
2258+
forac_hdrin readline.h history.h dld.h
22592259
do
22602260
ac_safe=`echo"$ac_hdr"| sed'y%./+-%__p_%'`
22612261
echo$ac_n"checking for$ac_hdr""...$ac_c"1>&6

‎src/configure.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ dnl Checks for header files.
120120
AC_HEADER_STDC
121121
AC_HEADER_SYS_WAIT
122122
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)
124124

125125
dnl Checks for typedefs, structures, and compiler characteristics.
126126
AC_C_CONST

‎src/include/config.h.in

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@
3232
/* Set to 1 if you have <history.h> */
3333
#undef HAVE_HISTORY
3434

35+
/* Set to 1 if you have <dld.h> */
36+
#undef HAVE_DLD_H
37+
3538
/* Set to 1 if you have isinf() */
3639
#undef HAVE_ISINF
3740

@@ -162,9 +165,11 @@
162165
*/
163166
# defineJMP_BUF
164167
# defineUSE_POSIX_TIME
165-
# defineNEED_I386_TAS_ASM
166-
# defineHAS_TEST_AND_SET
167-
typedefunsignedcharslock_t;
168+
# if !defined(PPC)
169+
# defineNEED_I386_TAS_ASM
170+
# defineHAS_TEST_AND_SET
171+
typedefunsignedcharslock_t;
172+
# endif
168173
#endif
169174

170175
#if defined(nextstep)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp