Index: libabac/abac_aspect.c
===================================================================
--- libabac/abac_aspect.c	(revision b4b0d0a7c33b3117813b374d30c19c0e8d5e6c92)
+++ libabac/abac_aspect.c	(revision d0efdecff67e16318c15e5de19a70f1c9e993de2)
@@ -14,5 +14,5 @@
 #include "abac_id.h"
 
-static int debug=0;
+static int debug=1;
 extern int ABAC_IN_PROLOG;
 
@@ -369,7 +369,7 @@
     if(debug) {
         if(ptr->aspect_name)
-          fprintf(stderr,"DEBUG:trying to freeing an aspect loc(%d)(%s:%d)\n",(int)ptr, ptr->aspect_name, ptr->refcount);
+          fprintf(stderr,"DEBUG:trying to freeing an aspect loc(%ld)(%s:%d)\n",(long)ptr, ptr->aspect_name, ptr->refcount);
           else
-             fprintf(stderr,"DEBUG:trying to freeing an aspect loc(%d)(M:%d)\n",(int)ptr,ptr->refcount);
+             fprintf(stderr,"DEBUG:trying to freeing an aspect loc(%ld)(M:%d)\n",(long)ptr,ptr->refcount);
 
     }
@@ -383,6 +383,6 @@
     if(debug) {
         if(ptr->aspect_name)
-          fprintf(stderr,"DEBUG:freeing this aspect loc(%d)(%s:%d)\n",(int)ptr, ptr->aspect_name, ptr->refcount);
-          else fprintf(stderr,"DEBUG:freeing this aspect loc(%d)(M:%d)\n",(int)ptr, ptr->refcount);
+          fprintf(stderr,"DEBUG:freeing this aspect loc(%ld)(%s:%d)\n",(long)ptr, ptr->aspect_name, ptr->refcount);
+          else fprintf(stderr,"DEBUG:freeing this aspect loc(%ld)(M:%d)\n",(long)ptr, ptr->refcount);
     }
 
@@ -863,4 +863,6 @@
     if(linked_params_string) free(linked_params_string);
     if(params_string) free(params_string);
+/* XXX */
+    fprintf(stderr,"final is at(%ld)(%s)\n",(long)final, final);
     return final;
 }
Index: libabac/abac_context.c
===================================================================
--- libabac/abac_context.c	(revision b4b0d0a7c33b3117813b374d30c19c0e8d5e6c92)
+++ libabac/abac_context.c	(revision d0efdecff67e16318c15e5de19a70f1c9e993de2)
@@ -1010,6 +1010,6 @@
             if(cur) {
                 if(fp)
-                    fprintf (fp,"a clause, %d(%s)\n", (int)cur,cur);
-                    else printf ("a clause, %d(%s)\n", (int)cur,cur);
+                    fprintf (fp,"a clause, %ld(%s)\n", (long)cur,cur);
+                    else printf ("a clause, %ld(%s)\n", (long)cur,cur);
             }
         );
Index: libabac/abac_id.c
===================================================================
--- libabac/abac_id.c	(revision b4b0d0a7c33b3117813b374d30c19c0e8d5e6c92)
+++ libabac/abac_id.c	(revision d0efdecff67e16318c15e5de19a70f1c9e993de2)
@@ -14,5 +14,5 @@
 #include "abac_util_cert.h"
 
