Build failure on Debian testing (cross to arm-none-eabi)

Jerome Guitton guitton@gnat.com
Fri Apr 22 13:50:00 GMT 2005
Julian Brown (julian@codesourcery.com):

> I'm getting a build failure during "make install" on Debian testing with 
> binutils head, making a cross binutils to arm-none-eabi. This is the 
> failure:

OK. So, apparently off64_t is not defined at that point.

The only use of the fseeko family in bfd is in bfdio.c. It does not use
the type off64_t, but the bfd-specific type file_ptr. Unfortunately, this
type is defined in bfd.h, and I guess that sysdep.h should not depend on
bfd.h, right?

Moving the declarations to bfdio.c should help. Patch attached.
Can you confirm that it fixes the problem?

If so, is it OK to apply?

-- 
Jerome
-------------- next part --------------
2005-04-22  Jerome Guitton  <guitton@gnat.com>

	* sysdep.h: move declarations of ftello, fseeko, ftello64, fseek64...
	* bfdio.c: ... at the point where they are used.

Index: bfdio.c
===================================================================
RCS file: /cvs/src/src/bfd/bfdio.c,v
retrieving revision 1.9
diff -u -r1.9 bfdio.c
--- bfdio.c	3 Mar 2005 11:40:56 -0000	1.9
+++ bfdio.c	22 Apr 2005 13:46:16 -0000
@@ -43,9 +43,17 @@
 real_ftell (FILE *file)
 {
 #if defined (HAVE_FTELLO64)
+#if !HAVE_DECL_FTELLO64
+  extern file_ptr ftello64 (FILE *stream);
+#endif
   return ftello64 (file);
+
 #elif defined (HAVE_FTELLO)
+#if !HAVE_DECL_FTELLO
+  extern file_ptr ftello (FILE *stream);
+#endif
   return ftello (file);
+
 #else
   return ftell (file);
 #endif
@@ -55,9 +63,17 @@
 real_fseek (FILE *file, file_ptr offset, int whence)
 {
 #if defined (HAVE_FSEEKO64)
+#if !HAVE_DECL_FSEEKO64
+  extern int fseeko64 (FILE *stream, file_ptr offset, int whence);
+#endif
   return fseeko64 (file, offset, whence);
+
 #elif defined (HAVE_FSEEKO)
+#if !HAVE_DECL_FSEEKO
+  extern int fseeko (FILE *stream, file_ptr offset, int whence);
+#endif
   return fseeko (file, offset, whence);
+
 #else
   return fseek (file, offset, whence);
 #endif
Index: sysdep.h
===================================================================
RCS file: /cvs/src/src/bfd/sysdep.h,v
retrieving revision 1.9
diff -u -r1.9 sysdep.h
--- sysdep.h	20 Apr 2005 15:00:15 -0000	1.9
+++ sysdep.h	22 Apr 2005 13:46:16 -0000
@@ -129,30 +129,6 @@
 extern char *strstr ();
 #endif
 
-#ifdef HAVE_FTELLO
-#if !HAVE_DECL_FTELLO
-extern off_t ftello (FILE *stream);
-#endif
-#endif
-
-#ifdef HAVE_FTELLO64
-#if !HAVE_DECL_FTELLO64
-extern off64_t ftello64 (FILE *stream);
-#endif
-#endif
-
-#ifdef HAVE_FSEEKO
-#if !HAVE_DECL_FSEEKO
-extern int fseeko (FILE *stream, off_t offset, int whence);
-#endif
-#endif
-
-#ifdef HAVE_FSEEKO64
-#if !HAVE_DECL_FSEEKO64
-extern int fseeko64 (FILE *stream, off64_t offset, int whence);
-#endif
-#endif
-
 /* Define offsetof for those systems which lack it */
 
 #ifndef offsetof


More information about the Binutils mailing list