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
700032ad
Commit
700032ad
authored
Nov 09, 2000
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Real dynamic loader code
parent
6b70f386
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
23 deletions
+32
-23
src/backend/port/dynloader/darwin.c
src/backend/port/dynloader/darwin.c
+25
-19
src/backend/port/dynloader/darwin.h
src/backend/port/dynloader/darwin.h
+7
-4
No files found.
src/backend/port/dynloader/darwin.c
View file @
700032ad
/*
* This is a place holder until someone supplies a dynamic loader
* interface for this platform.
* These routines were taken from the Apache source, but were made
* available with a PostgreSQL-compatible license. Kudos Wilfredo
* Snchez <wsanchez@apple.com>.
*
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/darwin.c,v 1.
1 2000/10/31 19:55:19
petere Exp $
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/darwin.c,v 1.
2 2000/11/09 19:00:50
petere Exp $
*/
#include "postgres.h"
#include "fmgr.h"
#include "utils/dynamic_loader.h"
#include <mach-o/dyld.h>
#include "dynloader.h"
void
*
pg_dlopen
(
char
*
filename
)
void
*
pg_dlopen
(
const
char
*
filename
)
{
return
(
void
*
)
NULL
;
}
NSObjectFileImage
image
;
PGFunction
pg_dlsym
(
void
*
handle
,
char
*
funcname
)
{
if
(
NSCreateObjectFileImageFromFile
(
filename
,
&
image
)
!=
NSObjectFileImageSuccess
)
return
NULL
;
return
NSLinkModule
(
image
,
filename
,
TRUE
);
}
void
pg_dlclose
(
void
*
handle
)
void
pg_dlclose
(
void
*
handle
)
{
NSUnLinkModule
(
handle
,
FALSE
);
return
;
}
char
*
pg_dlerror
()
PGFunction
*
pg_dlsym
(
void
*
handle
,
const
char
*
funcname
)
{
static
char
errmsg
[]
=
"the dynamic loader for darwin doesn't exist yet"
;
NSSymbol
symbol
;
char
*
symname
=
(
char
*
)
malloc
(
strlen
(
funcname
)
+
2
);
return
errmsg
;
sprintf
(
symname
,
"_%s"
,
funcname
);
symbol
=
NSLookupAndBindSymbol
(
symname
);
free
(
symname
);
return
(
PGFunction
*
)
NSAddressOfSymbol
(
symbol
);
}
const
char
*
pg_dlerror
(
void
)
{
return
"no error message available"
;
}
src/backend/port/dynloader/darwin.h
View file @
700032ad
/* $Header: /cvsroot/pgsql/src/backend/port/dynloader/darwin.h,v 1.1 2000/10/31 19:55:19 petere Exp $ */
void
*
pg_dlopen
(
char
*
filename
);
PGFunction
pg_dlsym
(
void
*
handle
,
char
*
funcname
);
/* $Header: /cvsroot/pgsql/src/backend/port/dynloader/darwin.h,v 1.2 2000/11/09 19:00:50 petere Exp $ */
#include "fmgr.h"
void
*
pg_dlopen
(
const
char
*
filename
);
PGFunction
pg_dlsym
(
void
*
handle
,
const
char
*
funcname
);
void
pg_dlclose
(
void
*
handle
);
c
har
*
pg_dlerror
(
);
c
onst
char
*
pg_dlerror
(
void
);
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