diff --git a/.gitignore b/.gitignore index 328df77c..b243fc22 100644 --- a/.gitignore +++ b/.gitignore @@ -183,6 +183,7 @@ misc/uuidd misc/uuidd.8 misc/uuidgen misc/uuidgen.1 +parse-types.log po/Makefile.in po/POTFILES public_config.h diff --git a/config/parse-types.sh b/config/parse-types.sh index 00371ff9..5076f6ca 100755 --- a/config/parse-types.sh +++ b/config/parse-types.sh @@ -16,8 +16,15 @@ if test -z "$CPP"; then CPP="$CC -E" fi -echo '#include ' | $CPP - | \ - sed -f sed.script | grep '^#' > asm_types.h +/bin/echo -n "checking for __uNN types... " +# can't check [ -f /usr/include/asm/types.h ] directly, since +# the include path might be different if cross-compiling +if echo '#include ' | $CPP - 2> parse-types.log | \ + sed -f sed.script | grep '^#' > asm_types.h; then + echo "using " +else + echo "using generic types" +fi rm sed.script @@ -34,7 +41,7 @@ int main(int argc, char **argv) (int) sizeof(__U8_TYPEDEF)); exit(1); } -#else +#elif defined(__linux__) #warning __U8_TYPEDEF not defined #endif #ifdef __S8_TYPEDEF @@ -43,7 +50,7 @@ int main(int argc, char **argv) (int) sizeof(__S8_TYPEDEF)); exit(1); } -#else +#elif defined(__linux__) #warning __S8_TYPEDEF not defined #endif #ifdef __U16_TYPEDEF @@ -52,7 +59,7 @@ int main(int argc, char **argv) (int) sizeof(__U16_TYPEDEF)); exit(1); } -#else +#elif defined(__linux__) #warning __U16_TYPEDEF not defined #endif #ifdef __S16_TYPEDEF @@ -61,7 +68,7 @@ int main(int argc, char **argv) (int) sizeof(__S16_TYPEDEF)); exit(1); } -#else +#elif defined(__linux__) #warning __S16_TYPEDEF not defined #endif @@ -71,7 +78,7 @@ int main(int argc, char **argv) (int) sizeof(__U32_TYPEDEF)); exit(1); } -#else +#elif defined(__linux__) #warning __U32_TYPEDEF not defined #endif #ifdef __S32_TYPEDEF @@ -80,7 +87,7 @@ int main(int argc, char **argv) (int) sizeof(__S32_TYPEDEF)); exit(1); } -#else +#elif defined(__linux__) #warning __S32_TYPEDEF not defined #endif @@ -90,7 +97,7 @@ int main(int argc, char **argv) (int) sizeof(__U64_TYPEDEF)); exit(1); } -#else +#elif defined(__linux__) #warning __U64_TYPEDEF not defined #endif #ifdef __S64_TYPEDEF @@ -99,7 +106,7 @@ int main(int argc, char **argv) (int) sizeof(__S64_TYPEDEF)); exit(1); } -#else +#elif defined(__linux__) #warning __S64_TYPEDEF not defined #endif return 0; 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; diff --git a/misc/findsuper.c b/misc/findsuper.c index 6b5e16fc..eb9130ba 100644 --- a/misc/findsuper.c +++ b/misc/findsuper.c @@ -172,7 +172,7 @@ int main(int argc, char *argv[]) optind++; } if (sk < 0) { - fprintf(stderr, _("startkb should be positive, not %Lu\n"), sk); + fprintf(stderr, _("startkb should be positive, not %llu\n"),sk); exit(1); } @@ -183,7 +183,7 @@ int main(int argc, char *argv[]) } /* Now, go looking for the superblock! */ - printf(_("starting at %Lu, with %u byte increments\n"), sk, skiprate); + printf(_("starting at %llu, with %u byte increments\n"), sk, skiprate); if (print_jnl_copies) printf(_("[*] probably superblock written in the ext3 " "journal superblock,\n\tso start/end/grp wrong\n")); diff --git a/po/cs.po b/po/cs.po index 2ea495ef..e38629dd 100644 --- a/po/cs.po +++ b/po/cs.po @@ -6811,11 +6811,11 @@ msgstr "Chybné magické číslo v profile_file_data_t" #~ msgid "startkb should be a number, not %s\n" #~ msgstr "startkb by mělo být číslo, ne %s\n" -#~ msgid "startkb should be positive, not %Ld\n" -#~ msgstr "startkb by mělo být kladné, ne %Ld\n" +#~ msgid "startkb should be positive, not %lld\n" +#~ msgstr "startkb by mělo být kladné, ne %lld\n" -#~ msgid "starting at %Ld, with %d byte increments\n" -#~ msgstr "začínám na %Ld s přírůstky %d bajtů\n" +#~ msgid "starting at %lld, with %d byte increments\n" +#~ msgstr "začínám na %lld s přírůstky %d bajtů\n" #~ msgid " thisoff block fs_blk_sz blksz grp last_mount\n" #~ msgstr " tentopos blok fs_blk_sz blksz grp last_mount\n" diff --git a/po/es.po b/po/es.po index b9be136b..bb43ba7f 100644 --- a/po/es.po +++ b/po/es.po @@ -6997,21 +6997,21 @@ msgstr "" #~ msgid "startkb should be a number, not %s\n" #~ msgstr "principio debe ser un número, no %s\n" -#~ msgid "startkb should be positive, not %Ld\n" -#~ msgstr "principio debe ser positivo, no %Ld\n" +#~ msgid "startkb should be positive, not %lld\n" +#~ msgstr "principio debe ser positivo, no %lld\n" -#~ msgid "starting at %Ld, with %d byte increments\n" -#~ msgstr "se comienza en %Ld, con incrementos de %d bytes\n" +#~ msgid "starting at %lld, with %d byte increments\n" +#~ msgstr "se comienza en %lld, con incrementos de %d bytes\n" #~ msgid " thisoff block fs_blk_sz blksz grp last_mount\n" #~ msgstr " este bloque fs_blk_sz blksz grp ultimo_montado\n" #~ msgid "" #~ "\n" -#~ "%14Ld: finished with errno %d\n" +#~ "%14lld: finished with errno %d\n" #~ msgstr "" #~ "\n" -#~ "%14Ld: se finaliza con el error número %d\n" +#~ "%14lld: se finaliza con el error número %d\n" #~ msgid "(unknown os)" #~ msgstr "(so desconocido)" diff --git a/po/fr.po b/po/fr.po index 69c13d44..cccd69e8 100644 --- a/po/fr.po +++ b/po/fr.po @@ -6774,21 +6774,21 @@ msgstr "Valeur magique invalide dans profile_file_data_t" #~ msgid "startkb should be a number, not %s\n" #~ msgstr "dbut en Ko doit tre un nombre, non pas %s\n" -#~ msgid "startkb should be positive, not %Ld\n" -#~ msgstr "dbut en Ko doit tre positif, non pas %Ld\n" +#~ msgid "startkb should be positive, not %lld\n" +#~ msgstr "dbut en Ko doit tre positif, non pas %lld\n" -#~ msgid "starting at %Ld, with %d byte increments\n" -#~ msgstr "dbut %Ld, avec un incrment de %d octets\n" +#~ msgid "starting at %lld, with %d byte increments\n" +#~ msgstr "dbut %lld, avec un incrment de %d octets\n" #~ msgid " thisoff block fs_blk_sz blksz grp last_mount\n" #~ msgstr " thisoff block fs_blk_sz blksz grp last_mount\n" #~ msgid "" #~ "\n" -#~ "%14Ld: finished with errno %d\n" +#~ "%14lld: finished with errno %d\n" #~ msgstr "" #~ "\n" -#~ "%14Ld: termin avec errno %d\n" +#~ "%14lld: termin avec errno %d\n" #~ msgid "" #~ "Usage: %s \n" diff --git a/po/it.po b/po/it.po index 7ba7d71b..48a0b006 100644 --- a/po/it.po +++ b/po/it.po @@ -6840,18 +6840,18 @@ msgstr "" #~ msgid "startkb should be a number, not %s\n" #~ msgstr "kb_inizio deve essere un numero, non %s\n" -#~ msgid "startkb should be positive, not %Ld\n" -#~ msgstr "kb_inizio deve essere positivo, non %Ld\n" +#~ msgid "startkb should be positive, not %lld\n" +#~ msgstr "kb_inizio deve essere positivo, non %lld\n" -#~ msgid "starting at %Ld, with %d byte increments\n" -#~ msgstr "inizio a %Ld, con incrementi di %d byte\n" +#~ msgid "starting at %lld, with %d byte increments\n" +#~ msgstr "inizio a %lld, con incrementi di %d byte\n" #~ msgid "" #~ "\n" -#~ "%14Ld: finished with errno %d\n" +#~ "%14lld: finished with errno %d\n" #~ msgstr "" #~ "\n" -#~ "%14Ld: terminato con errore numero %d\n" +#~ "%14lld: terminato con errore numero %d\n" #~ msgid "(unknown os)" #~ msgstr "(so sconosciuto)" diff --git a/po/tr.po b/po/tr.po index 69d67879..e52bcf3b 100644 --- a/po/tr.po +++ b/po/tr.po @@ -7141,21 +7141,21 @@ msgstr "" #~ msgid "startkb should be a number, not %s\n" #~ msgstr "başlangıç_kb bir sayı olmalı, %s değil\n" -#~ msgid "startkb should be positive, not %Ld\n" -#~ msgstr "başlangıç_kb poritif olmalı, %Ld değil\n" +#~ msgid "startkb should be positive, not %lld\n" +#~ msgstr "başlangıç_kb poritif olmalı, %lld değil\n" -#~ msgid "starting at %Ld, with %d byte increments\n" -#~ msgstr "%Ld de başlayıp %d bayt arttırımla\n" +#~ msgid "starting at %lld, with %d byte increments\n" +#~ msgstr "%lld de başlayıp %d bayt arttırımla\n" #~ msgid " thisoff block fs_blk_sz blksz grp last_mount\n" #~ msgstr " thisoff blok ds_blok_boyu blokboyu grup son_bağlama\n" #~ msgid "" #~ "\n" -#~ "%14Ld: finished with errno %d\n" +#~ "%14lld: finished with errno %d\n" #~ msgstr "" #~ "\n" -#~ "%14Ld: %d hatası ile bitti\n" +#~ "%14lld: %d hatası ile bitti\n" #~ msgid "%s failed for %s: %s\n" #~ msgstr "%s %s için başarısız: %s\n"