From f7012583e9a7594cbb5ebe8e974bb69061189262 Mon Sep 17 00:00:00 2001 From: rsc Date: Tue, 25 Nov 2003 01:40:27 +0000 Subject: Add the #goo to allow use in C++. Silence a few more warnings. Strip down the mkfiles more. Fix bug in X11 mouse handling, note groups. --- src/lib9/dirread.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'src/lib9/dirread.c') diff --git a/src/lib9/dirread.c b/src/lib9/dirread.c index 2e1ce886..ab9ec7f5 100644 --- a/src/lib9/dirread.c +++ b/src/lib9/dirread.c @@ -1,31 +1,22 @@ #include +#define NOPLAN9DEFINES #include - -#undef asctime -#undef ctime -#undef gmtime -#undef localtime - #include #include extern int _p9dir(struct stat*, char*, Dir*, char**, char*); -/* everyone has getdirentries, just use that */ +/* almost everyone has getdirentries, just use that */ static int mygetdents(int fd, char *buf, int n) { ssize_t nn; -#if _GETDIRENTRIES_TAKES_LONG long off; -#else - off_t off; -#endif - off = seek(fd, 0, 1); + off = p9seek(fd, 0, 1); nn = getdirentries(fd, buf, n, &off); if(nn > 0) - seek(fd, off, 0); + p9seek(fd, off, 0); return nn; } -- cgit v1.2.3