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
1b2d57dc
Commit
1b2d57dc
authored
Aug 07, 2001
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A small patch to keep postgres working on the latest BeOS.
Cyril VELTER
parent
d8783c51
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
20 deletions
+53
-20
src/backend/port/beos/support.c
src/backend/port/beos/support.c
+45
-1
src/backend/port/dynloader/beos.c
src/backend/port/dynloader/beos.c
+3
-18
src/include/port/beos.h
src/include/port/beos.h
+5
-1
No files found.
src/backend/port/beos/support.c
View file @
1b2d57dc
...
...
@@ -115,6 +115,22 @@ beos_dl_open(char *filename)
}
}
void
beos_dl_sym
(
image_id
im
,
char
*
symname
,
void
**
fptr
)
{
/* Send command '3' (get symbol) to the support server */
write_port
(
beos_dl_port_in
,
3
,
symname
,
strlen
(
symname
)
+
1
);
write_port
(
beos_dl_port_in
,
im
,
NULL
,
0
);
/* Read sym address */
read_port
(
beos_dl_port_out
,
(
int32
*
)(
fptr
),
NULL
,
0
);
if
(
fptr
==
NULL
)
{
elog
(
NOTICE
,
"loading symbol '%s' failed "
,
symname
);
}
}
status_t
beos_dl_close
(
image_id
im
)
{
...
...
@@ -170,6 +186,7 @@ beos_startup(int argc, char **argv)
image_id
addon
;
image_info
info_im
;
area_info
info_ar
;
void
*
fpt
;
/* Load Add-On */
case
1
:
...
...
@@ -208,6 +225,33 @@ beos_startup(int argc, char **argv)
write_port
(
port_out
,
unload_add_on
(
*
((
int
*
)
(
datas
))),
NULL
,
0
);
break
;
/* Cleanup and exit */
case
3
:
/* read image Id on the input port */
read_port
(
port_in
,
&
addon
,
NULL
,
0
);
/* Loading symbol */
fpt
=
NULL
;
if
(
get_image_symbol
(
addon
,
datas
,
B_SYMBOL_TYPE_TEXT
,
&
fpt
)
==
B_OK
);
{
/*
* Sometime the loader return B_OK for an inexistant function
* with an invalid address !!! Check that the return address
* is in the image range
*/
get_image_info
(
addon
,
&
info_im
);
if
((
fpt
<
info_im
.
text
)
||
(
fpt
>=
(
info_im
.
text
+
info_im
.
text_size
)))
fpt
=
NULL
;
}
/* Send back fptr of data segment */
write_port
(
port_out
,
(
int32
)(
fpt
),
NULL
,
0
);
break
;
default:
/* Free system resources */
delete_port
(
port_in
);
...
...
src/backend/port/dynloader/beos.c
View file @
1b2d57dc
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/Attic/beos.c,v 1.
7 2001/03/22 03:59:42
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/Attic/beos.c,v 1.
8 2001/08/07 16:56:17
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -49,24 +49,9 @@ pg_dlsym(void *handle, char *funcname)
/* Checking that "Handle" is valid */
if
((
handle
)
&&
((
*
(
int
*
)
(
handle
))
>=
0
))
{
/* Loading symbol */
if
(
get_image_symbol
(
*
((
int
*
)
(
handle
)),
funcname
,
B_SYMBOL_TYPE_TEXT
,
(
void
**
)
&
fpt
)
==
B_OK
);
{
/*
* Sometime the loader return B_OK for an inexistant function
* with an invalid address !!! Check that the return address
* is in the image range
*/
image_info
info
;
get_image_info
(
*
((
int
*
)
(
handle
)),
&
info
);
if
((
fpt
<
info
.
text
)
||
(
fpt
>=
(
info
.
text
+
info
.
text_size
)))
return
NULL
;
beos_dl_sym
(
*
((
int
*
)
(
handle
)),
funcname
,(
void
**
)
&
fpt
);
return
fpt
;
}
elog
(
NOTICE
,
"loading symbol '%s' failed "
,
funcname
);
}
elog
(
NOTICE
,
"add-on not loaded correctly"
);
return
NULL
;
}
...
...
src/include/port/beos.h
View file @
1b2d57dc
#include <kernel/OS.h>
#include "kernel/image.h"
#include <kernel/image.h>
#include <sys/ioctl.h>
#define HAS_TEST_AND_SET
...
...
@@ -69,6 +70,9 @@ void beos_startup(int argc, char **argv);
/* Load a shared library */
image_id
beos_dl_open
(
char
*
filename
);
/* Find symbol */
void
beos_dl_sym
(
image_id
im
,
char
*
symname
,
void
**
fptr
);
/* UnLoad a shared library */
status_t
beos_dl_close
(
image_id
im
);
...
...
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