summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2013-07-17 16:10:51 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-09-11 19:44:55 +0200
commitaf58b15fa7f20e33736d79c6a4b3becb568517ca (patch)
treedb6a76cc4293012412c66123b97f0ff9ad0b6a41 /src/util
parent1412a7655c53452721d19813b0ab4a1afd2b0744 (diff)
downloadsssd-af58b15fa7f20e33736d79c6a4b3becb568517ca.tar.gz
sssd-af58b15fa7f20e33736d79c6a4b3becb568517ca.tar.xz
sssd-af58b15fa7f20e33736d79c6a4b3becb568517ca.zip
Fix formating of variables with type: id_t
Diffstat (limited to 'src/util')
-rw-r--r--src/util/sss_format.h26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/util/sss_format.h b/src/util/sss_format.h
index a922ee367..5cf080842 100644
--- a/src/util/sss_format.h
+++ b/src/util/sss_format.h
@@ -36,7 +36,31 @@
* It seems that sizeof(rlim_t) is 8. It may be platform dependent, therefore
* the same format will be used like with uint64_t.
*/
-
#define SPRIrlim PRIu64
+#if SIZEOF_ID_T == 8
+# define SPRIid PRIu64
+#elif SIZEOF_ID_T == 4
+# define SPRIid PRIu32
+#else
+# error Unexpected sizeof id_t
+#endif /* SIZEOF_ID_T */
+
+#if SIZEOF_UID_T == 8
+# define SPRIuid PRIu64
+#elif SIZEOF_UID_T == 4
+# define SPRIuid PRIu32
+#else
+# error Unexpected sizeof uid_t
+#endif /* SIZEOF_UID_T */
+
+#if SIZEOF_GID_T == 8
+# define SPRIgid PRIu64
+#elif SIZEOF_GID_T == 4
+# define SPRIgid PRIu32
+#else
+# error Unexpected sizeof gid_t
+#endif /* SIZEOF_GID_T */
+
+
#endif /* __SSS_FORMAT_H__ */