aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Morgner <morgner@informatik.hu-berlin.de>2013-05-21 09:52:19 +0200
committerFrank Morgner <morgner@informatik.hu-berlin.de>2013-05-21 09:52:19 +0200
commit917a81df5b6696eff82e2a7c68681410f81c0e9b (patch)
treea9abc6ab9fa23e780cca8383796639230a1bdbdc
parent8a759ad3db77a47b635f335e66f9c167a0c221ad (diff)
workaround for missing #warning on windows
-rw-r--r--skeletons/GeneralizedTime.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/skeletons/GeneralizedTime.c b/skeletons/GeneralizedTime.c
index 4b0ae5d4..3db79109 100644
--- a/skeletons/GeneralizedTime.c
+++ b/skeletons/GeneralizedTime.c
@@ -67,6 +67,14 @@ static struct tm *gmtime_r(const time_t *tloc, struct tm *result) {
#define GMTOFF(tm) (-timezone)
#endif /* HAVE_TM_GMTOFF */
+#if defined(_WIN32)
+#pragma message( "PLEASE STOP AND READ!")
+#pragma message( " timegm() is implemented via getenv(\"TZ\")/setenv(\"TZ\"), 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!")
+#else
#if (defined(_EMULATE_TIMEGM) || !defined(HAVE_TM_GMTOFF))
#warning "PLEASE STOP AND READ!"
#warning " timegm() is implemented via getenv(\"TZ\")/setenv(\"TZ\"), which may be not thread-safe."
@@ -75,6 +83,7 @@ static struct tm *gmtime_r(const time_t *tloc, struct tm *result) {
#warning " if you want to use asn_GT2time() or asn_UT2time()."
#warning "PLEASE STOP AND READ!"
#endif /* _EMULATE_TIMEGM */
+#endif
/*
* Override our GMTOFF decision for other known platforms.