To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 497
496  |  498
Subject: 
Re: O_ASYNC problem (Solaris again)
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Fri, 19 Nov 1999 05:54:26 GMT
Viewed: 
1748 times
  
On Fri, 19 Nov 1999, michael yates wrote:
We are persisting with our build on solaris for legOS 0.2.2 things are getting
closer. We have sorted out the getopt.h problems by just copying the getopt.c
and getopt.h into the dll-src directory (because it is a known path for the
Makefile for dll-src). We will talk more with the sys admin at a later date
about where our copy of getopt.* has gone from /usr/include or wether Solaris
ever had it.

I think it is quite likely that Solaris does not have it- neither Solaris
i386 or Solaris Sparc (at least the versions that I have access to) have it.

Anyhow we are now up against another problem. This time the culprit is
O_ASYNC. It seems that this is an undeclared identifier. What file does this
usually reside in from the bunch of .h includes in loader.c?? Here are two
Solaris captures to illustrate the problem
<snip much compiler output>
as you can see redefining O_ASYNC to FASYNC does not help the situation at all
as it appears under Solaris FASYNC is also somethnig which is not known. :(.
This was tried because of another older post in lugnet/legoS (can't remember
the number but just do a search for O_ASYNC and it pops up)

Anyone have any ideas?

Hmm. O_ASYNC is defined in /usr/include/bits/fcntl.h under Linux. The
equivalent file in Solaris is /usr/include/sys/fcntl.h. Unfortunately,
there is no easy replacement.

O_ASYNC is not POSIX compliant in any way, in fact (AFAICT) it has no
simple equivalent in a POSIX system like Solaris. What O_ASYNC does is
makes the file access asynchronous, and sends a signal (SIGIO) when the
file is available for writing or reading.

So... no simple #define is going to do it (I don't think.) I've asked some
local programmers for help with it, but no responses yet. In the meantime,
you'll probably want to look at man -s5 aio, which is a start on the
description of the Solaris way to handle asynchronous i/o events.

On the other hand, it is not clear from the code (and my total lack of
experience with this kind of thing) that aio is needed anyway. You may
want to try something like O_SYNC or O_RSYNC to replace O_ASYNC, and just
call the sigio_handler once (since it appears to me that it should be
called immediately after the first fcntl call, anyway.)

Anyway- that's about all I can think of for now. Markus may be able to
fill you in on more details about the role of aio and the sigio_handler
in the code- I'm not sure why it's there, so I'm afraid I've probably
reached the end of my usefulness.

Good luck- please keep updating us with your progress-
Luis

#######################################################################

     Profanity is the one language that all programmers understand.
                  -Anonymous

#######################################################################



Message is in Reply To:
  O_ASYNC problem (Solaris again)
 
Hi all, We are persisting with our build on solaris for legOS 0.2.2 things are getting closer. We have sorted out the getopt.h problems by just copying the getopt.c and getopt.h into the dll-src directory (because it is a known path for the Makefile (...) (25 years ago, 19-Nov-99, to lugnet.robotics.rcx.legos)

3 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR