Commit a57953d7 authored by Lev Walkin's avatar Lev Walkin

WIN32 portability changes

parent 84fbd721
......@@ -10,13 +10,13 @@
#include <errno.h>
#if defined(WIN32)
#warning PLEASE STOP AND READ!
#warning localtime_r is implemented via localtime(), which may be not thread-safe.
#warning gmtime_r is implemented via gmtime(), which may be not thread-safe.
#warning
#warning You must fix the code by inserting appropriate locking
#warning if you want to use asn_GT2time() or asn_UT2time().
#warning PLEASE STOP AND READ!
#pragma message( "PLEASE STOP AND READ!")
#pragma message( " localtime_r is implemented via localtime(), which may be not thread-safe.")
#pragma message( " gmtime_r is implemented via gmtime(), which may be not thread-safe.")
#pragma message( " ")
#pragma message( " You must fix the code by inserting appropriate locking")
#pragma message( " if you want to use asn_GT2time() or asn_UT2time().")
#pragma message( "PLEASE STOP AND READ! ")
static struct tm *localtime_r(const time_t *tloc, struct tm *result) {
struct tm *tm;
......@@ -33,7 +33,7 @@ static struct tm *gmtime_r(const time_t *tloc, struct tm *result) {
}
#define tzset() _tzset()
#define putenv _putenv
#define putenv(c) _putenv(c)
#define _EMULATE_TIMEGM
#endif /* WIN32 */
......
......@@ -13,6 +13,14 @@
#include <errno.h>
#include <REAL.h>
#ifdef WIN32
#include <float.h>
#define copysign _copysign
#define isnan _isnan
#define finite _finite
#define ilogb _logb
#endif
#undef INT_MAX
#define INT_MAX ((int)(((unsigned int)-1) >> 1))
......
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