aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/blkid/blkid_types.h.in16
-rw-r--r--lib/ext2fs/ext2_types.h.in16
-rw-r--r--lib/uuid/gen_uuid.c5
-rw-r--r--lib/uuid/tst_uuid.c2
-rw-r--r--lib/uuid/uuid_time.c2
5 files changed, 21 insertions, 20 deletions
diff --git a/lib/blkid/blkid_types.h.in b/lib/blkid/blkid_types.h.in
index cb5b10d5..2edc0dad 100644
--- a/lib/blkid/blkid_types.h.in
+++ b/lib/blkid/blkid_types.h.in
@@ -92,13 +92,13 @@ typedef __U64_TYPEDEF __u64;
#if (@SIZEOF_INT@ == 8)
typedef unsigned int __u64;
#else
-#if (@SIZEOF_LONG@ == 8)
-typedef unsigned long __u64;
-#else
#if (@SIZEOF_LONG_LONG@ == 8)
typedef unsigned long long __u64;
-#endif /* SIZEOF_LONG_LONG == 8 */
+#else
+#if (@SIZEOF_LONG@ == 8)
+typedef unsigned long __u64;
#endif /* SIZEOF_LONG == 8 */
+#endif /* SIZEOF_LONG_LONG == 8 */
#endif /* SIZEOF_INT == 8 */
#endif /* __U64_TYPEDEF */
@@ -108,17 +108,17 @@ typedef __S64_TYPEDEF __s64;
#if (@SIZEOF_INT@ == 8)
typedef int __s64;
#else
-#if (@SIZEOF_LONG@ == 8)
-typedef long __s64;
-#else
#if (@SIZEOF_LONG_LONG@ == 8)
#if defined(__GNUC__)
typedef __signed__ long long __s64;
#else
typedef signed long long __s64;
#endif /* __GNUC__ */
-#endif /* SIZEOF_LONG_LONG == 8 */
+#else
+#if (@SIZEOF_LONG@ == 8)
+typedef long __s64;
#endif /* SIZEOF_LONG == 8 */
+#endif /* SIZEOF_LONG_LONG == 8 */
#endif /* SIZEOF_INT == 8 */
#endif /* __S64_TYPEDEF */
diff --git a/lib/ext2fs/ext2_types.h.in b/lib/ext2fs/ext2_types.h.in
index aa7ca3a9..5b98f715 100644
--- a/lib/ext2fs/ext2_types.h.in
+++ b/lib/ext2fs/ext2_types.h.in
@@ -92,11 +92,11 @@ typedef __U64_TYPEDEF __u64;
#if (@SIZEOF_INT@ == 8)
typedef unsigned int __u64;
#else
-#if (@SIZEOF_LONG@ == 8)
-typedef unsigned long __u64;
-#else
#if (@SIZEOF_LONG_LONG@ == 8)
typedef unsigned long long __u64;
+#else
+#if (@SIZEOF_LONG@ == 8)
+typedef unsigned long __u64;
#endif /* SIZEOF_LONG_LONG == 8 */
#endif /* SIZEOF_LONG == 8 */
#endif /* SIZEOF_INT == 8 */
@@ -108,15 +108,15 @@ typedef __S64_TYPEDEF __s64;
#if (@SIZEOF_INT@ == 8)
typedef int __s64;
#else
-#if (@SIZEOF_LONG@ == 8)
-typedef long __s64;
-#else
#if (@SIZEOF_LONG_LONG@ == 8)
#if defined(__GNUC__)
-typedef __signed__ long long __s64;
+typedef __signed__ long long __s64;
#else
-typedef signed long long __s64;
+typedef signed long long __s64;
#endif /* __GNUC__ */
+#else
+#if (@SIZEOF_LONG@ == 8)
+typedef long __s64;
#endif /* SIZEOF_LONG_LONG == 8 */
#endif /* SIZEOF_LONG == 8 */
#endif /* SIZEOF_INT == 8 */
diff --git a/lib/uuid/gen_uuid.c b/lib/uuid/gen_uuid.c
index efa4e3d3..1b23d112 100644
--- a/lib/uuid/gen_uuid.c
+++ b/lib/uuid/gen_uuid.c
@@ -401,9 +401,10 @@ try_again:
if (state_fd > 0) {
rewind(state_f);
- len = fprintf(state_f,
+ len = fprintf(state_f,
"clock: %04x tv: %016lu %08lu adj: %08d\n",
- clock_seq, last.tv_sec, last.tv_usec, adjustment);
+ clock_seq, last.tv_sec, (long)last.tv_usec,
+ adjustment);
fflush(state_f);
if (ftruncate(state_fd, len) < 0) {
fprintf(state_f, " \n");
diff --git a/lib/uuid/tst_uuid.c b/lib/uuid/tst_uuid.c
index 22169703..33fb80b9 100644
--- a/lib/uuid/tst_uuid.c
+++ b/lib/uuid/tst_uuid.c
@@ -144,7 +144,7 @@ main(int argc ATTR((unused)) , char **argv ATTR((unused)))
tv.tv_usec = 0;
time_reg = uuid_time(buf, &tv);
printf("UUID generated at %lu reports %lu (%ld.%ld)\n",
- time_gen, time_reg, tv.tv_sec, tv.tv_usec);
+ time_gen, time_reg, tv.tv_sec, (long)tv.tv_usec);
/* allow 1s margin in case of rollover between sampling
* the current time and when the UUID is generated. */
if (time_reg > time_gen + 1) {
diff --git a/lib/uuid/uuid_time.c b/lib/uuid/uuid_time.c
index 4c3536b4..97fd3358 100644
--- a/lib/uuid/uuid_time.c
+++ b/lib/uuid/uuid_time.c
@@ -165,7 +165,7 @@ main(int argc, char **argv)
printf("Warning: not a time-based UUID, so UUID time "
"decoding will likely not work!\n");
}
- printf("UUID time is: (%ld, %ld): %s\n", tv.tv_sec, tv.tv_usec,
+ printf("UUID time is: (%ld, %ld): %s\n", tv.tv_sec, (long)tv.tv_usec,
ctime(&time_reg));
return 0;