Index: m3-comm/tcp/src/POSIX/IP.m3 =================================================================== RCS file: /usr/cvs/cm3/m3-comm/tcp/src/POSIX/IP.m3,v retrieving revision 1.3 diff -u -r1.3 IP.m3 --- m3-comm/tcp/src/POSIX/IP.m3 19 Jan 2009 11:11:27 -0000 1.3 +++ m3-comm/tcp/src/POSIX/IP.m3 9 Mar 2009 16:52:00 -0000 @@ -14,11 +14,12 @@ PROCEDURE GetHostByName(nm: TEXT; VAR (*out*) res: Address): BOOLEAN RAISES {Error} = +VAR hostent: Unetdb.struct_hostent; BEGIN LOCK mu DO VAR s := M3toC.SharedTtoS(nm); - h := Unetdb.gethostbyname(s); + h := Unetdb.gethostbyname(s, ADR(hostent)); BEGIN M3toC.FreeSharedS(nm, s); IF h = NIL THEN InterpretError(); RETURN FALSE; END; @@ -29,11 +30,12 @@ END GetHostByName; PROCEDURE GetCanonicalByName(nm: TEXT): TEXT RAISES {Error} = +VAR hostent: Unetdb.struct_hostent; BEGIN LOCK mu DO VAR s := M3toC.SharedTtoS(nm); - h := Unetdb.gethostbyname(s); + h := Unetdb.gethostbyname(s, ADR(hostent)); BEGIN M3toC.FreeSharedS(nm, s); IF h # NIL THEN @@ -47,11 +49,12 @@ PROCEDURE GetCanonicalByAddr(addr: Address): TEXT RAISES {Error} = VAR ua: Uin.struct_in_addr; + hostent: Unetdb.struct_hostent; BEGIN ua.s_addr := LOOPHOLE(addr, Utypes.u_int); LOCK mu DO VAR h := Unetdb.gethostbyaddr( - ADR(ua), BYTESIZE(ua), Usocket.AF_INET); + ADR(ua), BYTESIZE(ua), Usocket.AF_INET, ADR(hostent)); BEGIN IF h # NIL THEN RETURN M3toC.CopyStoT(h.h_name); @@ -73,12 +76,14 @@ PROCEDURE GetHostAddr(): Address = VAR hname: ARRAY [0..255] OF CHAR; + hostent: Unetdb.struct_hostent; BEGIN LOCK mu DO IF Unix.gethostname(ADR(hname[0]), BYTESIZE(hname)) # 0 THEN IPError.Die (); END; - VAR h := Unetdb.gethostbyname(ADR(hname[0])); BEGIN + VAR h := Unetdb.gethostbyname(ADR(hname[0]), ADR(hostent)); + BEGIN IF h = NIL THEN IPError.Die(); END; RETURN GetAddress(h); END; Index: m3-demo/mentor/src/sorting/audio/MidiLineServer.m3 =================================================================== RCS file: /usr/cvs/cm3/m3-demo/mentor/src/sorting/audio/MidiLineServer.m3,v retrieving revision 1.2 diff -u -r1.2 MidiLineServer.m3 --- m3-demo/mentor/src/sorting/audio/MidiLineServer.m3 14 Apr 2003 20:18:44 -0000 1.2 +++ m3-demo/mentor/src/sorting/audio/MidiLineServer.m3 9 Mar 2009 16:52:00 -0000 @@ -54,9 +54,10 @@ PROCEDURE Open (t: T; name: TEXT): Midi.T RAISES {Failure} = VAR hp: Unetdb.struct_hostent_star; + hostent: Unetdb.struct_hostent; BEGIN WITH string = M3toC.CopyTtoS(name) DO - hp := Unetdb.gethostbyname(string); + hp := Unetdb.gethostbyname(string, ADR(hostent)); M3toC.FreeCopiedS(string); END; IF hp = NIL THEN RAISE Failure("host name unknown"); END; Index: m3-libs/libm3/src/os/POSIX/SocketPosix.m3 =================================================================== RCS file: /usr/cvs/cm3/m3-libs/libm3/src/os/POSIX/SocketPosix.m3,v retrieving revision 1.9 diff -u -r1.9 SocketPosix.m3 --- m3-libs/libm3/src/os/POSIX/SocketPosix.m3 20 Jan 2009 21:57:18 -0000 1.9 +++ m3-libs/libm3/src/os/POSIX/SocketPosix.m3 9 Mar 2009 16:52:01 -0000 @@ -402,6 +402,7 @@ RAISES {OSError.E} = VAR host : ARRAY [0..255] OF CHAR; + hostent: Unetdb.struct_hostent; info : Unetdb.struct_hostent_star; ua : Uin.struct_in_addr; BEGIN @@ -409,7 +410,7 @@ IOError (Unexpected); END; - info := Unetdb.gethostbyname (ADR (host[0])); + info := Unetdb.gethostbyname (ADR (host[0]), ADR (hostent)); IF info = NIL THEN IOError (Unexpected); END; <* ASSERT info.h_length <= BYTESIZE (Address) *> Index: m3-libs/m3core/src/unix/Common/Unetdb.i3 =================================================================== RCS file: /usr/cvs/cm3/m3-libs/m3core/src/unix/Common/Unetdb.i3,v retrieving revision 1.4 diff -u -r1.4 Unetdb.i3 --- m3-libs/m3core/src/unix/Common/Unetdb.i3 16 Feb 2009 05:49:56 -0000 1.4 +++ m3-libs/m3core/src/unix/Common/Unetdb.i3 9 Mar 2009 16:52:01 -0000 @@ -2,18 +2,19 @@ (* All rights reserved. *) (* See the file COPYRIGHT for a full description. *) -<*EXTERNAL*> INTERFACE Unetdb; +UNSAFE INTERFACE Unetdb; FROM Ctypes IMPORT int, char_star, char_star_star, const_char_star; -FROM Utypes IMPORT socklen_t, hostent_addrtype_t, hostent_length_t; TYPE +(* This is a portable idealized form that need not match the +underlying platform. This is sorted by size and then by name. *) struct_hostent = RECORD - h_name: char_star; - h_aliases: char_star_star; - h_addrtype: hostent_addrtype_t; - h_length: hostent_length_t; h_addr_list: char_star_star; + h_aliases: char_star_star; + h_name: char_star; + h_addrtype: int; (* underlying implementation varies here *) + h_length: int; (* underlying implementation varies here *) END; struct_hostent_star = UNTRACED REF struct_hostent; @@ -22,7 +23,23 @@ <*EXTERNAL "Unetdb__NO_RECOVERY"*> VAR NO_RECOVERY: int; <*EXTERNAL "Unetdb__NO_ADDRESS"*> VAR NO_ADDRESS: int; -PROCEDURE gethostbyname (name: const_char_star): struct_hostent_star; -PROCEDURE gethostbyaddr (addr: const_char_star; len: socklen_t; type: int): struct_hostent_star; +(* These are thin C wrappers that do not quite match the underlying + function, but are very close. +success: + native struct is copied into provided struct, and pointer to provided + struct returned +failure: + null returned + +Despite the result buffer provided, the functions are no more thread safe +than their underlying implementation. +*) + +<*EXTERNAL Unetdb__gethostbyname*> +PROCEDURE gethostbyname (name: const_char_star; + result: struct_hostent_star): struct_hostent_star; +<*EXTERNAL Unetdb__gethostbyaddr*> +PROCEDURE gethostbyaddr (addr: const_char_star; len: int; type: int; + result: struct_hostent_star): struct_hostent_star; END Unetdb. Index: m3-libs/m3core/src/unix/Common/Utypes.i3 =================================================================== RCS file: /usr/cvs/cm3/m3-libs/m3core/src/unix/Common/Utypes.i3,v retrieving revision 1.4 diff -u -r1.4 Utypes.i3 --- m3-libs/m3core/src/unix/Common/Utypes.i3 8 Mar 2009 20:15:47 -0000 1.4 +++ m3-libs/m3core/src/unix/Common/Utypes.i3 9 Mar 2009 16:52:01 -0000 @@ -43,7 +43,5 @@ uid_t = Usysdep.uid_t; socklen_t = Usysdep.socklen_t; - hostent_addrtype_t = Usysdep.hostent_addrtype_t; - hostent_length_t = Usysdep.hostent_length_t; END Utypes. Index: m3-libs/m3core/src/unix/Common/m3makefile =================================================================== RCS file: /usr/cvs/cm3/m3-libs/m3core/src/unix/Common/m3makefile,v retrieving revision 1.42 diff -u -r1.42 m3makefile --- m3-libs/m3core/src/unix/Common/m3makefile 8 Mar 2009 20:15:47 -0000 1.42 +++ m3-libs/m3core/src/unix/Common/m3makefile 9 Mar 2009 16:52:01 -0000 @@ -7,6 +7,9 @@ Interface("Uexec") c_source("Uexec") +Interface ("Unetdb") +c_source ("Unetdb") + if equal (TARGET, "I386_OPENBSD") or equal (TARGET, "LINUXLIBC6") c_source("Uucontext") @@ -15,9 +18,7 @@ include_dir("context") -if equal (TARGET, "LINUXLIBC6") - c_source("Uconstants") -end +c_source("Uconstants") if equal (TARGET, "MIPS64_OPENBSD") or equal (TARGET, "I386_OPENBSD") or equal (TARGET, "PPC32_OPENBSD") or equal (TARGET, "SPARC64_OPENBSD") @@ -31,7 +32,6 @@ c_source("UstatC") Interface ("Uuio") Interface ("Upwd") - Interface ("Unetdb") Interface ("Uugid") Interface ("Uprocess") Index: m3-libs/m3core/src/unix/aix-3-2/m3makefile =================================================================== RCS file: /usr/cvs/cm3/m3-libs/m3core/src/unix/aix-3-2/m3makefile,v retrieving revision 1.6 diff -u -r1.6 m3makefile --- m3-libs/m3core/src/unix/aix-3-2/m3makefile 13 Jan 2009 11:06:18 -0000 1.6 +++ m3-libs/m3core/src/unix/aix-3-2/m3makefile 9 Mar 2009 16:52:01 -0000 @@ -12,7 +12,6 @@ Interface ("Uipc") Interface ("Umman") Module ("Umsg") -Module ("Unetdb") Interface ("Unix") Interface ("Uprocess") Interface ("Upwd") Index: m3-libs/m3core/src/unix/aix-ps2-1-2/m3makefile =================================================================== RCS file: /usr/cvs/cm3/m3-libs/m3core/src/unix/aix-ps2-1-2/m3makefile,v retrieving revision 1.6 diff -u -r1.6 m3makefile --- m3-libs/m3core/src/unix/aix-ps2-1-2/m3makefile 13 Jan 2009 11:06:18 -0000 1.6 +++ m3-libs/m3core/src/unix/aix-ps2-1-2/m3makefile 9 Mar 2009 16:52:01 -0000 @@ -11,7 +11,6 @@ Interface ("Ugrp") Interface ("Uipc") Module ("Umsg") -Module ("Unetdb") Interface ("Unix") Interface ("Uprocess") Interface ("Upwd") Index: m3-libs/m3core/src/unix/cygwin/Usysdep.i3 =================================================================== RCS file: /usr/cvs/cm3/m3-libs/m3core/src/unix/cygwin/Usysdep.i3,v retrieving revision 1.14 diff -u -r1.14 Usysdep.i3 --- m3-libs/m3core/src/unix/cygwin/Usysdep.i3 18 Feb 2009 10:14:26 -0000 1.14 +++ m3-libs/m3core/src/unix/cygwin/Usysdep.i3 9 Mar 2009 16:52:01 -0000 @@ -8,7 +8,7 @@ IMPORT Ctypes; FROM Ctypes IMPORT int, const_char_star, char_star_star, char, unsigned_int; -FROM Cstdint IMPORT uint8_t, uint16_t, uint32_t, int16_t, int32_t; +FROM Cstdint IMPORT uint8_t, uint16_t, uint32_t, int32_t; (* This is the only system that uses this. *) (* CONST *) @@ -23,8 +23,6 @@ MAX_FDSET = 1024; TYPE - mode_t = int; - (* INTERFACE Upthread; *) pthread_t = ADDRESS; (* opaque *) @@ -72,8 +70,6 @@ gid_t = uint32_t; socklen_t = int32_t; - hostent_addrtype_t = int16_t; - hostent_length_t = int16_t; (* INTERFACE Utermio *) Index: m3-libs/m3core/src/unix/darwin-common/Usysdep.i3 =================================================================== RCS file: /usr/cvs/cm3/m3-libs/m3core/src/unix/darwin-common/Usysdep.i3,v retrieving revision 1.4 diff -u -r1.4 Usysdep.i3 --- m3-libs/m3core/src/unix/darwin-common/Usysdep.i3 8 Mar 2009 20:15:47 -0000 1.4 +++ m3-libs/m3core/src/unix/darwin-common/Usysdep.i3 9 Mar 2009 16:52:01 -0000 @@ -62,7 +62,5 @@ uid_t = uint32_t; socklen_t = uint32_t; - hostent_addrtype_t = int32_t; - hostent_length_t = int32_t; END Usysdep. Index: m3-libs/m3core/src/unix/darwin-generic/m3makefile =================================================================== RCS file: /usr/cvs/cm3/m3-libs/m3core/src/unix/darwin-generic/m3makefile,v retrieving revision 1.11 diff -u -r1.11 m3makefile --- m3-libs/m3core/src/unix/darwin-generic/m3makefile 13 Jan 2009 11:06:19 -0000 1.11 +++ m3-libs/m3core/src/unix/darwin-generic/m3makefile 9 Mar 2009 16:52:01 -0000 @@ -12,7 +12,6 @@ Interface ("Uipc") Interface ("Umman") Module ("Umsg") -Module ("Unetdb") Interface ("Unix") Interface ("Uprocess") Interface ("Upthread") Index: m3-libs/m3core/src/unix/freebsd-1/m3makefile =================================================================== RCS file: /usr/cvs/cm3/m3-libs/m3core/src/unix/freebsd-1/m3makefile,v retrieving revision 1.6 diff -u -r1.6 m3makefile --- m3-libs/m3core/src/unix/freebsd-1/m3makefile 13 Jan 2009 11:06:19 -0000 1.6 +++ m3-libs/m3core/src/unix/freebsd-1/m3makefile 9 Mar 2009 16:52:01 -0000 @@ -12,7 +12,6 @@ Interface ("Uipc") Interface ("Umman") Module ("Umsg") -Module ("Unetdb") Interface ("Unix") Interface ("Uprocess") Interface ("Upwd") Index: m3-libs/m3core/src/unix/freebsd-2/m3makefile =================================================================== RCS file: /usr/cvs/cm3/m3-libs/m3core/src/unix/freebsd-2/m3makefile,v retrieving revision 1.7 diff -u -r1.7 m3makefile --- m3-libs/m3core/src/unix/freebsd-2/m3makefile 13 Jan 2009 11:06:22 -0000 1.7 +++ m3-libs/m3core/src/unix/freebsd-2/m3makefile 9 Mar 2009 16:52:01 -0000 @@ -12,7 +12,6 @@ Interface ("Uipc") Interface ("Umman") Module ("Umsg") -Module ("Unetdb") Interface ("Unix") Interface ("Uprocess") Interface ("Upwd") Index: m3-libs/m3core/src/unix/freebsd-3/m3makefile =================================================================== RCS file: /usr/cvs/cm3/m3-libs/m3core/src/unix/freebsd-3/m3makefile,v retrieving revision 1.6 diff -u -r1.6 m3makefile --- m3-libs/m3core/src/unix/freebsd-3/m3makefile 13 Jan 2009 11:06:22 -0000 1.6 +++ m3-libs/m3core/src/unix/freebsd-3/m3makefile 9 Mar 2009 16:52:01 -0000 @@ -12,7 +12,6 @@ Interface ("Uipc") Interface ("Umman") Module ("Umsg") -Module ("Unetdb") Interface ("Unix") Interface ("Uprocess") Interface ("Upwd") Index: m3-libs/m3core/src/unix/freebsd-4/m3makefile =================================================================== RCS file: /usr/cvs/cm3/m3-libs/m3core/src/unix/freebsd-4/m3makefile,v retrieving revision 1.7 diff -u -r1.7 m3makefile --- m3-libs/m3core/src/unix/freebsd-4/m3makefile 13 Jan 2009 11:06:23 -0000 1.7 +++ m3-libs/m3core/src/unix/freebsd-4/m3makefile 9 Mar 2009 16:52:01 -0000 @@ -12,7 +12,6 @@ Interface ("Uipc") Interface ("Umman") Module ("Umsg") -Module ("Unetdb") Interface ("Unix") Interface ("Uprocess") Interface ("Upthread") Index: m3-libs/m3core/src/unix/freebsd-common/Usysdep.i3 =================================================================== RCS file: /usr/cvs/cm3/m3-libs/m3core/src/unix/freebsd-common/Usysdep.i3,v retrieving revision 1.8 diff -u -r1.8 Usysdep.i3 --- m3-libs/m3core/src/unix/freebsd-common/Usysdep.i3 8 Mar 2009 20:15:47 -0000 1.8 +++ m3-libs/m3core/src/unix/freebsd-common/Usysdep.i3 9 Mar 2009 16:52:01 -0000 @@ -67,7 +67,5 @@ uid_t = uint32_t; socklen_t = uint32_t; - hostent_addrtype_t = int32_t; - hostent_length_t = int32_t; END Usysdep. Index: m3-libs/m3core/src/unix/hpux-7-0/m3makefile =================================================================== RCS file: /usr/cvs/cm3/m3-libs/m3core/src/unix/hpux-7-0/m3makefile,v retrieving revision 1.5 diff -u -r1.5 m3makefile --- m3-libs/m3core/src/unix/hpux-7-0/m3makefile 13 Jan 2009 11:06:23 -0000 1.5 +++ m3-libs/m3core/src/unix/hpux-7-0/m3makefile 9 Mar 2009 16:52:01 -0000 @@ -12,7 +12,6 @@ Interface ("Uipc") Interface ("Umman") Interface ("Umsg") -Interface ("Unetdb") Interface ("Unix") Interface ("Uprocess") Interface ("Upwd") Index: m3-libs/m3core/src/unix/hpux-common/Usysdep.i3 =================================================================== RCS file: /usr/cvs/cm3/m3-libs/m3core/src/unix/hpux-common/Usysdep.i3,v retrieving revision 1.6 diff -u -r1.6 Usysdep.i3 --- m3-libs/m3core/src/unix/hpux-common/Usysdep.i3 8 Mar 2009 20:15:48 -0000 1.6 +++ m3-libs/m3core/src/unix/hpux-common/Usysdep.i3 9 Mar 2009 16:52:01 -0000 @@ -4,7 +4,7 @@ INTERFACE Usysdep; -FROM Cstdint IMPORT uint16_t, int32_t; +FROM Cstdint IMPORT int32_t; FROM Ctypes IMPORT int; FROM Cstddef IMPORT size_t; @@ -61,7 +61,5 @@ uid_t = int32_t; socklen_t = size_t; - hostent_addrtype_t = int32_t; (* hostent_t.h_addrtype *) - hostent_length_t = int32_t; (* hostent_t.h_length *) END Usysdep. Index: m3-libs/m3core/src/unix/ibm-4-3/m3makefile =================================================================== RCS file: /usr/cvs/cm3/m3-libs/m3core/src/unix/ibm-4-3/m3makefile,v retrieving revision 1.6 diff -u -r1.6 m3makefile --- m3-libs/m3core/src/unix/ibm-4-3/m3makefile 13 Jan 2009 11:06:23 -0000 1.6 +++ m3-libs/m3core/src/unix/ibm-4-3/m3makefile 9 Mar 2009 16:52:01 -0000 @@ -11,7 +11,6 @@ Interface ("Ugrp") Interface ("Uipc") Module ("Umsg") -Module ("Unetdb") Interface ("Unix") Interface ("Uprocess") Interface ("Upwd") Index: m3-libs/m3core/src/unix/irix-5.2/m3makefile =================================================================== RCS file: /usr/cvs/cm3/m3-libs/m3core/src/unix/irix-5.2/m3makefile,v retrieving revision 1.4 diff -u -r1.4 m3makefile --- m3-libs/m3core/src/unix/irix-5.2/m3makefile 13 Jan 2009 11:06:23 -0000 1.4 +++ m3-libs/m3core/src/unix/irix-5.2/m3makefile 9 Mar 2009 16:52:01 -0000 @@ -12,7 +12,6 @@ %--- Interface ("Uipc") -- not supported? Interface ("Umman") %--- Module ("Umsg") -- not supported? -Module ("Unetdb") Interface ("Unix") Interface ("Uprocess") Interface ("Upwd") Index: m3-libs/m3core/src/unix/linux/m3makefile =================================================================== RCS file: /usr/cvs/cm3/m3-libs/m3core/src/unix/linux/m3makefile,v retrieving revision 1.5 diff -u -r1.5 m3makefile --- m3-libs/m3core/src/unix/linux/m3makefile 13 Jan 2009 11:06:24 -0000 1.5 +++ m3-libs/m3core/src/unix/linux/m3makefile 9 Mar 2009 16:52:01 -0000 @@ -14,7 +14,6 @@ Interface ("Uipc") Interface ("Umman") Module ("Umsg") -Module ("Unetdb") Interface ("Unix") Interface ("Uprocess") Interface ("Upwd") Index: m3-libs/m3core/src/unix/linux-common/Usysdep.i3 =================================================================== RCS file: /usr/cvs/cm3/m3-libs/m3core/src/unix/linux-common/Usysdep.i3,v retrieving revision 1.12 diff -u -r1.12 Usysdep.i3 --- m3-libs/m3core/src/unix/linux-common/Usysdep.i3 8 Mar 2009 20:15:48 -0000 1.12 +++ m3-libs/m3core/src/unix/linux-common/Usysdep.i3 9 Mar 2009 16:52:01 -0000 @@ -59,7 +59,5 @@ uid_t = uint32_t; socklen_t = uint32_t; - hostent_addrtype_t = int; - hostent_length_t = int; END Usysdep. Index: m3-libs/m3core/src/unix/linux-libc6/m3makefile =================================================================== RCS file: /usr/cvs/cm3/m3-libs/m3core/src/unix/linux-libc6/m3makefile,v retrieving revision 1.11 diff -u -r1.11 m3makefile --- m3-libs/m3core/src/unix/linux-libc6/m3makefile 13 Jan 2009 11:06:13 -0000 1.11 +++ m3-libs/m3core/src/unix/linux-libc6/m3makefile 9 Mar 2009 16:52:01 -0000 @@ -12,7 +12,6 @@ Interface ("Uipc") Interface ("Umman") Module ("Umsg") -Module ("Unetdb") Interface ("Unix") Interface ("Uprocess") Interface ("Upthread") Index: m3-libs/m3core/src/unix/netbsd-common/Usysdep.i3 =================================================================== RCS file: /usr/cvs/cm3/m3-libs/m3core/src/unix/netbsd-common/Usysdep.i3,v retrieving revision 1.2 diff -u -r1.2 Usysdep.i3 --- m3-libs/m3core/src/unix/netbsd-common/Usysdep.i3 8 Mar 2009 20:15:48 -0000 1.2 +++ m3-libs/m3core/src/unix/netbsd-common/Usysdep.i3 9 Mar 2009 16:52:01 -0000 @@ -61,7 +61,5 @@ uid_t = uint32_t; socklen_t = uint32_t; - hostent_addrtype_t = int32_t; - hostent_length_t = int32_t; END Usysdep. Index: m3-libs/m3core/src/unix/netbsd2-i386/m3makefile =================================================================== RCS file: /usr/cvs/cm3/m3-libs/m3core/src/unix/netbsd2-i386/m3makefile,v retrieving revision 1.5 diff -u -r1.5 m3makefile --- m3-libs/m3core/src/unix/netbsd2-i386/m3makefile 13 Jan 2009 11:06:14 -0000 1.5 +++ m3-libs/m3core/src/unix/netbsd2-i386/m3makefile 9 Mar 2009 16:52:01 -0000 @@ -12,7 +12,6 @@ Interface ("Uipc") Interface ("Umman") Module ("Umsg") -Module ("Unetdb") Interface ("Unix") Interface ("Uprocess") Interface ("Upwd") Index: m3-libs/m3core/src/unix/openbsd-common/Usysdep.i3 =================================================================== RCS file: /usr/cvs/cm3/m3-libs/m3core/src/unix/openbsd-common/Usysdep.i3,v retrieving revision 1.13 diff -u -r1.13 Usysdep.i3 --- m3-libs/m3core/src/unix/openbsd-common/Usysdep.i3 8 Mar 2009 20:15:49 -0000 1.13 +++ m3-libs/m3core/src/unix/openbsd-common/Usysdep.i3 9 Mar 2009 16:52:01 -0000 @@ -63,7 +63,5 @@ uid_t = uint32_t; socklen_t = uint32_t; - hostent_addrtype_t = int32_t; - hostent_length_t = int32_t; END Usysdep. Index: m3-libs/m3core/src/unix/os2/m3makefile =================================================================== RCS file: /usr/cvs/cm3/m3-libs/m3core/src/unix/os2/m3makefile,v retrieving revision 1.5 diff -u -r1.5 m3makefile --- m3-libs/m3core/src/unix/os2/m3makefile 13 Jan 2009 11:06:17 -0000 1.5 +++ m3-libs/m3core/src/unix/os2/m3makefile 9 Mar 2009 16:52:01 -0000 @@ -12,7 +12,6 @@ Interface ("Uipc") Interface ("Umman") Module ("Umsg") -Module ("Unetdb") Module ("Unix") Interface ("Uprocess") Interface ("Upwd") Index: m3-libs/m3core/src/unix/osf-1.generic/m3makefile =================================================================== RCS file: /usr/cvs/cm3/m3-libs/m3core/src/unix/osf-1.generic/m3makefile,v retrieving revision 1.4 diff -u -r1.4 m3makefile --- m3-libs/m3core/src/unix/osf-1.generic/m3makefile 13 Jan 2009 11:06:17 -0000 1.4 +++ m3-libs/m3core/src/unix/osf-1.generic/m3makefile 9 Mar 2009 16:52:01 -0000 @@ -11,7 +11,6 @@ Interface ("Ugrp") Interface ("Uipc") Module ("Umsg") -Module ("Unetdb") Interface ("Uprocess") Interface ("Upwd") Interface ("Uresource") Index: m3-libs/m3core/src/unix/solaris-2-x/m3makefile =================================================================== RCS file: /usr/cvs/cm3/m3-libs/m3core/src/unix/solaris-2-x/m3makefile,v retrieving revision 1.8 diff -u -r1.8 m3makefile --- m3-libs/m3core/src/unix/solaris-2-x/m3makefile 18 Feb 2009 02:46:15 -0000 1.8 +++ m3-libs/m3core/src/unix/solaris-2-x/m3makefile 9 Mar 2009 16:52:01 -0000 @@ -13,7 +13,6 @@ Interface ("Uipc") Interface ("Umman") Module ("Umsg") -Module ("Unetdb") Module ("Unix") Interface ("Uprocess") Interface ("Upthread") Index: m3-libs/m3core/src/unix/solaris-common/Usysdep.i3 =================================================================== RCS file: /usr/cvs/cm3/m3-libs/m3core/src/unix/solaris-common/Usysdep.i3,v retrieving revision 1.6 diff -u -r1.6 Usysdep.i3 --- m3-libs/m3core/src/unix/solaris-common/Usysdep.i3 8 Mar 2009 20:15:49 -0000 1.6 +++ m3-libs/m3core/src/unix/solaris-common/Usysdep.i3 9 Mar 2009 16:52:01 -0000 @@ -60,7 +60,5 @@ uid_t = int32_t; socklen_t = uint32_t; - hostent_addrtype_t = int32_t; (* hostent_t.h_addrtype *) - hostent_length_t = int32_t; (* hostent_t.h_length *) END Usysdep. Index: m3-libs/m3core/src/unix/sunos-4-x/m3makefile =================================================================== RCS file: /usr/cvs/cm3/m3-libs/m3core/src/unix/sunos-4-x/m3makefile,v retrieving revision 1.5 diff -u -r1.5 m3makefile --- m3-libs/m3core/src/unix/sunos-4-x/m3makefile 13 Jan 2009 11:06:07 -0000 1.5 +++ m3-libs/m3core/src/unix/sunos-4-x/m3makefile 9 Mar 2009 16:52:01 -0000 @@ -14,7 +14,6 @@ Interface ("Upwd") Interface ("Umman") Module ("Umsg") -Module ("Unetdb") Interface ("Unix") Interface ("Uresource") Interface ("Usem") Index: m3-libs/m3core/src/unix/sysv-4.0/m3makefile =================================================================== RCS file: /usr/cvs/cm3/m3-libs/m3core/src/unix/sysv-4.0/m3makefile,v retrieving revision 1.6 diff -u -r1.6 m3makefile --- m3-libs/m3core/src/unix/sysv-4.0/m3makefile 13 Jan 2009 11:06:07 -0000 1.6 +++ m3-libs/m3core/src/unix/sysv-4.0/m3makefile 9 Mar 2009 16:52:01 -0000 @@ -12,7 +12,6 @@ Interface ("Uipc") Interface ("Umman") Module ("Umsg") -Module ("Unetdb") Interface ("Unix") Interface ("Uprocess") Interface ("Upwd") Index: m3-libs/m3core/src/unix/ultrix-3-1.generic/m3makefile =================================================================== RCS file: /usr/cvs/cm3/m3-libs/m3core/src/unix/ultrix-3-1.generic/m3makefile,v retrieving revision 1.4 diff -u -r1.4 m3makefile --- m3-libs/m3core/src/unix/ultrix-3-1.generic/m3makefile 27 Dec 2008 07:16:24 -0000 1.4 +++ m3-libs/m3core/src/unix/ultrix-3-1.generic/m3makefile 9 Mar 2009 16:52:01 -0000 @@ -10,7 +10,6 @@ Interface ("Ugrp") Interface ("Uipc") Module ("Umsg") -Module ("Unetdb") Interface ("Uprocess") Interface ("Upwd") Interface ("Uresource") Index: m3-sys/m3tests/src/Test.i3 =================================================================== RCS file: /usr/cvs/cm3/m3-sys/m3tests/src/Test.i3,v retrieving revision 1.9 diff -u -r1.9 Test.i3 --- m3-sys/m3tests/src/Test.i3 7 Mar 2009 19:44:08 -0000 1.9 +++ m3-sys/m3tests/src/Test.i3 9 Mar 2009 16:52:05 -0000 @@ -19,8 +19,6 @@ sizes : RECORD (* keep these sorted by name for easier human comprehension *) gid := BYTESIZE(Usysdep.gid_t); - hostent_addrtype_t := BYTESIZE(Usysdep.hostent_addrtype_t); - hostent_length_t := BYTESIZE(Usysdep.hostent_length_t); linger := BYTESIZE(Usysdep.struct_linger); pid := BYTESIZE(Usysdep.pid_t); socklen := BYTESIZE(Usysdep.socklen_t); Index: m3-sys/m3tests/src/TestC.c =================================================================== RCS file: /usr/cvs/cm3/m3-sys/m3tests/src/TestC.c,v retrieving revision 1.14 diff -u -r1.14 TestC.c --- m3-sys/m3tests/src/TestC.c 9 Mar 2009 08:31:46 -0000 1.14 +++ m3-sys/m3tests/src/TestC.c 9 Mar 2009 16:52:05 -0000 @@ -31,8 +31,6 @@ struct { /* keep these sorted by name for easier human comprehension */ size_t gid; - size_t hostent_addrtype; - size_t hostent_length; size_t linger; size_t pid; size_t socklen; @@ -50,8 +48,6 @@ { 0.0, 0.5, 1.0, 2.0, -1.0, -3.5, 12.34, -124.456, 1000.0, -10000.0 }, { SIZE(gid_t), - SIZE(SIZEOF_FIELD(hostent_t, h_addrtype)), - SIZE(SIZEOF_FIELD(hostent_t, h_length)), SIZE(linger_t), SIZE(pid_t), SIZE(socklen_t), Index: m3-ui/ui/src/xvbt/NTClientF.m3 =================================================================== RCS file: /usr/cvs/cm3/m3-ui/ui/src/xvbt/NTClientF.m3,v retrieving revision 1.2 diff -u -r1.2 NTClientF.m3 --- m3-ui/ui/src/xvbt/NTClientF.m3 12 Aug 2007 18:46:38 -0000 1.2 +++ m3-ui/ui/src/xvbt/NTClientF.m3 9 Mar 2009 16:52:06 -0000 @@ -334,6 +334,7 @@ dpy, hackdpy : X.DisplayStar := NIL; cpos : INTEGER; machine, rest: TEXT; + hostent: Unetdb.struct_hostent; BEGIN IF inst = NIL THEN inst := Env.Get("DISPLAY"); END; IF inst = NIL THEN inst := ":0" END; @@ -343,7 +344,7 @@ machine := Text.Sub(inst, 0, cpos); rest := Text.Sub(inst, cpos, 999999); WITH s = M3toC.TtoS(machine), - he = Unetdb.gethostbyname(s) DO + he = Unetdb.gethostbyname(s, ADR(hostent)) DO IF he # NIL THEN machine := M3toC.CopyStoT(he.h_name); inst := Text.Cat(machine, rest) Index: m3-ui/ui/src/xvbt/XSharedMem.m3 =================================================================== RCS file: /usr/cvs/cm3/m3-ui/ui/src/xvbt/XSharedMem.m3,v retrieving revision 1.3 diff -u -r1.3 XSharedMem.m3 --- m3-ui/ui/src/xvbt/XSharedMem.m3 11 Jan 2009 13:35:03 -0000 1.3 +++ m3-ui/ui/src/xvbt/XSharedMem.m3 9 Mar 2009 16:52:06 -0000 @@ -90,10 +90,11 @@ PROCEDURE PredictIPGetHostAddrSuccess(): BOOLEAN = VAR hname: ARRAY [0..255] OF CHAR; + hostent: Unetdb.struct_hostent; BEGIN LOCK mu DO RETURN (Unix.gethostname(ADR(hname[0]), BYTESIZE(hname)) = 0) - AND (Unetdb.gethostbyname(ADR(hname[0])) # NIL); + AND (Unetdb.gethostbyname(ADR(hname[0]), ADR(hostent)) # NIL); END; END PredictIPGetHostAddrSuccess;