Subject: Re: getnameinfo type incompatibility
To: Christos Zoulas <christos@zoulas.com>
From: Klaus@security.kpnqwest.com, Klein <kleink@uni-trier.de>
List: tech-net
Date: 05/21/2000 09:52:52
christos@zoulas.com (Christos Zoulas) writes:

> In article <23266.958872914@coconut.itojun.org>,  <itojun@iijlab.net> wrote:

> > 	Klaus suggested the following patch.  it worked for me ("make build"
> > 	goes just fine).  it adds sys/ansi.h (name suggested by Klaus).
> > 	bsdi4 uses sys/sockettypes.h for similar usage.  not sure which
> > 	filename sounds better - my vote goes to sys/sockettypes.h since
> > 	socklen_t is outside ANSI.   any opinions, suggestions?
> > 
> 
> There is a standard way that we do this in <machine/ansi.h> for all
> other typedefs, why invent a new one and a new file?

The motivation for going this route is that nothing about this type is
machine-dependent, and a further disadvantage of the current
<machine/ansi.h> model is the inability to use the private
(namespace-clean) type macro definition once it's been used to typedef
the public name, which is often desirable for private interfaces in
public headers or ambigousities in a standard concernding the
namespace used by a header.

I do want to use this model (among other things) to make visible off_t
in <stdio.h> in a non-invasive way; I think you'll agree with me that
adding a _BSD_OFF_T_ in <machine/ansi.h> is not the way to address
this issue.


- Klaus