From: Chris Hanson Date: Sat, 1 Nov 1997 07:27:36 +0000 (+0000) Subject: Add new primitives GET-HOST-NAME and CANONICAL-HOST-NAME. X-Git-Tag: 20090517-FFI~4952 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=796edee202332b4e7093ae625b4a1e478015584a;p=mit-scheme.git Add new primitives GET-HOST-NAME and CANONICAL-HOST-NAME. --- diff --git a/v7/src/microcode/os2sock.c b/v7/src/microcode/os2sock.c index 3964f81ae..1ceda8f1a 100644 --- a/v7/src/microcode/os2sock.c +++ b/v7/src/microcode/os2sock.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: os2sock.c,v 1.4 1997/11/01 07:18:06 cph Exp $ +$Id: os2sock.c,v 1.5 1997/11/01 07:26:23 cph Exp $ Copyright (c) 1990-97 Massachusetts Institute of Technology @@ -167,7 +167,7 @@ OS_get_host_name (void) const char * OS_canonical_host_name (const char * host_name) { - struct hostent * entry = (gethostbyname (this_host_name)); + struct hostent * entry = (gethostbyname (host_name)); if (entry == 0) return (0); { diff --git a/v7/src/microcode/pruxsock.c b/v7/src/microcode/pruxsock.c index 1a860b6c1..6d772ca24 100644 --- a/v7/src/microcode/pruxsock.c +++ b/v7/src/microcode/pruxsock.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: pruxsock.c,v 1.13 1997/11/01 07:19:15 cph Exp $ +$Id: pruxsock.c,v 1.14 1997/11/01 07:27:36 cph Exp $ Copyright (c) 1990-97 Massachusetts Institute of Technology @@ -135,7 +135,7 @@ DEFINE_PRIMITIVE ("GET-HOST-NAME", Prim_get_host_name, 0, 0, 0) { SCHEME_OBJECT result = (char_pointer_to_string ((unsigned char *) host_name)); - OS_free (host_name); + OS_free ((PTR) host_name); PRIMITIVE_RETURN (result); } }); @@ -152,7 +152,7 @@ DEFINE_PRIMITIVE ("CANONICAL-HOST-NAME", Prim_canonical_host_name, 1, 1, 0) { SCHEME_OBJECT result = (char_pointer_to_string ((unsigned char *) host_name)); - OS_free (host_name); + OS_free ((PTR) host_name); PRIMITIVE_RETURN (result); } }); diff --git a/v7/src/microcode/uxsock.c b/v7/src/microcode/uxsock.c index c7c75cb82..34f8ef7f7 100644 --- a/v7/src/microcode/uxsock.c +++ b/v7/src/microcode/uxsock.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: uxsock.c,v 1.15 1997/11/01 07:19:03 cph Exp $ +$Id: uxsock.c,v 1.16 1997/11/01 07:26:30 cph Exp $ Copyright (c) 1990-97 Massachusetts Institute of Technology @@ -121,6 +121,8 @@ DEFUN (OS_get_host_by_name, (host_name), CONST char * host_name) #endif } +#define HOSTNAMESIZE 1024 + CONST char * DEFUN_VOID (OS_get_host_name) { @@ -137,7 +139,7 @@ DEFUN_VOID (OS_get_host_name) CONST char * DEFUN (OS_canonical_host_name, (host_name), CONST char * host_name) { - struct hostent * entry = (gethostbyname (this_host_name)); + struct hostent * entry = (gethostbyname (host_name)); if (entry == 0) return (0); {