Re: ioctl includes missing #ifdefs
Date: Fri, 14 Nov 2008 15:14:16 -0800
On Fri, Nov 14, 2008 at 12:02:33PM -0800, Jeff_Curley_at_playstation.sony.com wrote:
> In porting over to Cell I noticed a few includes missing ifdef's around
What operating system? Obviously not Linux...
> them like the following:
> are all missing checks around ioctl.h
> #include <sys/ioctl.h>
Good point. I've fixed those.
> In connect.c the function singleipconnect()
> has the following line:
> #if defined(EAGAIN) && EAGAIN != EWOULDBLOCK
> that's checking to see if EAGAIN and EWOULDBLOCK are different to see if it
> can add the EAGAIN case.
That's also going to fail in the same way if EAGAIN isn't defined. I've
split the checks onto two lines which should work in all cases.
> Secondly, if you look closely at this code you will see that EAGAIN is
> defined to the value 0x80010001, but on Cell there is a
> SYS_NET_ERROR_EAGAIN that is used and indeed is the same value as
> EWOULDBLOCK. That is to say Cell defines EAGAIN as one value, and
> SYS_NET_ERROR_EAGAIN as another value. EAGAIN on Cell isn't a valid return
> value for the connect function, in fact neither is SYS_NET_ERROR_EAGAIN. So
> in other words on Cell we'll need to avoid adding the EAGAIN case for
> connect() calls.
That sounds like a Cell-specific case all right. Would something like this:
#define EAGAIN SYS_NET_ERROR_EAGAIN
in setup.h solve the problem?
-- http://www.MoveAnnouncer.com The web change of address service Let webmasters know that your web site has movedReceived on 2008-11-15