linux / solaris vs other *nix file handling in sal/osl/unx/file.c

Francois Tigeot ftigeot at wolfpond.org
Wed Jan 2 03:39:58 PST 2013


Hi,

On Wed, Jan 02, 2013 at 12:03:16PM +0100, Riccardo Magliocchetti wrote:
> Il 01/01/2013 14:36, Riccardo Magliocchetti ha scritto:
> >
> >does anyone know why linux and solaris are using pread / pwrite syscalls
> >while other unixes are using read + lseek? The code is at least
> >FileHandle_Impl::writeAt which AFAIU is the base for the osl_* file
> >functions.
> 
> Patch attached if anyone on these plaforms want to give it a try.

I tried a patched out LibreOffice-3.6.4 on DragonFly; it worked like a charm.
Reading and opening files even seemed a bit faster.

There is absolutely no justification for the linux+solaris check. HPUX
support has been removed along with OS/2 and other dead or dying platforms
anyway.

I encountered many #if defined(OPERATING_SYSTEM_FOO) checks while porting
LibreOffice to a new platform and can't help to think they were badly written
in the first place.
They should have checked for particular features if anything, not operating
system names.

configure.ac contains at least one similar bug; I'll send patches in another
thread.

-- 
Francois Tigeot


More information about the LibreOffice mailing list