This should supersede the patch for include/plp_inttypes.h
I only tested in on i386 (32-bit)

enjoy,
Frits
Index: plptools-0.15/lib/psitime.cc
===================================================================
--- plptools-0.15/lib/psitime.cc	(revision 4)
+++ plptools-0.15/lib/psitime.cc	(working copy)
@@ -194,7 +194,7 @@
  */
 #define EPOCH_DIFF 0x00dcddb30f2f8000ULL
 
-static unsigned long long
+static u_int64_t
 evalOffset(psi_timezone ptz, time_t time, bool valid) {
     s_int64_t offset = 0;
 
@@ -238,7 +238,7 @@
 }
 
 void PsiTime::setSiboTime(u_int32_t stime) {
-    unsigned long long micro = evalOffset(ptz, time(0), false);
+    u_int64_t micro = evalOffset(ptz, time(0), false);
 
     micro /= 1000000;
     utv.tv_sec = stime + OnePM - micro;
@@ -247,7 +247,7 @@
 }
 
 u_int32_t PsiTime::getSiboTime(void) {
-    unsigned long long micro = evalOffset(ptz, time(0), false);
+    u_int64_t micro = evalOffset(ptz, time(0), false);
 
     micro /= 1000000;
     return utv.tv_sec - OnePM + micro;
Index: plptools-0.15/include/plp_inttypes.h
===================================================================
--- plptools-0.15/include/plp_inttypes.h	(revision 4)
+++ plptools-0.15/include/plp_inttypes.h	(working copy)
@@ -21,15 +21,8 @@
 typedef uint16_t u_int16_t;
 typedef uint32_t u_int32_t;
 typedef uint64_t u_int64_t;
-typedef int64_t  s_int64_t;
-#else
-/* Last resort, declare ourselves */
-typedef unsigned char      u_int8_t;
-typedef unsigned short     u_int16_t;
-typedef unsigned int       u_int32_t;
-typedef unsigned long long u_int64_t;
-typedef signed long long   s_int64_t;
 #endif // ISO_INTTYPES
+typedef int64_t  s_int64_t;	/* not defined in <stdint.h> */
 #endif // GNU_INTTYPES
 
 #endif // _INTTYPES_H_

Attachment: pgpAMb4WxN7ny.pgp
Description: PGP signature

Reply via email to