summaryrefslogtreecommitdiff
path: root/libc/stdio/_cs_funcs.c
blob: 7dfb120f5bd41f7487f6a2e6a98819ade311615b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* Copyright (C) 2004-2005 Manuel Novoa III    <mjn3@codepoet.org>
 *
 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
 *
 * Dedicated to Toni.  See uClibc/DEDICATION.mjn3 for details.
 */

#include "_stdio.h"

/**********************************************************************/

int attribute_hidden __stdio_seek(FILE *stream, register __offmax_t *pos, int whence)
{
	__offmax_t res;

	res = lseek64(stream->__filedes, *pos, whence);

	return (res >= 0) ? ((*pos = res), 0) : ((int) res);
}

/**********************************************************************/