aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2020-05-17 12:38:32 -0400
committerRuss Cox <rsc@swtch.com>2020-05-17 20:15:41 -0400
commit16f60479e16e3714b376e633c6b902a32e0607ea (patch)
treeabf8c947b88aad79c32c0c604dc9010f24088d9d
parent6fd4e901ce48f2e056c505c81320f786175588ff (diff)
downloadplan9port-16f60479e16e3714b376e633c6b902a32e0607ea.tar.gz
plan9port-16f60479e16e3714b376e633c6b902a32e0607ea.tar.bz2
plan9port-16f60479e16e3714b376e633c6b902a32e0607ea.zip
lib9: move seek into open.c
More preparation for opendir.
-rw-r--r--src/lib9/mkfile1
-rw-r--r--src/lib9/open.c7
-rw-r--r--src/lib9/seek.c8
-rw-r--r--src/mkmk.sh3
4 files changed, 7 insertions, 12 deletions
diff --git a/src/lib9/mkfile b/src/lib9/mkfile
index 6fb3d4a7..db267dfe 100644
--- a/src/lib9/mkfile
+++ b/src/lib9/mkfile
@@ -139,7 +139,6 @@ LIB9OFILES=\
readn.$O\
rfork.$O\
searchpath.$O\
- seek.$O\
sendfd.$O\
sleep.$O\
strdup.$O\
diff --git a/src/lib9/open.c b/src/lib9/open.c
index 43910694..ffee7931 100644
--- a/src/lib9/open.c
+++ b/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__)
diff --git a/src/lib9/seek.c b/src/lib9/seek.c
deleted file mode 100644
index b626355f..00000000
--- a/src/lib9/seek.c
+++ /dev/null
@@ -1,8 +0,0 @@
-#include <u.h>
-#include <libc.h>
-
-vlong
-seek(int fd, vlong offset, int whence)
-{
- return lseek(fd, offset, whence);
-}
diff --git a/src/mkmk.sh b/src/mkmk.sh
index 8094c3ea..89c311f3 100644
--- a/src/mkmk.sh
+++ b/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`