[comp.windows.x] syscalls in XView

yanagida@ole.UUCP (Bruce A. Yanagida) (09/19/89)

I retrieved  a copy  of the  XView source  from the  archives and  tried
porting it to  an Apollo (DN3500  running SR10.1), since  it's the  only
X11R3 system I  have.  However,  there is  one major problem  I have  in
completing the port.

XView defines its own "fcntl", "read", and "select" functions and  makes
use of the "syscall" facility  to get to the  real system calls.   Since
Apollo SR10.1  does not  have "syscall",  I'm stuck!   Anyone  have  any
suggestions on how to get around this problem?  If I had source code for
the system, I  could insert the  real code  in place of  syscall, but  I
don't.  Am I out of luck?
-- 
Bruce A. Yanagida		(UUCP:  ...!uw-beaver!sumax!ole!yanagida)
Seattle Silicon Corporation
3075 112th Ave NE
Bellevue, WA  98004 		(206)-828-4422

steve@acorn.co.uk (Steve "Daffy" Hunt) (09/20/89)

In article <1354@ole.UUCP> yanagida@ole.UUCP (Bruce A. Yanagida) writes:
>
>XView defines its own "fcntl", "read", and "select" functions and  makes
>use of the "syscall" facility  to get to the  real system calls.   Since
>Apollo SR10.1  does not  have "syscall",  I'm stuck!   Anyone  have  any
>suggestions on how to get around this problem?  If I had source code for
>the system, I  could insert the  real code  in place of  syscall, but  I
>don't.  Am I out of luck?

I had a similar problem when porting XView to Acorn's RISCiX (BSD)
system.  Your best bet in the short term is to disassemble your
libc and find the system call wrappers for the three functions
concerned.  Duplicate this code with new names such as real_fcntl, etc.
Call these in place of the three references to syscall().

Now, in the long term:

Would anyone at Sun care to comment on the way the notifier has
been written?  Is this part of XView going to be implemented in
a more portable fashion for later releases?

					Steve Hunt.

yanagida@ole.UUCP (Bruce A. Yanagida) (09/21/89)

In article <1354@ole.UUCP> yanagida@ole.UUCP (Bruce A. Yanagida) writes:
...
>
>XView defines its own "fcntl", "read", and "select" functions and  makes
>use of the "syscall" facility  to get to the  real system calls.   Since
>Apollo SR10.1  does not  have "syscall",  I'm stuck!   Anyone  have  any
...

In case anyone  else is interested,  I received a  work-around for  this
problem in my e-mail (thanks to steven!rob).

On an Apollo, you can use the "esa" Aegis command to obtain the  runtime
address of any C library function.  Just type:

	$ esa fcntl

Once, you have the address, you can assign it to a pointer to a function
in the code and away you go!
-- 
Bruce A. Yanagida		(UUCP:  ...!uw-beaver!sumax!ole!yanagida)
Seattle Silicon Corporation
3075 112th Ave NE
Bellevue, WA  98004 		(206)-828-4422