From efde2f2ce489a733f5489325437dfadbf948ea62 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Wed, 1 Jul 2009 15:02:28 +0000 Subject: * bfd/bfd.m4 (BFD_HAVE_TIME_TYPE_MEMBER, BFD_HAVE_SYS_STAT_TYPE_MEMBER): New config functions. * bfd/configure.in: Use them. * bfd/configure: Regenerate. * bfd/config.in: Regnerate. * bfd/vmsutil.c: Include sysdep.h, remove ansidecl.h. #define _BSD_SOURCE. Add comments. (vms_file_stats_name): Calculate creation date based on available runtime data. Return 1 for version instead of 0. --- bfd/configure.in | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'bfd/configure.in') diff --git a/bfd/configure.in b/bfd/configure.in index 146785e..11cc83a 100644 --- a/bfd/configure.in +++ b/bfd/configure.in @@ -197,7 +197,7 @@ AC_SUBST(BFD_HOSTPTR_T) BFD_CC_FOR_BUILD AC_CHECK_HEADERS(alloca.h stddef.h string.h strings.h stdlib.h time.h unistd.h) -AC_CHECK_HEADERS(fcntl.h sys/file.h sys/time.h) +AC_CHECK_HEADERS(fcntl.h sys/file.h sys/time.h sys/stat.h) GCC_HEADER_STDINT(bfd_stdint.h) AC_HEADER_TIME AC_HEADER_DIRENT @@ -223,6 +223,17 @@ AC_CHECK_DECLS(strstr) AC_CHECK_DECLS(snprintf) AC_CHECK_DECLS(vsnprintf) +# Support for VMS timestamps via cross compile + +if test "$ac_cv_header_time_h" = yes; then + BFD_HAVE_TIME_TYPE_MEMBER(struct tm, tm_gmtoff) +fi + +if test "$ac_cv_header_sys_stat_h" = yes; then + BFD_HAVE_SYS_STAT_TYPE_MEMBER(struct stat, st_mtim, tv_sec) + BFD_HAVE_SYS_STAT_TYPE_MEMBER(struct stat, st_mtim, tv_nsec) +fi + # Link in zlib if we can. This allows us to read compressed debug sections. # This is used only by compress.c. AC_SEARCH_LIBS(zlibVersion, z, [AC_CHECK_HEADERS(zlib.h)]) -- cgit v1.1