This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

"make check" failed


I got

bug-ftell.c: In function `do_test':
bug-ftell.c:32: warning: assignment discards qualifiers from pointer target
typebug-ftell.c:40: error: `off_t' undeclared (first use in this function)
bug-ftell.c:40: error: (Each undeclared identifier is reported only once
bug-ftell.c:40: error: for each function it appears in.)
bug-ftell.c:40: error: parse error before "o"
bug-ftell.c:41: error: `o' undeclared (first use in this function)

Shouldn't off_t be used on ftello instead of __off_t? I am testing
this patch.


H.J.
---
2003-09-06  H.J. Lu  <hongjiu.lu@intel.com>

	* libio/stdio.h (off_t): Defined if __USE_LARGEFILE is defined.
	(off64_t): Likewise.
	(fseeko): Use off_t/off64_t instead of __off_t/__off64_t.
	(ftello): Likewise.
	(fseeko64): Likewise.
	(ftello64): Likewise.

--- libio/stdio.h.off_t	2003-09-04 09:10:21.000000000 -0700
+++ libio/stdio.h	2003-09-06 16:17:11.000000000 -0700
@@ -659,23 +659,36 @@ __END_NAMESPACE_STD
    are originally defined in the Large File Support API.  */
 
 #ifdef __USE_LARGEFILE
+# ifndef __off_t_defined
+#  ifndef __USE_FILE_OFFSET64
+typedef __off_t off_t;
+#  else
+typedef __off64_t off_t;
+#  endif
+#  define __off_t_defined
+# endif
+# if defined __USE_LARGEFILE64 && !defined __off64_t_defined
+typedef __off64_t off64_t;
+#  define __off64_t_defined
+# endif
+
 # ifndef __USE_FILE_OFFSET64
 /* Seek to a certain position on STREAM.
 
    This function is a possible cancellation point and therefore not
    marked with __THROW.  */
-extern int fseeko (FILE *__stream, __off_t __off, int __whence);
+extern int fseeko (FILE *__stream, off_t __off, int __whence);
 /* Return the current position of STREAM.
 
    This function is a possible cancellation point and therefore not
    marked with __THROW.  */
-extern __off_t ftello (FILE *__stream);
+extern off_t ftello (FILE *__stream);
 # else
 #  ifdef __REDIRECT
 extern int __REDIRECT (fseeko,
-		       (FILE *__stream, __off64_t __off, int __whence),
+		       (FILE *__stream, off64_t __off, int __whence),
 		       fseeko64);
-extern __off64_t __REDIRECT (ftello, (FILE *__stream), ftello64);
+extern off64_t __REDIRECT (ftello, (FILE *__stream), ftello64);
 #  else
 #   define fseeko fseeko64
 #   define ftello ftello64
@@ -709,8 +722,8 @@ extern int __REDIRECT (fsetpos,
 __END_NAMESPACE_STD
 
 #ifdef __USE_LARGEFILE64
-extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence);
-extern __off64_t ftello64 (FILE *__stream);
+extern int fseeko64 (FILE *__stream, off64_t __off, int __whence);
+extern off64_t ftello64 (FILE *__stream);
 extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos);
 extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos);
 #endif


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]