OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [uclinux/] [uC-libc/] [sysdeps/] [seekdir.c] - Blame information for rev 1778

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 199 simons
#define lseek __normal_lseek
2
#include <unistd.h>
3
#include <errno.h>
4
#undef _POSIX_PTHREADS
5
#include <syscall.h>
6
#undef lseek
7
 
8
#include "dirstream.h"
9
 
10
static inline
11
_syscall3(off_t,lseek,int,fildes,off_t,offset,int,origin)
12
 
13
void seekdir(DIR * dir, off_t offset)
14
{
15
  if (!dir) {
16
    errno = EBADF;
17
    return;
18
  }
19
  dir->dd_nextoff = lseek(dir->dd_fd, offset, SEEK_SET);
20
  dir->dd_size = dir->dd_nextloc = 0;
21
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.