commit 16f60479e16e3714b376e633c6b902a32e0607ea from: Russ Cox date: Mon May 18 00:15:41 2020 UTC lib9: move seek into open.c More preparation for opendir. commit - 6fd4e901ce48f2e056c505c81320f786175588ff commit + 16f60479e16e3714b376e633c6b902a32e0607ea blob - 6fb3d4a7a82079acd0fec398e5ea362c33fed74d blob + db267dfed587aa96952ee1c3dda1e01833e04a1b --- src/lib9/mkfile +++ src/lib9/mkfile @@ -139,7 +139,6 @@ LIB9OFILES=\ readn.$O\ rfork.$O\ searchpath.$O\ - seek.$O\ sendfd.$O\ sleep.$O\ strdup.$O\ blob - 439106941cc6cb53b59db8c9733e02732e836580 blob + ffee793100f0168f2cb785bf7f9371e177e60f56 --- src/lib9/open.c +++ src/lib9/open.c @@ -129,13 +129,18 @@ p9open(char *name, int mode) return fd; } +vlong +p9seek(int fd, vlong offset, int whence) +{ + return lseek(fd, offset, whence); +} + int p9close(int fd) { return close(fd); } - extern int _p9dir(struct stat*, struct stat*, char*, Dir*, char**, char*); #if defined(__linux__) blob - b626355fbb2c33f331ca84df19ee14d2d1c693f2 (mode 644) blob + /dev/null --- src/lib9/seek.c +++ /dev/null @@ -1,8 +0,0 @@ -#include -#include - -vlong -seek(int fd, vlong offset, int whence) -{ - return lseek(fd, offset, whence); -} blob - 8094c3eabcef60964ce373d3c30021248b4bbfc6 blob + 89c311f36a5e0c356d25bcd83141e139e9ccf42e --- src/mkmk.sh +++ src/mkmk.sh @@ -73,7 +73,6 @@ echo cd `pwd` 9c readn.c 9c rfork.c 9c searchpath.c -9c seek.c 9c sendfd.c 9c sleep.c 9c strdup.c @@ -149,7 +148,7 @@ echo cd `pwd` 9c utf/utfrrune.c 9c utf/utfrune.c 9c utf/utfutf.c -9ar rsc $PLAN9/lib/lib9.a _exits.o _p9dialparse.o _p9dir.o announce.o argv0.o atexit.o atoi.o atol.o atoll.o atnotify.o await.o cistrcmp.o cistrncmp.o cistrstr.o cleanname.o convD2M.o convM2D.o convM2S.o convS2M.o crypt.o ctime.o dial.o dirfstat.o dirfwstat.o dirmodefmt.o dirstat.o dirwstat.o dup.o encodefmt.o errstr.o exec.o execl.o exitcode.o fcallfmt.o frand.o get9root.o getcallerpc.o getenv.o getfields.o getnetconn.o getns.o getuser.o getwd.o jmp.o lrand.o lnrand.o main.o malloc.o malloctag.o mallocz.o nan.o needsrcquote.o needstack.o netcrypt.o netmkaddr.o notify.o nrand.o nulldir.o open.o opentemp.o pin.o pipe.o post9p.o postnote.o qlock.o quote.o rand.o read9pmsg.o readcons.o readn.o rfork.o searchpath.o seek.o sendfd.o sleep.o strdup.o strecpy.o sysfatal.o syslog.o sysname.o time.o tm2sec.o tokenize.o truerand.o u16.o u32.o u64.o unsharp.o wait.o waitpid.o write.o zoneinfo.o dofmt.o fltfmt.o fmt.o fmtfd.o fmtfdflush.o fmtlocale.o fmtlock2.o fmtnull.o fmtprint.o fmtquote.o fmtrune.o fmtstr.o fmtvprint.o fprint.o frexp.o nan64.o print.o runefmtstr.o runeseprint.o runesmprint.o runesnprint.o runesprint.o runevseprint.o runevsmprint.o runevsnprint.o seprint.o smprint.o snprint.o sprint.o strtod.o vfprint.o vseprint.o vsmprint.o vsnprint.o charstod.o pow10.o rune.o runestrcat.o runestrchr.o runestrcmp.o runestrcpy.o runestrdup.o runestrlen.o runestrecpy.o runestrncat.o runestrncmp.o runestrncpy.o runestrrchr.o runestrstr.o runetype.o utfecpy.o utflen.o utfnlen.o utfrrune.o utfrune.o utfutf.o +9ar rsc $PLAN9/lib/lib9.a _exits.o _p9dialparse.o _p9dir.o announce.o argv0.o atexit.o atoi.o atol.o atoll.o atnotify.o await.o cistrcmp.o cistrncmp.o cistrstr.o cleanname.o convD2M.o convM2D.o convM2S.o convS2M.o crypt.o ctime.o dial.o dirfstat.o dirfwstat.o dirmodefmt.o dirstat.o dirwstat.o dup.o encodefmt.o errstr.o exec.o execl.o exitcode.o fcallfmt.o frand.o get9root.o getcallerpc.o getenv.o getfields.o getnetconn.o getns.o getuser.o getwd.o jmp.o lrand.o lnrand.o main.o malloc.o malloctag.o mallocz.o nan.o needsrcquote.o needstack.o netcrypt.o netmkaddr.o notify.o nrand.o nulldir.o open.o opentemp.o pin.o pipe.o post9p.o postnote.o qlock.o quote.o rand.o read9pmsg.o readcons.o readn.o rfork.o searchpath.o sendfd.o sleep.o strdup.o strecpy.o sysfatal.o syslog.o sysname.o time.o tm2sec.o tokenize.o truerand.o u16.o u32.o u64.o unsharp.o wait.o waitpid.o write.o zoneinfo.o dofmt.o fltfmt.o fmt.o fmtfd.o fmtfdflush.o fmtlocale.o fmtlock2.o fmtnull.o fmtprint.o fmtquote.o fmtrune.o fmtstr.o fmtvprint.o fprint.o frexp.o nan64.o print.o runefmtstr.o runeseprint.o runesmprint.o runesnprint.o runesprint.o runevseprint.o runevsmprint.o runevsnprint.o seprint.o smprint.o snprint.o sprint.o strtod.o vfprint.o vseprint.o vsmprint.o vsnprint.o charstod.o pow10.o rune.o runestrcat.o runestrchr.o runestrcmp.o runestrcpy.o runestrdup.o runestrlen.o runestrecpy.o runestrncat.o runestrncmp.o runestrncpy.o runestrrchr.o runestrstr.o runetype.o utfecpy.o utflen.o utfnlen.o utfrrune.o utfrune.o utfutf.o cd .. cd libbio echo cd `pwd`