3 * _lseek.c - lseek() which knows sockets (SAS/C)
5 * Copyright © 1994 AmiTCP/IP Group,
6 * Network Solutions Development Inc.
16 #include <proto/dos.h>
19 __lseek(int fd
, long rpos
, int mode
)
25 * Check for the break signals
31 if ((ufb
= __chkufb(fd
)) == NULL
) {
38 if (ufb
->ufbflg
& UFB_SOCK
) {
39 errno
= ESPIPE
; /* illegal seek */
43 if ((apos
= Seek(ufb
->ufbfh
, rpos
, mode
- 1)) == -1) {
55 return Seek(ufb
->ufbfh
, 0, 0);