This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: CVS HEAD broken for x86_64-pc-mingw32
- From: Nick Clifton <nickc at redhat dot com>
- To: Kai Tietz <Kai dot Tietz at onevision dot com>, NightStrike <nightstrike at gmail dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Fri, 11 Apr 2008 08:34:54 +0100
- Subject: Re: CVS HEAD broken for x86_64-pc-mingw32
- References: <OFEDE1448E.34C91E63-ONC1257428.0024BE6B-C1257428.00257385@onevision.de>
Hi Kai, Hi Nightstrike,
../../src/gas/listing.c:1072: error: implicit declaration of function
'localtime_r'
But for backward compatibility issue may this call should be modified to
use localtime()
Could you guys just confirm for me that the attached patch will solve
the problem before I check it in ? Thanks.
Cheers
Nick
Index: gas/listing.c
===================================================================
RCS file: /cvs/src/src/gas/listing.c,v
retrieving revision 1.33
diff -c -3 -p -r1.33 listing.c
*** gas/listing.c 10 Apr 2008 12:45:17 -0000 1.33
--- gas/listing.c 11 Apr 2008 07:33:17 -0000
*************** static void
*** 1065,1076 ****
print_timestamp (void)
{
const time_t now = time (NULL);
! struct tm timestamp;
char stampstr[MAX_DATELEN];
/* Any portable way to obtain subsecond values??? */
! localtime_r (&now, ×tamp);
! strftime (stampstr, MAX_DATELEN, "%Y-%m-%dT%H:%M:%S.000%z", ×tamp);
fprintf (list_file, _("\n time stamp \t: %s\n\n"), stampstr);
}
--- 1065,1076 ----
print_timestamp (void)
{
const time_t now = time (NULL);
! struct tm * timestamp;
char stampstr[MAX_DATELEN];
/* Any portable way to obtain subsecond values??? */
! timestamp = localtime (&now);
! strftime (stampstr, MAX_DATELEN, "%Y-%m-%dT%H:%M:%S.000%z", timestamp);
fprintf (list_file, _("\n time stamp \t: %s\n\n"), stampstr);
}