Add back localtime.c implementation for MinGW
This commit is contained in:
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
|
||||
|
||||
1414
src/localtime.c
Normal file
1414
src/localtime.c
Normal file
File diff suppressed because it is too large
Load Diff
15
src/timegm.h
15
src/timegm.h
@ -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…
Reference in New Issue
Block a user