Commit 6bf8b7be authored by Ahmad Samir's avatar Ahmad Samir
Browse files

Use cmakedefine01

This way we get a build time warning if the var isn't defined at all, e.g.
a missing check_include_files() CMake call.
parent bdd40a3d
Pipeline #188813 passed with stage
in 2 minutes and 37 seconds
/* Define if you have a timezone variable */
#cmakedefine HAVE_TIMEZONE 1
#cmakedefine01 HAVE_TIMEZONE
/* Define if you have a tm_gmtoff member in struct tm */
#cmakedefine HAVE_TM_GMTOFF 1
#cmakedefine01 HAVE_TM_GMTOFF
/* Define if you have strcasestr in string.h */
#cmakedefine HAVE_STRCASESTR 1
#cmakedefine01 HAVE_STRCASESTR
......@@ -188,11 +188,11 @@ QString DateFormatter::customFormat() const
QByteArray DateFormatterPrivate::zone(time_t t)
{
#if defined(HAVE_TIMEZONE) || defined(HAVE_TM_GMTOFF)
#if HAVE_TIMEZONE || HAVE_TM_GMTOFF
struct tm *local = localtime(&t);
#endif
#if defined(HAVE_TIMEZONE)
#if HAVE_TIMEZONE
//hmm, could make hours & mins static
int secs = qAbs(timezone);
......@@ -209,7 +209,7 @@ QByteArray DateFormatterPrivate::zone(time_t t)
}
}
#elif defined(HAVE_TM_GMTOFF)
#elif HAVE_TM_GMTOFF
int secs = qAbs(local->tm_gmtoff);
int neg = (local->tm_gmtoff < 0) ? 1 : 0;
......
......@@ -280,7 +280,7 @@ int findHeaderLineEnd(const QByteArray &src, int &dataBegin, bool *folded)
return end;
}
#ifndef HAVE_STRCASESTR
#if !HAVE_STRCASESTR
#ifdef WIN32
#define strncasecmp _strnicmp
#endif
......
Supports Markdown
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