This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[commit] patchlet to build bfd on DJGPP
- From: Pedro Alves <pedro at codesourcery dot com>
- To: binutils at sourceware dot org
- Date: Sun, 10 Aug 2008 19:54:27 +0100
- Subject: [commit] patchlet to build bfd on DJGPP
Hi,
I recently when through the exercise of building GDB on DJGPP.
I needed the attached patch, because of:
cc1.exe: warnings being treated as errors
../../bfd/archive.c: In function '_bfd_archive_bsd_update_armap_timestamp':
../../bfd/archive.c:2314: warning: comparison between signed and unsigned
, since, time_t in djgpp is unsigned int,
and armap_timestamp is,
/* when more compilers are standard C, this can be a time_t */
long armap_timestamp; /* Timestamp value written into armap.
Daniel Jacobowitz approved this on the GDB list, so I checked it in.
--
Pedro Alves
bfd/
2008-08-09 Pedro Alves <pedro@codesourcery.com>
* archive.c (_bfd_archive_bsd_update_armap_timestamp): Cast stat
st_mtime to long before comparison.
---
bfd/archive.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: src/bfd/archive.c
===================================================================
--- src.orig/bfd/archive.c 2008-08-10 19:46:15.000000000 +0100
+++ src/bfd/archive.c 2008-08-10 19:46:22.000000000 +0100
@@ -2311,7 +2311,7 @@ _bfd_archive_bsd_update_armap_timestamp
/* Can't read mod time for some reason. */
return TRUE;
}
- if (archstat.st_mtime <= bfd_ardata (arch)->armap_timestamp)
+ if (((long) archstat.st_mtime) <= bfd_ardata (arch)->armap_timestamp)
/* OK by the linker's rules. */
return TRUE;