aboutsummaryrefslogtreecommitdiffstats
path: root/skeletons
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2005-06-15 19:01:45 +0000
committerLev Walkin <vlm@lionet.info>2005-06-15 19:01:45 +0000
commita57953d7dc382d5752230619de3fdc6a1f8bb1a1 (patch)
tree830bcb13322cb57de9d94446253d02bb21ff82d0 /skeletons
parent84fbd7218b1af520994bbe48054a769be3fa159c (diff)
WIN32 portability changes
Diffstat (limited to 'skeletons')
-rw-r--r--skeletons/GeneralizedTime.c16
-rw-r--r--skeletons/REAL.c8
2 files changed, 16 insertions, 8 deletions
diff --git a/skeletons/GeneralizedTime.c b/skeletons/GeneralizedTime.c
index 9c0ed7dc..770a3043 100644
--- a/skeletons/GeneralizedTime.c
+++ b/skeletons/GeneralizedTime.c
@@ -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 */
diff --git a/skeletons/REAL.c b/skeletons/REAL.c
index b0086bc8..a36b6813 100644
--- a/skeletons/REAL.c
+++ b/skeletons/REAL.c
@@ -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))