bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LynxOS 3.1.1 Port


From: Federico Montesino Pouzols
Subject: Re: LynxOS 3.1.1 Port
Date: Sun, 16 Feb 2003 14:52:51 +0100
User-agent: Mutt/1.4i

        Hi,...

On Fri, Feb 07, 2003 at 04:32:09PM -0600, Joel Sherrill wrote:
> 
> Hi,
> 
> I am entering the test phase of my port of Common C++ to LynxOS
> 3.1.1.  I am filing the appropriate paperwork with the FSF but
> for now want to get some feedback on some porting issues and
> how to do them more cleanly.  Right now, there are a handful
> of __Lynx__ conditionals I want to eliminate.
> 
> (1) LynxOS has this prototype for sigwait() 
> 
> int sigwait            (sigset_t *, void **);
> 
> Currently, OST_CC_SIGNAL checks for 1 or 2 arguments to sigwait()
> but the common 2 arg variety if not this one.  Any ideas on how to
> detect it so I don't have to stoop to an ifdef on __Lynx__
> 

        I do not know if this flavour of sigwait exists on platforms
other than lynxos, but we could have a more general test if we added a
grep to check if 'void **' appears in the sigwait prototype.

> (2) inet_aton(char *, .. )     not inet_aton(const char *, ..)
>     gethostbyname(char *, .. ) not gethostbyname(const char *, ..)
>     openlog(char *,..)         not openlog(const char *, ..)
> 
> Again how to detect and deal with this without stopping to 
> ifdef __Lynx__.
> 

        As Pierre Bacquet has pointed out, this looks like a bug in
lynxos headers. It seems that the code will have to be uglyfied if we
want it to work on lynxos.

> (3) autoconf decides that LynxOS has PTHREAD_MUTEXTYPE_RECURSIVE
> but LynxOS doesn't have pthread_mutexattr_settype().
> 

        So it seems that the checks in ost_pthread.m4 should be
strengthened to check for pthread_mutexattr_settype() as well as the
other things currently checked for.

> (4) The structure used for SIOCGIFNETMASK around line 120
> in src/network.cpp has different names in LynxOS:
> 
> #if defined(__Lynx__)
>                         (InetAddress&)maskaddr =
> ((sockaddr_in&)devifreq).sin_addr;
> #else
>                         (InetAddress&)maskaddr =
> ((sockaddr_in&)devifreq.ifr_netmask).sin_addr;
> #endif
> 
> (5) SIOCGIFMTU is not defined in LynxOS so I just set mtu.c in
> src/network.cpp around line 128.
> 

        Perhaps a TRY_COMPILE for (4) and (5) would be more general
than a 'defined(__Lynx__)'.

> (6) In src/process.cpp and src/thread.cpp, signalexec_t has to be this:
> 
> #if defined(__Lynx__)
> typedef RETSIGTYPE (*signalexec_t)(...);
> #else
> typedef RETSIGTYPE (*signalexec_t)(int);
> #endif
> 
> The rest of the changes I managed to accomodate with autoconf macro
> changes
> or minor type changes to remove warnings.  I have attached the entire 
> patch for review and comments.   I still have testing to go so I am
> sure this is not the final iteration of it. :)
> 

        By the way, how does cc++ work on RTEMS?

> Thanks.
> 
> -- 
> Joel Sherrill, Ph.D.             Director of Research & Development
> address@hidden                 On-Line Applications Research
> Ask me about RTEMS: a free RTOS  Huntsville AL 35805
> Support Available                (256) 722-9985




reply via email to

[Prev in Thread] Current Thread [Next in Thread]