-static int debug=0;
+static int debug=1;
 
 /* load id into a session when id is being created instead
Index: libabac/abac_key.c
===================================================================
--- libabac/abac_key.c	(revision b4b0d0a7c33b3117813b374d30c19c0e8d5e6c92)
+++ libabac/abac_key.c	(revision d0efdecff67e16318c15e5de19a70f1c9e993de2)
@@ -36,5 +36,5 @@
     printf("===============\n");
     if(ptr->keyblob.len !=0) {
-        printf("[%s]ptr:loc(%d)\n",msg,(int) ptr->keyblob.ptr);
+        printf("[%s]ptr:loc(l%d)\n",msg,(long) ptr->keyblob.ptr);
         printf("[%s]len:(%d)\n",msg,ptr->keyblob.len);
         printf("[%s]strlen:(%d)\n",msg,strlen(ptr->keyblob.ptr));
@@ -45,5 +45,5 @@
         printf("[%s]filename:(%s)\n",msg,ptr->filename);
     if(ptr->potato.len !=0) {
-        printf("[%s]pptr:loc(%d)\n",msg,(int)ptr->potato.ptr);
+        printf("[%s]pptr:loc(%ld)\n",msg,(long)ptr->potato.ptr);
         printf("[%s]plen:(%d)\n",msg,ptr->potato.len);
         printf("[%s]pstrlen:(%d)\n",msg,strlen(ptr->potato.ptr));
Index: libabac/abac_m64.c
===================================================================
--- libabac/abac_m64.c	(revision b4b0d0a7c33b3117813b374d30c19c0e8d5e6c92)
+++ libabac/abac_m64.c	(revision d0efdecff67e16318c15e5de19a70f1c9e993de2)
@@ -25,11 +25,12 @@
 */
 
-static int _compress(char *string, int ilen, char*ostring)
+static int _compress(char *string, int slen, char*ostring)
 {
-    int olen=CHUNK;
+    unsigned long olen=CHUNK;
+    unsigned long ilen=(unsigned long) slen;
     int rc=compress(ostring,&olen,string,ilen); 
     if(rc==Z_OK) { 
-        if(debug) fprintf(stderr,"compress from %d to %d\n", ilen, olen);
-        return olen;
+        if(debug) fprintf(stderr,"compress from %ld to %ld\n", ilen, olen);
+        return (int)olen;
     }
     return 0;
@@ -62,11 +63,12 @@
 }
 
-static int _uncompress(char *string, int ilen, char *ostring)
+static int _uncompress(char *string, int slen, char *ostring)
 {
-    int olen=CHUNK;
+    unsigned long olen=CHUNK;
+    unsigned long ilen=(unsigned long) slen;
     int rc=uncompress(ostring,&olen,string,ilen); 
     if(rc==Z_OK) { 
-        if(debug) fprintf(stderr,"uncompress from %d to %d\n", ilen, olen);
-        return olen;
+        if(debug) fprintf(stderr,"uncompress from %ld to %ld\n", ilen, olen);
+        return (int)olen;
     }
     return 0;
Index: libabac/abac_pl_yap.c
===================================================================
--- libabac/abac_pl_yap.c	(revision b4b0d0a7c33b3117813b374d30c19c0e8d5e6c92)
+++ libabac/abac_pl_yap.c	(revision d0efdecff67e16318c15e5de19a70f1c9e993de2)
@@ -1010,5 +1010,6 @@
         abac_credential_t *cur=NULL;
         abac_list_foreach(p, cur,
-            abac_stack_push(ret, (void *)abac_credential_dup(cur));
+            void *vptr=(void *)abac_credential_dup(cur);
+            abac_stack_push(ret, vptr);
         );
     }
Index: libabac/abac_verifier.c
===================================================================
--- libabac/abac_verifier.c	(revision b4b0d0a7c33b3117813b374d30c19c0e8d5e6c92)
+++ libabac/abac_verifier.c	(revision d0efdecff67e16318c15e5de19a70f1c9e993de2)
@@ -63,4 +63,5 @@
 abac_id_t *abac_id_credential_id(abac_id_credential_t *ptr);
 char *abac_idtype_string(int i);
+abac_credential_t *abac_credential_dup(abac_credential_t *ptr);
 /****************************************************************/
 void show_debug_info(const char *msg)
@@ -84,5 +85,5 @@
 {
     if(id_cred) {
-        printf("checking on this id_cred location %d\n", (int)id_cred);
+        printf("checking on this id_cred location %ld\n", (long)id_cred);
         printf("  --> sha is (%s)\n", abac_id_keyid(id_cred->id));
         printf("  --> cn is (%s)\n", abac_id_cn(id_cred->id));
