[M3devel] Posix/Win32 linger options inverted?

Jay K jay.krell at cornell.edu
Sun Aug 23 08:26:34 CEST 2009


http://modula3.elegosoft.com/cgi-bin/cvsweb.cgi/cm3/m3-comm/tcp/src/POSIX/TCP.m3?rev=1.7;content-type=text%2Fplain
 
vs.
 
http://modula3.elegosoft.com/cgi-bin/cvsweb.cgi/cm3/m3-comm/tcp/src/WIN32/TCP.m3?rev=1.3;content-type=text%2Fplain

 
search for linger:
 
PROCEDURE InitFD(fd: CARDINAL) =
  (* We assume that the runtime ignores SIGPIPE signals *)
  VAR
    one: int := 1;
    linger := Usocket.struct_linger{1, 1};

vs.

PROCEDURE InitSock(sock: WinSock.SOCKET) =
  (* We assume that the runtime ignores SIGPIPE signals *)
  VAR
    one : BOOL := 1;
    linger := WinSock.struct_linger{0, 0};
  

Surely they can't both be correct.
Which is correct? The Posix one?
 
 
 - Jay


More information about the M3devel mailing list