]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
On Windows, use _mkgmtime64() which is like timegm() function.
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Thu, 25 Feb 2010 17:49:07 +0000 (12:49 -0500)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Thu, 25 Feb 2010 17:49:07 +0000 (12:49 -0500)
SVN-Revision: 1992

CMakeLists.txt
build/cmake/config.h.in
libarchive/archive_read_support_format_iso9660.c
libarchive/archive_read_support_format_xar.c

index 85219e0f29dc28a566de41a0795f9f2de43aa8ce..78ca81efcde335ae6c24f4d1a949e1d0010dbc2e 100644 (file)
@@ -423,6 +423,7 @@ CHECK_FUNCTION_EXISTS_GLIBC(wcrtomb HAVE_WCRTOMB)
 CHECK_FUNCTION_EXISTS_GLIBC(wcscpy HAVE_WCSCPY)
 CHECK_FUNCTION_EXISTS_GLIBC(wcslen HAVE_WCSLEN)
 CHECK_FUNCTION_EXISTS_GLIBC(wctomb HAVE_WCTOMB)
+CHECK_FUNCTION_EXISTS_GLIBC(_mkgmtime64 HAVE__MKGMTIME64)
 CHECK_SYMBOL_EXISTS(wmemcmp "wchar.h" HAVE_WMEMCMP)
 CHECK_SYMBOL_EXISTS(wmemcpy "wchar.h" HAVE_WMEMCPY)
 
index 9614c54ab46fdc651df94a60a8896e14004a53e2..2669616a2b6b491c9857c0557d9e8b18c0544e54 100644 (file)
 /* Define to 1 if you have the <zlib.h> header file. */
 #cmakedefine HAVE_ZLIB_H 1
 
+/* Define to 1 if you have the `_mkgmtime64' function. */
+#cmakedefine HAVE__MKGMTIME64 1
+
 /* Version number of libarchive as a single integer */
 #cmakedefine LIBARCHIVE_VERSION_NUMBER "${LIBARCHIVE_VERSION_NUMBER}"
 
index 591eebead8c07dd777d9cc4f11c8a45d9b123f91..1694a91a702c221da86c9d3628d64b20733ea6b6 100644 (file)
@@ -2798,6 +2798,8 @@ time_from_tm(struct tm *t)
 #if HAVE_TIMEGM
        /* Use platform timegm() if available. */
        return (timegm(t));
+#elif HAVE__MKGMTIME64
+       return (_mkgmtime64(t));
 #else
        /* Else use direct calculation using POSIX assumptions. */
        /* First, fix up tm_yday based on the year/month/day. */
index 63d08b1ad11180d4f3d1f24c21fa945822fca532..76452c43142c21eb14c2acc936e85a5448963ca3 100644 (file)
@@ -1021,6 +1021,8 @@ time_from_tm(struct tm *t)
 #if HAVE_TIMEGM
        /* Use platform timegm() if available. */
        return (timegm(t));
+#elif HAVE__MKGMTIME64
+       return (_mkgmtime64(t));
 #else
        /* Else use direct calculation using POSIX assumptions. */
        /* First, fix up tm_yday based on the year/month/day. */