[<prev] [next>] [<thread-prev] [thread-next>] [month] [year] [list]
Date: Thu, 7 Aug 2003 05:08:42 +0400
From: Solar Designer <solar@...nwall.com>
To: popa3d-users@...ts.openwall.com
Subject: Re: inet.h error?
On Thu, Aug 07, 2003 at 12:32:57AM +0000, Michael Coulter wrote:
> On Thu, Aug 07, 2003 at 03:28:57AM +0400, Solar Designer wrote:
>
> > 2. There really appears to be a bug either in that header file or in
> > the way I'm using it with the #define's (_XOPEN_SOURCE and so on).
> > Camiel, -- if you're reading this, could you handle this report within
> > the OpenBSD team as appropriate? I'd appreciate being CC'd on any
> > discussions, especially if there's anything to correct on my part.
>
> In the in-tree version of virtual.c are these two lines:
>
> #define u_char unsigned char
> #define u_int unsigned int
>
> This is from sys/types.h
>
> #if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
> typedef unsigned char u_char;
> typedef unsigned short u_short;
> typedef unsigned int u_int;
> typedef unsigned long u_long;
>
> typedef unsigned char unchar; /* Sys V compatibility */
> typedef unsigned short ushort; /* Sys V compatibility */
> typedef unsigned int uint; /* Sys V compatibility */
> typedef unsigned long ulong; /* Sys V compatibility */
> #endif
Thanks.
Adding the two #define's looks like a kludge to work around the
inconsistency between OpenBSD's sys/types.h and arpa/inet.h when
_XOPEN_SOURCE is defined. Does XPG really outlaw u_* types
definitions in system headers? Is this meant to also outlaw
arpa/inet.h?
> Adding the two defines to virtual.c from 0.6.3 and changing
> from AUTH_SHADOW to AUTH_PASSWD is enough to get it compiled cleanly
> (aside from the sprintf() lecturing)
I intend to replace the (safe) uses of sprintf(), but not with
asprintf() like is done in the OpenBSD tree.
--
/sd
Powered by Openwall GNU/*/Linux -
Powered by OpenVZ