printuid: fix uid_t decoding on 64-bit architectures

It was not a good idea to treat uid_t as a long int type because
the latter is twice larger than uid_t on 64-bit architectures.

* defs.h (printuid): Change uid argument type from "unsigned long"
to "unsigned int".
* util.c (printuid): Likewise.  When uid equals to -1, print "-1".
* tests/uid.awk: New file.
* tests/uid.c: New file.
* tests/uid32.c: Likewise.
* tests/uid.test: New test.
* tests/uid32.test: Likewise.
* tests/Makefile.am (CHECK_PROGRAMS): Add uid and uid32.
(TESTS): Add uid.test and uid32.test.
(EXTRA_DIST): Add uid.awk.
* tests/.gitignore: Add uid and uid32.
diff --git a/tests/uid32.test b/tests/uid32.test
new file mode 100755
index 0000000..82ba9b7
--- /dev/null
+++ b/tests/uid32.test
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# Check uid32 decoding.
+
+uid_syscall_suffix=32
+
+. "${srcdir=.}/uid.test"