chiark / gitweb /
Remove unnecessary casts in printfs
[elogind.git] / src / shared / util.h
index 891fcee239f0766ba5006f41f09a2bbc651e7bb6..f2ce4f0d6ede6a1bd4bf61ab94c5c69c9f2a28dd 100644 (file)
 #  error Unknown gid_t size
 #endif
 
+#if SIZEOF_TIME_T == 8
+#  define PRI_TIME PRIu64
+#elif SIZEOF_GID_T == 4
+#  define PRI_TIME PRIu32
+#else
+#  error Unknown time_t size
+#endif
+
+#if SIZEOF_RLIM_T == 8
+#  define RLIM_FMT "%" PRIu64
+#elif SIZEOF_RLIM_T == 4
+#  define RLIM_FMT "%" PRIu32
+#else
+#  error Unknown rlim_t size
+#endif
+
 #include "macro.h"
 #include "time-util.h"