Add back localtime.c implementation for MinGW

v0.27.3
Luis Díaz Más 7 years ago
parent 609951e1d7
commit bc1c17fd78

@ -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

File diff suppressed because it is too large Load Diff

@ -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

Loading…
Cancel
Save