summaryrefslogtreecommitdiffstats
path: root/kjs
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2024-10-27 12:33:30 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2024-10-27 12:33:30 +0900
commit638f63d207a9a925df17fda588436fa6530a3d85 (patch)
treee6bc477061ea0cea794f5bc72dfbc274da63997b /kjs
parent8b48c1df5dd5be9110baa1b6b85bc535119130e9 (diff)
downloadtdelibs-638f63d207a9a925df17fda588436fa6530a3d85.tar.gz
tdelibs-638f63d207a9a925df17fda588436fa6530a3d85.zip
Drop Borland compiler specific code
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'kjs')
-rw-r--r--kjs/date_object.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/kjs/date_object.cpp b/kjs/date_object.cpp
index 982006e5d..97c272baf 100644
--- a/kjs/date_object.cpp
+++ b/kjs/date_object.cpp
@@ -104,7 +104,7 @@ static UString formatTime(struct tm &tm)
#if defined BSD || defined(__linux__) || defined(__APPLE__)
tz = tm.tm_gmtoff;
#else
-# if defined(__BORLANDC__) || defined (__CYGWIN__)
+# if defined (__CYGWIN__)
tz = - _timezone;
# else
tz = - timezone;
@@ -189,7 +189,7 @@ static double timeZoneOffset(const struct tm *t)
#if defined BSD || defined(__linux__) || defined(__APPLE__)
return -(t->tm_gmtoff / 60);
#else
-# if defined(__BORLANDC__) || defined(__CYGWIN__)
+# if defined(__CYGWIN__)
// FIXME consider non one-hour DST change
#if !defined(__CYGWIN__)
#error please add daylight savings offset here!
@@ -626,13 +626,8 @@ Object DateObjectImp::construct(ExecState *exec, const List &args)
if (numArgs == 0) { // new Date() ECMA 15.9.3.3
#ifdef HAVE_SYS_TIMEB_H
-# if defined(__BORLANDC__)
- struct timeb timebuffer;
- ftime(&timebuffer);
-# else
struct _timeb timebuffer;
_ftime(&timebuffer);
-# endif
double utc = floor((double)timebuffer.time * 1000.0 + (double)timebuffer.millitm);
#else
struct timeval tv;
@@ -805,7 +800,7 @@ double KJS::makeTime(struct tm *t, double ms, bool utc)
t->tm_isdst = t3.tm_isdst;
#else
(void)localtime(&zero);
-# if defined(__BORLANDC__) || defined(__CYGWIN__)
+# if defined(__CYGWIN__)
utcOffset = - _timezone;
# else
utcOffset = - timezone;