summaryrefslogtreecommitdiffstats
path: root/newlib/libc/include
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2003-03-14 18:39:05 +0000
committerCorinna Vinschen <corinna@vinschen.de>2003-03-14 18:39:05 +0000
commit2a940c1a22765411b70679bf886714930aeaf79f (patch)
treeade7a084e6ec2a2bb749cabcae9edde004904362 /newlib/libc/include
parent2359084b5b6c00a44d8ca9534e71b2d8671d6ffb (diff)
downloadcygnal-2a940c1a22765411b70679bf886714930aeaf79f.tar.gz
cygnal-2a940c1a22765411b70679bf886714930aeaf79f.tar.bz2
cygnal-2a940c1a22765411b70679bf886714930aeaf79f.zip
* libc/include/stdio.h: Declare fgetpos, fsetpos, fseeko and ftello
with internal (_fpos_t and _off_t) datatypes when compiling newlib. * libc/include/sys/unistd.h: Declare _lseek using _off_t. * libc/reent/lseekr.c (_lseek_r): Use _off_t instead of off_t. * libc/stdio/fseeko.c (fseeko): Ditto. * libc/stdio/ftello.c (ftello): Ditto. * libc/stdio/stdio.c (__swrite): Ditto. (__sseek): Ditto. * libc/stdio/fgetpos.c (fgetpos): Use _fpos_t instead of fpos_t. * libc/stdio/fseek.c (fseek): Ditto. * libc/stdio/fsetpos.c (fsetpos): Ditto. * libc/stdio/ftell.c (ftell): Ditto. * libc/stdio/local.h: Declare __sseek using _off_t.
Diffstat (limited to 'newlib/libc/include')
-rw-r--r--newlib/libc/include/stdio.h13
-rw-r--r--newlib/libc/include/sys/unistd.h2
2 files changed, 14 insertions, 1 deletions
diff --git a/newlib/libc/include/stdio.h b/newlib/libc/include/stdio.h
index 3e1162cab..3531c981e 100644
--- a/newlib/libc/include/stdio.h
+++ b/newlib/libc/include/stdio.h
@@ -195,9 +195,17 @@ int _EXFUN(puts, (const char *));
int _EXFUN(ungetc, (int, FILE *));
size_t _EXFUN(fread, (_PTR, size_t _size, size_t _n, FILE *));
size_t _EXFUN(fwrite, (const _PTR , size_t _size, size_t _n, FILE *));
+#ifdef _COMPILING_NEWLIB
+int _EXFUN(fgetpos, (FILE *, _fpos_t *));
+#else
int _EXFUN(fgetpos, (FILE *, fpos_t *));
+#endif
int _EXFUN(fseek, (FILE *, long, int));
+#ifdef _COMPILING_NEWLIB
+int _EXFUN(fsetpos, (FILE *, const _fpos_t *));
+#else
int _EXFUN(fsetpos, (FILE *, const fpos_t *));
+#endif
long _EXFUN(ftell, ( FILE *));
void _EXFUN(rewind, (FILE *));
void _EXFUN(clearerr, (FILE *));
@@ -212,8 +220,13 @@ int _EXFUN(rename, (const char *, const char *));
#endif
#ifndef __STRICT_ANSI__
int _EXFUN(asprintf, (char **, const char *, ...));
+#ifdef _COMPILING_NEWLIB
+int _EXFUN(fseeko, (FILE *, _off_t, int));
+_off_t _EXFUN(ftello, ( FILE *));
+#else
int _EXFUN(fseeko, (FILE *, off_t, int));
off_t _EXFUN(ftello, ( FILE *));
+#endif
int _EXFUN(vfiprintf, (FILE *, const char *, __VALIST));
int _EXFUN(iprintf, (const char *, ...));
int _EXFUN(fiprintf, (FILE *, const char *, ...));
diff --git a/newlib/libc/include/sys/unistd.h b/newlib/libc/include/sys/unistd.h
index 49d2a592d..8678a3c9b 100644
--- a/newlib/libc/include/sys/unistd.h
+++ b/newlib/libc/include/sys/unistd.h
@@ -165,7 +165,7 @@ int _EXFUN(_close, (int __fildes ));
pid_t _EXFUN(_fork, (void ));
pid_t _EXFUN(_getpid, (void ));
int _EXFUN(_link, (const char *__path1, const char *__path2 ));
-off_t _EXFUN(_lseek, (int __fildes, off_t __offset, int __whence ));
+_off_t _EXFUN(_lseek, (int __fildes, _off_t __offset, int __whence ));
_READ_WRITE_RETURN_TYPE _EXFUN(_read, (int __fd, void *__buf, size_t __nbyte ));
void * _EXFUN(_sbrk, (ptrdiff_t __incr));
int _EXFUN(_unlink, (const char *__path ));