fix ftell

This commit is contained in:
Dave Murphy
2011-01-17 14:29:57 +00:00
parent c7cc6af73a
commit 305ccfede5

View File

@@ -6708,7 +6708,7 @@ diff -Nbaur newlib-1.19.0/newlib/libc/include/stdint.h newlib-1.19.0-ppc/newlib/
typedef signed short int32_t;
typedef unsigned short uint32_t;
diff -Nbaur newlib-1.19.0/newlib/libc/include/stdio.h newlib-1.19.0-ppc/newlib/libc/include/stdio.h
--- newlib-1.19.0/newlib/libc/include/stdio.h 2010-02-26 09:41:43.000000000 +0000
--- newlib-1.19.0/newlib/libc/include/stdio.h 2010-02-26 09:41:43.000000000 +0000
+++ newlib-1.19.0-ppc/newlib/libc/include/stdio.h 2011-01-17 14:27:34.000000000 +0000
@@ -209,13 +209,13 @@
#else
@@ -6725,15 +6725,18 @@ diff -Nbaur newlib-1.19.0/newlib/libc/include/stdio.h newlib-1.19.0-ppc/newlib/l
+off_t _EXFUN(ftell, ( FILE *));
void _EXFUN(rewind, (FILE *));
void _EXFUN(clearerr, (FILE *));
int _EXFUN(feof, (FILE *));
int _EXFUN(feof, (FILE *));
@@ -394,9 +394,9 @@
size_t _EXFUN(_fread_r, (struct _reent *, _PTR, size_t _size, size_t _n, FILE *));
int _EXFUN(_fscanf_r, (struct _reent *, FILE *, const char *, ...)
_ATTRIBUTE ((__format__ (__scanf__, 3, 4))));
-int _EXFUN(_fseek_r, (struct _reent *, FILE *, long, int));
+int _EXFUN(_fseek_r, (struct _reent *, FILE *, off_t, int));
int _EXFUN(_fseeko_r,(struct _reent *, FILE *, _off_t, int));
int _EXFUN(_fseeko_r,(struct _reent *, FILE *, _off_t, int));
-long _EXFUN(_ftell_r, (struct _reent *, FILE *));
+_off_t _EXFUN(_ftell_r, (struct _reent *, FILE *));
_off_t _EXFUN(_ftello_r,(struct _reent *, FILE *));
void _EXFUN(_rewind_r, (struct _reent *, FILE *));
size_t _EXFUN(_fwrite_r, (struct _reent *, const _PTR , size_t _size, size_t _n, FILE *));
diff -Nbaur newlib-1.19.0/newlib/libc/include/sys/dirent.h newlib-1.19.0-ppc/newlib/libc/include/sys/dirent.h
--- newlib-1.19.0/newlib/libc/include/sys/dirent.h 2005-10-04 21:47:39.000000000 +0100
@@ -7216,6 +7219,27 @@ diff -Nbaur newlib-1.19.0/newlib/libc/stdio/fseeko.c newlib-1.19.0-ppc/newlib/li
+ return _fseek_r (_REENT, fp, offset, whence);
}
#endif /* !_REENT_ONLY */
diff -Nbaur newlib-1.19.0/newlib/libc/stdio/ftell.c newlib-1.19.0-ppc/newlib/libc/stdio/ftell.c
--- newlib-1.19.0/newlib/libc/stdio/ftell.c 2008-03-04 02:22:36.000000000 +0000
+++ newlib-1.19.0-ppc/newlib/libc/stdio/ftell.c 2011-01-17 14:28:09.000000000 +0000
@@ -98,7 +98,7 @@
#include <errno.h>
#include "local.h"
-long
+_off_t
_DEFUN(_ftell_r, (ptr, fp),
struct _reent *ptr _AND
register FILE * fp)
@@ -167,7 +167,7 @@
#ifndef _REENT_ONLY
-long
+off_t
_DEFUN(ftell, (fp),
register FILE * fp)
{
diff -Nbaur newlib-1.19.0/newlib/libc/stdio/fvwrite.c newlib-1.19.0-ppc/newlib/libc/stdio/fvwrite.c
--- newlib-1.19.0/newlib/libc/stdio/fvwrite.c 2007-07-13 21:37:53.000000000 +0100