Apache OpenOffice (AOO) Bugzilla – Issue 2418
statfs refences differ on IRIX
Last modified: 2003-11-23 11:57:01 UTC
The statfs system call used in sal/osl/unx/file.c for obtaining file system information does not currently work on IRIX. The statfs struct on IRIX differs to other *IX platforms, and so do the arguments in the statfs system call. To be more specific: - The member of the statfs structure that returns the count of free blocks is f_bavail on other *IX platforms, but on IRIX is f_bfree. - The statfs system call is `int statfs (const char *path, struct statfs *buf);` on other *IX platforms, but on IRIX, has the following form: int statfs (const char *path, struct statfs *buf, int len, int fstyp);
Created attachment 755 [details] sal/osl/unx/file.c - statfs fix for IRIX. This is the preferable fix of the 2 patches supplied for this issue
Created attachment 756 [details] sal/osl/unx/file.c - statfs fix for IRIX. Non preferable patch.
The first of the 2 patches is the preferable choice, as it is much cleaner and neater, and leaves the code in a more readable state. It has been tested under Linux, and caused no problems. It does create a new couple more new macro's to replcae some calls and refences to statfs in the code that are not compatable under IRIX. The second patch is there because it looks to have less impact on other platforms (although the first is fine also).
KR->HRO: Please have a look at this.
-
Would be great if we could get one of these checked in for 1.0. Thanks
Patch 2418-1 applied. File(s) changed: porting/sal/osl/unx/file.c, rev 1.51.2.4
The patch contained a small error that has broken the solaris build. Martin drawed back the usage of the new macro __OSL_STATFS_FUNC to ensure the solaris and linux builds work. Actually Irix will not work, so I need to apply a minor change to reactivate functionaly on solaris AND irix.
Modified changes made for issue 4329 to work on Irix ANS Solaris. sal/osl/unx/file.c, rev 1.51.2.6
*** Issue 4551 has been marked as a duplicate of this issue. ***
I'd like to reopen this issue, as we are now using statvfs on Irix rather than statfs. Attached is patch for the changes, and this only affects IRIX. George
Re assigning to Nick as it is a simple porting issue affecting only Irix
Created attachment 5080 [details] patch for irix
Added milestone
Accepting...
If nick approves then I approve. It is specific to IRIX. Should this be checked in configure and set there somehow?
Checked in sal/osl/unx/file.c - 1.51.2.12 - (OOO_STABLE_1)
Closing.