Add back localtime.c implementation for MinGW

This commit is contained in:
Luis Díaz Más
2018-10-14 12:08:46 +02:00
parent 609951e1d7
commit bc1c17fd78
3 changed files with 1433 additions and 1 deletions
+5
View File
@@ -122,6 +122,11 @@ set( LIBEXIV2_PRIVATE_SRC
helper_functions.cpp
)
if(MINGW)
set(LIBEXIV2_PRIVATE_SRC ${LIBEXIV2_PRIVATE_SRC} localtime.c)
endif()
# Private headers only needed to build the library
set( LIBEXIV2_PRIVATE_HDR
canonmn_int.hpp
+1414
View File
File diff suppressed because it is too large Load Diff
+14 -1
View File
@@ -5,8 +5,21 @@
#pragma once
#include <time.h>
#ifdef __cplusplus
extern "C" {
#endif
// The UTC version of mktime
/* timegm is replaced with _mkgmtime on Windows (msvc && mingw) */
#if defined(__MINGW__) || defined(_MSC_VER)
#if defined(_MSC_VER)
#define timegm _mkgmtime
#endif
#if defined(__MINGW__)
time_t timegm(struct tm * const tmp);
#endif
#ifdef __cplusplus
}
#endif