Subject: IRIX emulation, getting there.

From: Miguel de Icaza <[email-masked]>
Date: Thu, 4 Sep 1997 22:50:43 -0500

This is my next show stopper:

   There is a misterious fcntl call in the IRIX Xsgi server:
it is called with the F_ALLOCSP flag, what is this flag used for in
the X server setup code?  

Cheers,
Miguel.

[
   Unsolved misteries -- update

   The magical address at 0x200000 in the IRIX executables contains
   a one zeroed-page, for now I have mapped an empty page at this
   location on every IRIX program that is ran on the system.

   Both the usinit() test and the Xsgi server can continue execution
   under this scenario now, but it is still hackish. 

]

---

From: "William J. Earl" <[email-masked]>
Date: Mon, 8 Sep 1997 10:55:12 -0700

> it is called with the F_ALLOCSP flag, what is this flag used for in
...

     This fcntl() sets the size of a file, and assures that
the underlying storage is really assigned.  From fcntl(2):

     F_FREESP  Alter storage space associated with a section of	the ordinary
	       file fildes.  The section is specified by a variable of data
	       type struct flock pointed to by the third argument arg.	The
	       data type struct	flock is defined in the	<fcntl.h> header file
	       [see fcntl(5)] and contains the following members:  l_whence is
	       0, 1, or	2 to indicate that the relative	offset l_start will be
	       measured	from the start of the file, the	current	position, or
	       the end of the file, respectively.  l_start is the offset from
	       the position specified in l_whence.  l_len is the size of the
	       section.	 An l_len of 0 frees up	to the end of the file;	in
	       this case, the end of file (i.e., file size) is set to the
	       beginning of the	section	freed.	Any data previously written
	       into this section is no longer accessible.  If the section
	       specified is beyond the current end of file, the	file is	grown
	       and filled with zeroes.	The l_len field	is currently ignored,
	       and should be set to 0.

     F_ALLOCSP This command is identical to F_FREESP.