#760 Sockets variables errno and h_errno not set

Mark Miesfeld

The documentation says "The variable h_errno is set after each RxSock call", and similarly for variable "errno", but that is not true of SockGetHostByName() as shown in the following program. I've also noticed it for SockSocket(), SockConnect(), SockSend(), SockRecv(), SockClose(), and even SockSock_ErrNo().

if 0 \== RxFuncQuery("SockLoadFuncs") then do -- Not already loaded
say 'Loading ...' -- Ok: Says "Loading ..."
_ = RxFuncAdd("SockLoadFuncs","rxSock","SockLoadFuncs")
_ = SockLoadFuncs()

say SockGetHostByName( 'www.abc.com', 'a_') -- Ok: Says "1"

say symbol('h_errno') -- Err: Says "LIT"
say symbol('errno') -- Err: Says "LIT"

say symbol('a_addr') -- Ok: Says "VAR" (ok)
say a_addr -- Ok: Says ""

-- REXX-ooRexx_4.0.0(MT) 6.03 30 Jun 2009
-- Up to date Vista


  • Mark Miesfeld
    Mark Miesfeld

    Hi Doug,

    Sorry it took so long for a response to this. We appreciate your opening bugs, we just don't have the resources to always respond promptly.

    This works fine for me on 4.0.1. I tested on Windows, Fedora Core 13, and Ubuntu. Some output:

    Symbol h_errno: VAR
    h_errno: 1541
    Symbol errno: VAR
    errno: 0
    Symbol a_addr: VAR

    Since you opened this for the 4.0.0 beta, I'm going to mark it as out of date.

    I only tested SockGetHostByName, using the program you included in-line, with some additional says. That program is attached.

    If you still think there are problems with the other functions, please open a new bug. Please attach working, example programs that demonstrate the bug to any bug report. It is better to attach a program rather than putting it in-line in the descriptive text. (Although in-line is far better than nothing.)

    Thanks again for th bug report.



Cancel   Add attachments