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

Commit527f8ba

Browse files
committed
From: Brian E Gallew <geek+@cmu.edu>
dgux 5.4R4.11Missing port-protos.h (not needed, I think). Wants dld.h. Shouldreally use the system dl stuff (like i386_solaris). Needs to include<netinet/in.h> before <arpa/inet.h>. Here are some patches...
1 parentd1891c6 commit527f8ba

File tree

3 files changed

+22
-109
lines changed

3 files changed

+22
-109
lines changed

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

Lines changed: 3 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,7 @@
1-
/*-------------------------------------------------------------------------
1+
/* Dummy file used for nothing at this point
22
*
3-
* dynloader.c--
4-
* Dynamic Loader for Postgres for DG/UX, generated from those for
5-
* Linux.
3+
* see dgux.h
64
*
7-
* Copyright (c) 1994, Regents of the University of California
8-
*
9-
*
10-
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/dgux.c,v 1.1 1997/12/20 04:48:02 scrappy Exp $
12-
*
13-
*-------------------------------------------------------------------------
5+
* $Id: dgux.c,v 1.2 1998/02/14 19:56:19 scrappy Exp $
146
*/
15-
#include<stdio.h>
16-
#include<dld.h>
17-
#include"postgres.h"
18-
#include"port-protos.h"
19-
#include"utils/elog.h"
20-
#include"fmgr.h"
21-
22-
externcharpg_pathname[];
23-
24-
void*
25-
pg_dlopen(char*filename)
26-
{
27-
staticintdl_initialized=0;
28-
29-
/*
30-
* initializes the dynamic loader with the executable's pathname.
31-
* (only needs to do this the first time pg_dlopen is called.)
32-
*/
33-
if (!dl_initialized)
34-
{
35-
if (dld_init(dld_find_executable(pg_pathname)))
36-
{
37-
returnNULL;
38-
}
39-
40-
/*
41-
* if there are undefined symbols, we want dl to search from the
42-
* following libraries also.
43-
*/
44-
dl_initialized=1;
45-
}
46-
47-
/*
48-
* link the file, then check for undefined symbols!
49-
*/
50-
if (dld_link(filename))
51-
{
52-
returnNULL;
53-
}
54-
55-
/*
56-
* If undefined symbols: try to link with the C and math libraries!
57-
* This could be smarter, if the dynamic linker was able to handle
58-
* shared libs!
59-
*/
60-
if (dld_undefined_sym_count>0)
61-
{
62-
if (dld_link("/usr/lib/libc.a"))
63-
{
64-
elog(NOTICE,"dld: Cannot link C library!");
65-
returnNULL;
66-
}
67-
if (dld_undefined_sym_count>0)
68-
{
69-
if (dld_link("/usr/lib/libm.a"))
70-
{
71-
elog(NOTICE,"dld: Cannot link math library!");
72-
returnNULL;
73-
}
74-
if (dld_undefined_sym_count>0)
75-
{
76-
intcount=dld_undefined_sym_count;
77-
char**list=dld_list_undefined_sym();
78-
79-
/* list the undefined symbols, if any */
80-
elog(NOTICE,"dld: Undefined:");
81-
do
82-
{
83-
elog(NOTICE," %s",*list);
84-
list++;
85-
count--;
86-
}while (count>0);
87-
88-
dld_unlink_by_file(filename,1);
89-
returnNULL;
90-
}
91-
}
92-
}
93-
94-
return (void*)strdup(filename);
95-
}
967

97-
char*
98-
pg_dlerror()
99-
{
100-
returndld_strerror(dld_errno);
101-
}

‎src/backend/port/dynloader/dgux.h

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,31 @@
11
/*-------------------------------------------------------------------------
22
*
3-
* port-protos.h--
4-
* port-specific prototypes for SunOS 4
5-
*
6-
*
3+
* dgux.h--
4+
*
75
* Copyright (c) 1994, Regents of the University of California
86
*
9-
* $Id: dgux.h,v 1.1 1997/12/20 04:48:04 scrappy Exp $
7+
* $Id: dgux.h,v 1.2 1998/02/14 19:56:21 scrappy Exp $
108
*
119
*-------------------------------------------------------------------------
1210
*/
1311
#ifndefPORT_PROTOS_H
1412
#definePORT_PROTOS_H
1513

14+
#include<dlfcn.h>
1615
#include"fmgr.h"/* for func_ptr */
1716
#include"utils/dynamic_loader.h"
18-
#include"dlfcn.h"
1917

20-
/* dynloader.c */
21-
22-
/* #definepg_dlopen(f)dlopen(f, 1) */
23-
#definepg_dlopen(f)dlopen(f, 2)
18+
/*
19+
* Dynamic Loader on DG/UX.
20+
*
21+
* this dynamic loader uses the system dynamic loading interface for shared
22+
* libraries (ie. dlopen/dlsym/dlclose). The user must specify a shared
23+
* library as the file to be dynamically loaded.
24+
*
25+
*/
26+
#definepg_dlopen(f) dlopen(f,1)
2427
#definepg_dlsymdlsym
2528
#definepg_dlclosedlclose
2629
#definepg_dlerrordlerror
2730

28-
/* port.c */
29-
3031
#endif/* PORT_PROTOS_H */

‎src/include/config.h.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
/* Set to 1 if you have <fp_class.h> */
1818
#undef HAVE_FP_CLASS_H
1919

20+
/* Set to 1 if you have <netinet/in.h> */
21+
#undef HAVE_NETINET_IN_H
22+
2023
/* Set to 1 if you have <ieeefp.h> */
2124
#undef HAVE_IEEEFP_H
2225

@@ -96,6 +99,9 @@ int gethostname(char *name, int namelen);
9699
#undef HAVE_INET_ATON
97100
#ifndefHAVE_INET_ATON
98101
# ifdefHAVE_ARPA_INET_H
102+
# ifdefHAVE_NETINET_IN_H
103+
# include<netinet/in.h>
104+
# endif
99105
# include<arpa/inet.h>
100106
# endif
101107
externintinet_aton(constchar*cp,structin_addr*addr);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp