about summary refs log tree commit diff
path: root/lib/pmfileio.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pmfileio.c')
-rw-r--r--lib/pmfileio.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/lib/pmfileio.c b/lib/pmfileio.c
index 819a0343..dd7e617e 100644
--- a/lib/pmfileio.c
+++ b/lib/pmfileio.c
@@ -29,6 +29,7 @@
     /* This makes the the x64() functions available on AIX */
 
 #include <unistd.h>
+#include <assert.h>
 #include <stdio.h>
 #include <fcntl.h>
 #include <stdarg.h>
@@ -524,6 +525,23 @@ pm_readbiglong(FILE * const ifP,
 
 
 int
+pm_readbiglong2(FILE *    const ifP,
+                int32_t * const lP) {
+    int rc;
+    long l;
+
+    rc = pm_readbiglong(ifP, &l);
+
+    assert((int32_t)l == l);
+
+    *lP = (int32_t)l;
+
+    return rc;
+}
+
+
+
+int
 pm_writebiglong(FILE * const ofP, 
                 long   const l) {
 
@@ -582,6 +600,23 @@ pm_readlittlelong(FILE * const ifP,
 
 
 int
+pm_readlittlelong2(FILE *    const ifP,
+                int32_t * const lP) {
+    int rc;
+    long l;
+
+    rc = pm_readlittlelong(ifP, &l);
+
+    assert((int32_t)l == l);
+
+    *lP = (int32_t)l;
+
+    return rc;
+}
+
+
+
+int
 pm_writelittlelong(FILE * const ofP, 
                    long   const l) {