Index: /trunk/ippTools/src/chiptool.c
===================================================================
--- /trunk/ippTools/src/chiptool.c	(revision 8061)
+++ /trunk/ippTools/src/chiptool.c	(revision 8062)
@@ -82,7 +82,7 @@
     // dbh prior to /ALL/ of that exposure's Imfiles
     if (pendingFrames) {
-        for (int i = 0; i < rawFrames->n; i++) {
+        for (long i = 0; i < rawFrames->n; i++) {
             rawScienceFrame *rawFrame = rawFrames->data[i];
-            for (int j = 0; j < pendingFrames->n; j++) {
+            for (long j = 0; j < pendingFrames->n; j++) {
                 p2PendingFrame *pendingFrame = pendingFrames->data[j];
                 if (strcmp(rawFrame->exposure->exp_id,
@@ -101,7 +101,7 @@
         psArray *doneFrames = p2searchDoneFrames(config);
         if (doneFrames && (rawFrames->n > 0)) {
-            for (int i = 0; i < rawFrames->n; i++) {
+            for (long i = 0; i < rawFrames->n; i++) {
                 rawScienceFrame *rawFrame = rawFrames->data[i];
-                for (int j = 0; j < pendingFrames->n; j++) {
+                for (long j = 0; j < pendingFrames->n; j++) {
                     p2DoneFrame *doneFrame = pendingFrames->data[j];
                     if (strcmp(rawFrame->exposure->exp_id,
@@ -251,5 +251,5 @@
     }
 
-    for (int i = 0; i < pendingExps->n; i++) {
+    for (long i = 0; i < pendingExps->n; i++) {
         p2PendingExpRow *pendingExp = pendingExps->data[i];
 
Index: /trunk/ippTools/src/p2insertPendingFrames.c
===================================================================
--- /trunk/ippTools/src/p2insertPendingFrames.c	(revision 8061)
+++ /trunk/ippTools/src/p2insertPendingFrames.c	(revision 8062)
@@ -13,5 +13,5 @@
 
     // can we use p2rawToPending() here?
-    for (int i = 0; i < rawFrames->n; i++) {
+    for (long i = 0; i < rawFrames->n; i++) {
         rawScienceFrame *rawFrame = rawFrames->data[i];
 
@@ -32,5 +32,5 @@
 
         int version = -1;
-        for (int j = 0; j < exposures->n; j++) {
+        for (long j = 0; j < exposures->n; j++) {
             p2PendingExpRow *exposure = exposures->data[j];
             version = PS_MAX(version, exposure->p2_version);
@@ -56,5 +56,5 @@
         psArray *pendingImages = psArrayAlloc(rawFrame->images->n);
         pendingImages->n = 0;
-        for (int j = 0; j < rawFrame->images->n; j++) {
+        for (long j = 0; j < rawFrame->images->n; j++) {
             rawImfileRow *rawImage = rawFrame->images->data[j];
             p2PendingImfileRow *pendingImage = p2PendingImfileRowAlloc(
@@ -76,5 +76,5 @@
         }
 
-        for (int i = 0; i < pendingImages->n; i++) {
+        for (long i = 0; i < pendingImages->n; i++) {
             if (!p2PendingImfileInsertObject(config->dbh,
                     pendingImages->data[i])) {
Index: /trunk/ippTools/src/p2pendingToDone.c
===================================================================
--- /trunk/ippTools/src/p2pendingToDone.c	(revision 8061)
+++ /trunk/ippTools/src/p2pendingToDone.c	(revision 8062)
@@ -13,5 +13,5 @@
     doneFrames->n = 0;
 
-    for (int i = 0; i < pendingFrames->n; i++) {
+    for (long i = 0; i < pendingFrames->n; i++) {
         p2PendingFrame *pendingFrame = pendingFrames->data[i];
 // if (pendingFrame->exposure->state != P2_STATE_DONE) continue;
@@ -33,5 +33,5 @@
         psArray *doneImages = psArrayAlloc(pendingFrame->images->n);
         doneImages->n = 0;
-        for (int j = 0; j < pendingFrame->images->n; j++) {
+        for (long j = 0; j < pendingFrame->images->n; j++) {
             p2PendingImfileRow *pendingImage = pendingFrame->images->data[j];
 
Index: /trunk/ippTools/src/p2rawToPending.c
===================================================================
--- /trunk/ippTools/src/p2rawToPending.c	(revision 8061)
+++ /trunk/ippTools/src/p2rawToPending.c	(revision 8062)
@@ -13,5 +13,5 @@
     pendingFrames->n = 0;
 
-    for (int i = 0; i < rawFrames->n; i++) {
+    for (long i = 0; i < rawFrames->n; i++) {
         rawScienceFrame *rawFrame = rawFrames->data[i];
 
@@ -32,5 +32,5 @@
         psArray *pendingImages = psArrayAlloc(rawFrame->images->n);
         pendingImages->n = 0;
-        for (int j = 0; j < rawFrame->images->n; j++) {
+        for (long j = 0; j < rawFrame->images->n; j++) {
             rawImfileRow *rawImage = rawFrame->images->data[j];
             p2PendingImfileRow *pendingImage = p2PendingImfileRowAlloc(
Index: /trunk/ippTools/src/p2searchDoneFrames.c
===================================================================
--- /trunk/ippTools/src/p2searchDoneFrames.c	(revision 8061)
+++ /trunk/ippTools/src/p2searchDoneFrames.c	(revision 8062)
@@ -21,5 +21,5 @@
     frames->n = 0;
 
-    for (int i = 0; i < exposures->n; i++) {
+    for (long i = 0; i < exposures->n; i++) {
         p2DoneExpRow *exposure = exposures->data[i];
 
Index: /trunk/ippTools/src/p2searchPendingFrames.c
===================================================================
--- /trunk/ippTools/src/p2searchPendingFrames.c	(revision 8061)
+++ /trunk/ippTools/src/p2searchPendingFrames.c	(revision 8062)
@@ -23,5 +23,5 @@
     // 'where' to select each exposure
     psMetadata *where = psMetadataAlloc();
-    for (int i = 0; i < exposures->n; i++) {
+    for (long i = 0; i < exposures->n; i++) {
         p2PendingExpRow *exposure = exposures->data[i];
 
Index: /trunk/ippTools/src/p2updatePending.c
===================================================================
--- /trunk/ippTools/src/p2updatePending.c	(revision 8061)
+++ /trunk/ippTools/src/p2updatePending.c	(revision 8062)
@@ -18,5 +18,5 @@
     // we will now select all of the matching images which are done
     psMetadataAddS32 (where, PS_LIST_TAIL, "STATE", PS_META_REPLACE, "==", PX_MODE_DONE);
-    for (int i = 0; i < exposures->n; i++) {
+    for (long i = 0; i < exposures->n; i++) {
 	p2PendingExpRow *exposure = exposures->data[i];
 
Index: /trunk/ippTools/src/pxframes.c
===================================================================
--- /trunk/ippTools/src/pxframes.c	(revision 8061)
+++ /trunk/ippTools/src/pxframes.c	(revision 8062)
@@ -51,10 +51,10 @@
     psMetadata *output = psMetadataAlloc(); \
 \
-    for (int i = 0; i < psArrayLength(frames); i++) { \
+    for (long i = 0; i < psArrayLength(frames); i++) { \
         frametype *frame = frames->data[i]; \
         PS_ASSERT_PTR_NON_NULL(frame, false); \
         PS_ASSERT_PTR_NON_NULL(frame->images, false); \
 \
-        for (int j = 0; j < psArrayLength(frame->images); j++) { \
+        for (long j = 0; j < psArrayLength(frame->images); j++) { \
             imfiletype##Row *image = frame->images->data[j]; \
             psMetadata *md = imfiletype##MetadataFromObject(image); \
@@ -93,5 +93,5 @@
     psArray *allFrames = psArrayAlloc(psArrayLength(exposures)); \
  \
-    for (int i = 0; i < psArrayLength(exposures); i++) { \
+    for (long i = 0; i < psArrayLength(exposures); i++) { \
         exptype##Row *exposure = exposures->data[i]; \
 \
