From 2a940c1a22765411b70679bf886714930aeaf79f Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 14 Mar 2003 18:39:05 +0000 Subject: * 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. --- newlib/libc/include/stdio.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'newlib/libc/include/stdio.h') 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 *, ...)); -- cgit v1.2.3