httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Kraemer <Martin.Krae...@Fujitsu-Siemens.com>
Subject EAI_SYSTEM in apr_getaddrinfo()
Date Tue, 29 Jan 2002 09:01:32 GMT
In apr_sockaddr_info_get(), I see this:

        error = getaddrinfo(hostname, numptr, &hints, &ai_list);
        if (error) {
            if (error == EAI_SYSTEM) {
                return errno;
            }
            else {
                /* issues with representing this with APR's error scheme:
                 * glibc uses negative values for these numbers, perhaps so
                 * they don't conflict with h_errno values...  Tru64 uses
                 * positive values which conflict with h_errno values
                 */
#if defined(NEGATIVE_EAI)
                error = -error;
#endif
                return error + APR_OS_START_EAIERR;
            }

In my opinion, the "return errno" is wrong: EAI_SYSTEM is not of
type apr_status_t, so it should be handled just like any other EAI_
error code. Was there a special reason to treat it differently?

Cscope finds no reference to EAI_SYSTEM other than this one,
not in apr, nor in apr-util or httpd-2.0

   Martin
-- 
<Martin.Kraemer@Fujitsu-Siemens.com>         |     Fujitsu Siemens
Fon: +49-89-636-46021, FAX: +49-89-636-47655 | 81730  Munich,  Germany

Mime
View raw message