summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc%netscape.com <devnull@localhost>2000-06-21 22:34:45 +0000
committerwtc%netscape.com <devnull@localhost>2000-06-21 22:34:45 +0000
commit09d82c6ce037cc8d29808bcf5472c18aeac56e22 (patch)
treecd33be99dc372465d0f3cc156fb0c974b607af2d
parent5a4cee70585058ef48b24ee9f1c7596373ff456c (diff)
downloadnspr-hg-09d82c6ce037cc8d29808bcf5472c18aeac56e22.tar.gz
Checked in IPv6 patch for OpenVMS from Colin Blake <colin@theblakes.com>.
(NSPRPUB_RELEASE_4_0_BRANCH)
-rw-r--r--pr/src/io/pripv6.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/pr/src/io/pripv6.c b/pr/src/io/pripv6.c
index 280b0bb4..f5635a59 100644
--- a/pr/src/io/pripv6.c
+++ b/pr/src/io/pripv6.c
@@ -276,11 +276,29 @@ PRStatus _pr_init_ipv6()
#if !defined(_PR_INET6) && defined(_PR_HAVE_GETIPNODEBYNAME)
PRLibrary *lib;
- _pr_getipnodebyname_fp = PR_FindSymbolAndLibrary("getipnodebyname", &lib);
+#if defined(VMS)
+#define GETIPNODEBYNAME "DECC$GETIPNODEBYNAME"
+#define GETIPNODEBYADDR "DECC$GETIPNODEBYADDR"
+#define FREEHOSTENT "DECC$FREEHOSTENT"
+#define GAISTRERROR "DECC$GAISTRERROR"
+ typedef char * (*_pr_getstrerror_t)(int);
+ _pr_getstrerror_t _pr_gaistrerror_fp;
+ _pr_getipnodebyname_fp = NULL;
+ _pr_gaistrerror_fp = (_pr_getstrerror_t)PR_FindSymbolAndLibrary(GAISTRERROR, &lib);
+ if (NULL != _pr_gaistrerror_fp) {
+ if (NULL != (*_pr_gaistrerror_fp)(0))
+ _pr_getipnodebyname_fp = PR_FindSymbol(lib, GETIPNODEBYNAME);
+ }
+#else
+#define GETIPNODEBYNAME "getipnodebyname"
+#define GETIPNODEBYADDR "getipnodebyaddr"
+#define FREEHOSTENT "freehostent"
+ _pr_getipnodebyname_fp = PR_FindSymbolAndLibrary(GETIPNODEBYNAME, &lib);
+#endif
if (NULL != _pr_getipnodebyname_fp) {
- _pr_freehostent_fp = PR_FindSymbol(lib, "freehostent");
+ _pr_freehostent_fp = PR_FindSymbol(lib, FREEHOSTENT);
if (NULL != _pr_freehostent_fp) {
- _pr_getipnodebyaddr_fp = PR_FindSymbol(lib, "getipnodebyaddr");
+ _pr_getipnodebyaddr_fp = PR_FindSymbol(lib, GETIPNODEBYADDR);
if (NULL != _pr_getipnodebyaddr_fp)
_pr_ipv6_is_present = PR_TRUE;
else