Subject: Re: getnameinfo type incompatibility
To: None <itojun@iijlab.net>
From: Jason R Thorpe <thorpej@zembu.com>
List: tech-net
Date: 05/20/2000 19:37:13
On Sun, May 21, 2000 at 10:35:14AM +0900, 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?

How about:

make <sys/ansi.h>, have it include <machine/ansi.h>.  Make all users
of <machine/ansi.h> use <sys/ansi.h> instead.

In <sys/ansi.h>, define _BSD_SOCKLEN_T_, like <machine/ansi.h> does
with its various types.  Then in each file that needs socklen_t, do:

typedef _BSD_SOCKLEN_T_ socklen_t;

Would that work?

-- 
        -- Jason R. Thorpe <thorpej@zembu.com>