aboutsummaryrefslogtreecommitdiffstats
path: root/lib/psitime.h
diff options
context:
space:
mode:
authorFritz Elfert <felfert@to.com>2001-03-05 10:12:26 +0000
committerFritz Elfert <felfert@to.com>2001-03-05 10:12:26 +0000
commit3c5877e3f7fcd101a9868e6da86f12b92b6d4896 (patch)
treefb8ca31738d782bb0d11e55dc2e4794db2d17ae3 /lib/psitime.h
parent3ebac278eff9f4ba457a5f1ccbce9857ea00dba5 (diff)
downloadplptools-3c5877e3f7fcd101a9868e6da86f12b92b6d4896.tar.gz
plptools-3c5877e3f7fcd101a9868e6da86f12b92b6d4896.tar.bz2
plptools-3c5877e3f7fcd101a9868e6da86f12b92b6d4896.zip
Fixed some 64bit related stuff in psitime and plpdirent.
More work on restore in kpsion.
Diffstat (limited to 'lib/psitime.h')
-rw-r--r--lib/psitime.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/lib/psitime.h b/lib/psitime.h
index a6c4f4f..bf5b3cb 100644
--- a/lib/psitime.h
+++ b/lib/psitime.h
@@ -29,6 +29,7 @@
#include <sys/time.h>
#include <unistd.h>
+#include <sys/types.h>
#include <ostream.h>
#include <intl.h>
@@ -45,7 +46,7 @@ typedef struct psi_timeval_t {
*/
friend ostream &operator<<(ostream &o, const psi_timeval_t &ptv) {
ostream::fmtflags old = o.flags();
- unsigned long long micro = ptv.tv_high;
+ u_int64_t micro = ptv.tv_high;
micro = (micro << 32) | ptv.tv_low;
micro /= 1000000;
int s = micro % 60;
@@ -73,11 +74,11 @@ typedef struct psi_timeval_t {
/**
* The lower 32 bits
*/
- unsigned long tv_low;
+ u_int32_t tv_low;
/**
* The upper 32 bits
*/
- unsigned long tv_high;
+ u_int32_t tv_high;
} psi_timeval;
/**
@@ -151,10 +152,10 @@ public:
/**
* Contructs a new instance.
*
- * @param _ptvHi The high 16 bits of a Psion time value for initialization.
- * @param _ptvLo The low 16 bits of a Psion time value for initialization.
+ * @param _ptvHi The high 32 bits of a Psion time value for initialization.
+ * @param _ptvLo The low 32 bits of a Psion time value for initialization.
*/
- PsiTime(const unsigned long _ptvHi, const unsigned long _ptvLo);
+ PsiTime(const u_int32_t _ptvHi, const u_int32_t _ptvLo);
/**
* Constructs a new instance, initializing to now.
@@ -184,7 +185,7 @@ public:
* @param _ptvHi The high 32 bits of a Psion time.
* @param _ptvLo The low 32 bits of a Psion time.
*/
- void setPsiTime(const unsigned long _ptvHi, const unsigned long _ptvLo);
+ void setPsiTime(const u_int32_t _ptvHi, const u_int32_t _ptvLo);
/**
* Sets the Psion time zone of this instance.
@@ -244,7 +245,7 @@ public:
* @returns The instance's current time as lower 32 bits of
* a Psion struct psi_timeval_t.
*/
- const unsigned long getPsiTimeLo(void);
+ const u_int32_t getPsiTimeLo(void);
/**
* Retrieves the instance's current value
@@ -253,7 +254,7 @@ public:
* @returns The instance's current time as upper 32 bits of
* a Psion struct psi_timeval_t.
*/
- const unsigned long getPsiTimeHi(void);
+ const u_int32_t getPsiTimeHi(void);
/**
* Prints the instance's value in human readable format.