Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.Hawaii.Edu!news.uoregon.edu!arclight.uoregon.edu!hammer.uoregon.edu!csulb.edu!drivel.ics.uci.edu!news.cs.ucla.edu!twinsun!not-for-mail From: eggert@twinsun.com (Paul Eggert) Newsgroups: comp.unix.solaris,comp.unix.bsd.misc,comp.unix.internals Subject: Re: Solaris 2.6 Date: 9 Dec 1996 13:59:49 -0800 Organization: Twin Sun Inc, El Segundo, CA, USA Lines: 14 Distribution: inet Message-ID: <58i24l$68f$1@shade.twinsun.com> References: <32986299.AC7@mail.esrin.esa.it> <5844u3$mb@saltmine.radix.net> <587t33$2va@anorak.coverform.lan> <casper.32a7ec57@mail.fwi.uva.nl> <589l19$shp@cynic.portal.ca> <58a5e4$3kv@server05.icaen.uiowa.edu> <casper.32aa9981@mail.fwi.uva.nl> NNTP-Posting-Host: 192.54.239.27 Xref: euryale.cc.adfa.oz.au comp.unix.solaris:92607 comp.unix.bsd.misc:1826 comp.unix.internals:11632 casper@fwi.uva.nl (Casper H.S. Dik) writes: > As others have pointed out, fsetpos/fgetpos are the preferred > interfaces. They may be preferred to fseek, but that's not saying much. Few programs use fseek because of its poor performance and questionable portability (other than to seek to the beginning of the file). Even fewer programs use fsetpos and fgetpos, since they're newer (and thus not supported everywhere). And fsetpos and fgetpos _still_ don't let you do arithmetic on file pointers. Most programs that need to seek use lseek, and lseek is where you'll have problems when porting to Solaris 2.6's new file model.