Subject: Re: inet_makeaddr(), u_long, _POSIX_SOURCE macro
To: Jason R Thorpe <>
From: Jaromir Dolecek <>
List: tech-kern
Date: 01/06/2003 10:37:21
Jason R Thorpe wrote:
> On Sun, Jan 05, 2003 at 05:48:38PM +0100, Jaromir Dolecek wrote:
>  > We can't change it to in_addr_t (that would be ABI change for
>  > 64bit archs, since in_addr_t is 32bit). But it would probably
>  > be good to change the u_long to 'unsigned long' in the header.
> Actually, it would not *really* be an ABI change, since all such
> platforms pass those arguments in registers, and so they would
> be zero-extended to 64-bits wide anyhow.

Would it be right to change the function to use in_addr_t instead
> But, the real issue is that POSIX does not have an inet_makeaddr(),
> and so defining _POSIX_SOURCE and then using inet_makeaddr() in your
> program is incorrect.

inet_makeaddr() is not guarded by _POSIX_SOURCE, so the compile
fails even when the program doesn't use inet_makeaddr().

Jaromir Dolecek <>  
-=- We should be mindful of the potential goal, but as the tantric    -=-
-=- Buddhist masters say, ``You may notice during meditation that you -=-
-=- sometimes levitate or glow.   Do not let this distract you.''     -=-