summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/timemodule.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/Modules/timemodule.c b/Modules/timemodule.c
index 7a8c462..ae68508 100644
--- a/Modules/timemodule.c
+++ b/Modules/timemodule.c
@@ -59,14 +59,18 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifdef __WATCOMC__
#include <i86.h>
#else
-#ifdef _M_IX86
+#ifdef MS_WINDOWS
#include <windows.h>
#define timezone _timezone
+#ifndef tzname
#define tzname _tzname
-#define daylight _daylight
-#define altzone _altzone
#endif
+#ifndef daylight
+#define daylight _daylight
#endif
+#define altzone _altzone
+#endif /* MS_WINDOWS */
+#endif /* !__WATCOMC__ */
/* Forward declarations */
static int floatsleep PROTO((double));
@@ -263,7 +267,7 @@ time_ctime(self, args)
char *p;
if (!getargs(args, "d", &dt))
return NULL;
- tt = dt;
+ tt = (time_t)dt;
p = ctime(&tt);
if (p[24] == '\n')
p[24] = '\0';
@@ -469,13 +473,13 @@ floatsleep(secs)
break;
}
#else /* !MSDOS */
-#ifdef _M_IX86
+#ifdef MS_WINDOWS
/* XXX Can't interrupt this sleep */
Sleep((int)(secs*1000));
-#else /* _M_IX86 */
+#else /* !MS_WINDOWS */
/* XXX Can't interrupt this sleep */
sleep((int)secs);
-#endif /* _M_IX86 */
+#endif /* !MS_WINDOWS */
#endif /* !MSDOS */
#endif /* !__WATCOMC__ */
#endif /* !macintosh */