This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[Build failure] tm struct tm_gmtoff field build error
- From: "Pierre Muller" <muller at ics dot u-strasbg dot fr>
- To: <nickc at redhat dot com>, <binutils at sourceware dot org>
- Cc: <gdb at sourceware dot org>
- Date: Mon, 19 Jan 2009 13:40:07 +0100
- Subject: [Build failure] tm struct tm_gmtoff field build error
Trying to compile a "--enable-targets=all" GDB
on current cvs HEAD on cygwin,
I found a new error in src/bfd:
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../purecvs/bfd -I. -I.
-I../../p
urecvs/bfd -I../../purecvs/bfd/../include -W -Wall -Wstrict-prototypes
-Wmissing
-prototypes -Werror -g -O2 -c ../../purecvs/bfd/vmsutil.c -o vmsutil.o
../../purecvs/bfd/vmsutil.c: In function `vms_file_stats_name':
../../purecvs/bfd/vmsutil.c:249: error: structure has no member named
`tm_gmtoff
'
make[3]: *** [vmsutil.lo] Error 1
245-
246- if (cdt)
247- {
248- ts = localtime (&buff.st_mtime);
249: gmtoff = ts->tm_gmtoff;
250- *cdt = (long long) (((buff.st_mtim.tv_sec + gmtoff) *
VMS_GRANULARITY_FACTOR)
251- + (buff.st_mtim.tv_nsec / 100))
252- + VMS_EPOCH_OFFSET;
253- }
The failure is related to a commit by Nick Clifton dated January 15. 2009
adding vmsutils.c file.
tm_gmtoff seems to be an optional field according to:
http://www.delorie.com/gnu/docs/glibc/libc_435.html
and some configure script do check for its presence
before using it, for instance
src/config/tcl.m4
AC_CACHE_CHECK([tm_gmtoff in struct tm], tcl_cv_member_tm_gmtoff, [
AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_gmtoff;],
tcl_cv_member_tm_gmtoff=yes, tcl_cv_member_tm_gmtoff=no)])
if test $tcl_cv_member_tm_gmtoff = yes ; then
AC_DEFINE(HAVE_TM_GMTOFF)
fi
Could this test be added and vmsutils.c
be updated accordingly?
Thanks in advance,
Pierre Muller
Pascal language support maintainer for GDB