Commit e67ff7d8 authored by Lukas Geyer's avatar Lukas Geyer Committed by Christian Kandeler

Fix compilation issue for Botan for MinGW (no gmtime_s)

MinGW does not come with a gmtime_s function (only MSVC does). BOTAN_TARGET_OS_HAS_GMTIME_S is now set for win32-msvc* only.

Change-Id: Ic2aefed68acd32b1e67046455b2f230096dd83d0
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@nokia.com>
parent 2bf7271d
......@@ -22,7 +22,7 @@ macx:DEFINES += BOTAN_TARGET_OS_IS_DARWIN
*g++*:DEFINES += BOTAN_BUILD_COMPILER_IS_GCC
win32 {
DEFINES += BOTAN_TARGET_OS_IS_WINDOWS BOTAN_TARGET_OS_HAS_GMTIME_S \
DEFINES += BOTAN_TARGET_OS_IS_WINDOWS \
BOTAN_TARGET_OS_HAS_LOADLIBRARY BOTAN_TARGET_OS_HAS_WIN32_GET_SYSTEMTIME \
BOTAN_TARGET_OS_HAS_WIN32_VIRTUAL_LOCK BOTAN_HAS_DYNAMICALLY_LOADED_ENGINE \
BOTAN_HAS_DYNAMIC_LOADER BOTAN_HAS_ENTROPY_SRC_CAPI BOTAN_HAS_ENTROPY_SRC_WIN32 \
......@@ -30,7 +30,7 @@ win32 {
win32-msvc* {
QMAKE_CXXFLAGS += -wd4251 -wd4290 -wd4250
DEFINES += BOTAN_BUILD_COMPILER_IS_MSVC
DEFINES += BOTAN_BUILD_COMPILER_IS_MSVC BOTAN_TARGET_OS_HAS_GMTIME_S
} else {
QMAKE_CFLAGS += -fpermissive -finline-functions -Wno-long-long
QMAKE_CXXFLAGS += -fpermissive -finline-functions -Wno-long-long
......
......@@ -22,7 +22,7 @@ QtcLibrary {
cpp.defines: {
var result = ["BOTAN_DLL=Q_DECL_EXPORT"]
if (qbs.toolchain == "msvc")
result.push("BOTAN_BUILD_COMPILER_IS_MSVC")
result.push("BOTAN_BUILD_COMPILER_IS_MSVC", "BOTAN_TARGET_OS_HAS_GMTIME_S")
if (qbs.toolchain == "gcc" || qbs.toolchain == "mingw")
result.push("BOTAN_BUILD_COMPILER_IS_GCC")
if (qbs.targetOS == "linux")
......@@ -39,7 +39,7 @@ QtcLibrary {
"BOTAN_HAS_ENTROPY_SRC_EGD", "BOTAN_HAS_ENTROPY_SRC_FTW",
"BOTAN_HAS_ENTROPY_SRC_UNIX", "BOTAN_HAS_MUTEX_PTHREAD", "BOTAN_HAS_PIPE_UNIXFD_IO")
if (qbs.targetOS == "windows")
result.push("BOTAN_TARGET_OS_IS_WINDOWS", "BOTAN_TARGET_OS_HAS_GMTIME_S",
result.push("BOTAN_TARGET_OS_IS_WINDOWS",
"BOTAN_TARGET_OS_HAS_LOADLIBRARY", "BOTAN_TARGET_OS_HAS_WIN32_GET_SYSTEMTIME",
"BOTAN_TARGET_OS_HAS_WIN32_VIRTUAL_LOCK", "BOTAN_HAS_DYNAMICALLY_LOADED_ENGINE",
"BOTAN_HAS_DYNAMIC_LOADER", "BOTAN_HAS_ENTROPY_SRC_CAPI",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment