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.
This commit is contained in:
rsc 2003-11-25 01:40:27 +00:00
parent dc13c29ed1
commit f7012583e9
41 changed files with 300 additions and 163 deletions

View file

@ -1,31 +1,22 @@
#include <u.h>
#define NOPLAN9DEFINES
#include <libc.h>
#undef asctime
#undef ctime
#undef gmtime
#undef localtime
#include <sys/stat.h>
#include <dirent.h>
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;
}