Fix LP64_ARCHS: change UInt32 and like types from long to int, so each
type has exactly 32 bits; change printf()s to match.

Other changes unbreak the build.

Index: libhfsp/src/record.c
--- libhfsp/src/record.c.orig
+++ libhfsp/src/record.c
@@ -32,6 +32,8 @@
 
 #include <errno.h>
 #include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 
 #include "libhfsp.h"
 #include "hfstime.h"
@@ -508,9 +510,9 @@ static void* record_writethread(void *p, hfsp_cat_thre
 /* read a hfsp_cat_entry from memory */
 void* record_readentry(void *p, void* entry)
 {
-    UInt16	    type = bswabU16_inc(p);
+    UInt16	    type;
     hfsp_cat_entry* e	 = (hfsp_cat_entry*) entry;
-    e->type = type;
+    e->type = type = bswabU16_inc(p);
     switch (type)
     {
 	case HFSP_FOLDER:
@@ -1269,7 +1271,7 @@ int record_insert(record* r)
     len = p - buf;
     if (len > bt->max_rec_size) // Emergency bail out, sorry
     {
-	fprintf(stderr,"Unexpected Buffer overflow in record_insert %d > %d",
+	fprintf(stderr,"Unexpected Buffer overflow in record_insert %d > %zu",
 		len, sizeof(bt->max_rec_size));
 	exit(-1);
     } 
