rem: Tcl_AppendResult(interp, "ns_sockioctl(%d) failed:  %s", sock, ns_sockstrerror(ns_sockerrno), NULL);
add: Tcl_AppendResult(interp, "ns_sockioctl failed: ", SockError(interp), NULL);
context: NsTclSockNReadCmd(ClientData dummy, Tcl_Interp *interp, int argc, char **argv){    int         nread;    Tcl_Channel	chan;    SOCKET      sock;    if (argc != 2) {        Tcl_AppendResult(interp, "wrong # args: should be \"",            argv[0], " sockId\"", NULL);        return TCL_ERROR;    }    chan = Tcl_GetChannel(interp, argv[1], NULL);    if (chan == NULL || Ns_TclGetOpenFd(interp, argv[1], 0,	    (int *) &sock) != TCL_OK) {	return TCL_ERROR;    }    if (ns_sockioctl(sock, FIONREAD, &nread) != 0) {        Tcl_AppendResult(interp, "ns_sockioctl(%d) failed:  %s", sock,	    ns_sockstrerror(ns_sockerrno), NULL);        return TCL_ERROR;    }    nread += Tcl_InputBuffered(chan);    sprintf(interp->result, "%d", nread);        return TCL_OK;}