summaryrefslogtreecommitdiff
path: root/textproc/xerces-c
diff options
context:
space:
mode:
authorskrll <skrll@pkgsrc.org>2001-01-14 12:18:30 +0000
committerskrll <skrll@pkgsrc.org>2001-01-14 12:18:30 +0000
commit8cea10d6dc333341aea30db5eb116415c09d0553 (patch)
tree728b2da680cea6bb18a9114b331cf645ce041d45 /textproc/xerces-c
parent5fa5ea83c461847aa3e0a07578fd918efbe885b4 (diff)
downloadpkgsrc-8cea10d6dc333341aea30db5eb116415c09d0553.tar.gz
Use gettimeofday instead of ftime.
Diffstat (limited to 'textproc/xerces-c')
-rw-r--r--textproc/xerces-c/files/Makefile.in1
-rw-r--r--textproc/xerces-c/files/NetBSDPlatformUtils.cpp9
2 files changed, 5 insertions, 5 deletions
diff --git a/textproc/xerces-c/files/Makefile.in b/textproc/xerces-c/files/Makefile.in
index c1bd3129ce4..8184d97c8cf 100644
--- a/textproc/xerces-c/files/Makefile.in
+++ b/textproc/xerces-c/files/Makefile.in
@@ -79,4 +79,3 @@ CPP_OBJECTS = NetBSDPlatformUtils.$(TO)
include ../../Makefile.util.submodule
-CPP_OBJECTS: NetBSDPlatformUtils.cpp ${CPP_PUBHEADERS}
diff --git a/textproc/xerces-c/files/NetBSDPlatformUtils.cpp b/textproc/xerces-c/files/NetBSDPlatformUtils.cpp
index 34b74dcb11a..8da8f3a17bf 100644
--- a/textproc/xerces-c/files/NetBSDPlatformUtils.cpp
+++ b/textproc/xerces-c/files/NetBSDPlatformUtils.cpp
@@ -77,7 +77,7 @@
#include <stdlib.h>
#include <errno.h>
#include <libgen.h>
-#include <sys/timeb.h>
+#include <sys/time.h>
#include <string.h>
#include <strings.h>/* for strcasecmp & strncasecmp */
#include <wchar.h> /* for win_t */
@@ -450,10 +450,11 @@ void XMLPlatformUtils::resetFile(FileHandle theFile)
unsigned long XMLPlatformUtils::getCurrentMillis()
{
- timeb aTime;
- ftime(&aTime);
- return (unsigned long)(aTime.time*1000 + aTime.millitm);
+ struct timeval t;
+ struct timezone tz;
+ gettimeofday(&t, &tz);
+ return (unsigned long)(t.tv_sec*1000 + t.tv_usec);
}
XMLCh* XMLPlatformUtils::getFullPath(const XMLCh* const srcPath)