This is the mail archive of the mailing list for the GDB 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]

[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.
urecvs/bfd -I../../purecvs/bfd/../include -W -Wall -Wstrict-prototypes
-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
make[3]: *** [vmsutil.lo] Error 1

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) *
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:

and some configure script do check for its presence
before using it, for instance
    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

Could this test be added and vmsutils.c
be updated accordingly?

Thanks in advance,

Pierre Muller
Pascal language support maintainer for GDB

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