Subject: (IPng 6660) (c.harding 21731) Re: Base API Edit Question on error_num

From: Chris Harding <[email-masked]>
Date: Wed, 21 Oct 1998 20:15:10 +0100

Hi -

h_errno is specified in XNS and in P1003.1g/D6.6 to be "a modifiable
l-value of type int". This is similar to the definition of errno in POSIX.
It allows h_errno to be defined in a thread-safe manner as (eg.) extern int
*_h_errno(void) but preserves compatibility with applications that assume
the old definition of int.

Having said which, I would agree that if we were starting from scratch, it
would be better to have a function parameter return the error value. The
only argument for the h_errno usage is backwards compatibility. But at
least there is a way of maintaining that usage while preserving thread-safety.

>From: [email-masked]
>To: [email-masked]
>Subject: (c.harding 21731) (IPng 6659) Re:  Base API Edit Question on
error_num 
>Date: Wed, 21 Oct 1998 14:15:17 -0400
>X-Mts: smtp
>Sender: [email-masked]
>Comments: (c.harding 21731)
>
>Here is some private input I got on h_errno from a die hard implementor.
>This was my first impression but I have not worked with the
>gehostbyxxx_r routines hands on as an implementor, so I am listening.
>
>------------------------
>Bad idea.  h_errno is a global variable, not thread safe, the
>whole reason for adding the "&error_num" parameter is to move
>away from using h_errno.  That said, people could pass in
>&h_errno if they wanted to, but I don't think we want to encourage
>that usage.  I'd stick with &error_num.  The prototype is just
>an example anyway, people can pass in whatever 'int *' name they
>want.
>-----------------------------
>
>/jim
>
>--------------------------------------------------------------------
>IETF IPng Working Group Mailing List
>IPng Home Page:                      http://playground.sun.com/ipng
>FTP archive:                      ftp://playground.sun.com/pub/ipng
>Direct all administrative requests to [email-masked]
>--------------------------------------------------------------------
>
>

Regards,

Chris
+++++

-------------------------------------------------------------------------
           Chris Harding
  T H E    Development Manager
 O P E N   Apex Plaza, Forbury Road, Reading RG1 1AX, UK
G R O U P  Mailto:[email-masked]   Ph: +44 118 950 8311 x2262
           WWW: http://www.opengroup.org    Fx: +44 118 950 0110  

OSF/1, Motif, UNIX and the "X" device are registered trademarks in
the US and other countries, and IT DialTone and The Open Group are
trademarks of The Open Group.
-------------------------------------------------------------------------
--------------------------------------------------------------------
IETF IPng Working Group Mailing List
IPng Home Page:                      http://playground.sun.com/ipng
FTP archive:                      ftp://playground.sun.com/pub/ipng
Direct all administrative requests to [email-masked]
--------------------------------------------------------------------