? .diff.out.swp ? .includes.h.swp ? 32build.txt ? autoscan.log ? bsdbuild32.txt ? configure.scan ? diff.txt ? out.txt Index: aclocal.m4 =================================================================== RCS file: /cvs/openssh/aclocal.m4,v retrieving revision 1.6 diff -u -r1.6 aclocal.m4 --- aclocal.m4 19 Sep 2005 16:33:39 -0000 1.6 +++ aclocal.m4 21 Nov 2005 17:56:50 -0000 @@ -84,3 +84,45 @@ #include ]) ]) +dnl +dnl Check whether a given format can be used to print 64-bit integers +dnl Taken from Ethereal with slight modification. +dnl +AC_DEFUN([AC_CHECK_64BIT_FORMAT], +[ + AC_MSG_CHECKING([whether %$1x can be used to format 64-bit integers]) + AC_RUN_IFELSE( + [ + AC_LANG_SOURCE( + [[ +# ifdef HAVE_INTTYPES_H + #include +# endif + #include + #include + + main() + { + u_int64_t t = 1; + char strbuf[16+1]; + sprintf(strbuf, "%016$1x", t << 32); + if (strcmp(strbuf, "0000000100000000") == 0) + exit(0); + else + exit(1); + } + ]]) + ], + [ + AC_DEFINE(PRId64, "$1d", [Format for printing 64-bit signed decimal numbers]) + AC_DEFINE(PRIo64, "$1o", [Format for printing 64-bit unsigned octal numbers]) + AC_DEFINE(PRIx64, "$1x", [Format for printing 64-bit unsigned hexadecimal numbers (lower-case)]) + AC_DEFINE(PRIX64, "$1X", [Format for printing 64-bit unsigned hexadecimal numbers (upper-case)]) + AC_DEFINE(PRIu64, "$1u", [Format for printing 64-bit unsigned decimal numbers]) + AC_MSG_RESULT(yes) + ], + [ + AC_MSG_RESULT(no) + $2 + ]) +]) Index: configure.ac =================================================================== RCS file: /cvs/openssh/configure.ac,v retrieving revision 1.307 diff -u -r1.307 configure.ac --- configure.ac 12 Nov 2005 07:42:37 -0000 1.307 +++ configure.ac 21 Nov 2005 17:56:51 -0000 @@ -642,6 +642,7 @@ glob.h \ ia.h \ iaf.h \ + inttypes.h \ lastlog.h \ limits.h \ login.h \ @@ -698,6 +699,62 @@ # include #endif ]) + +# Taken from Ethereal with slight modification. +AC_CHECK_HEADERS(inttypes.h, + [ + # + # OK, we have inttypes.h, but does it define those macros? + # + AC_MSG_CHECKING([[whether inttypes.h defines the PRI[doxu]64 macros]]) + AC_COMPILE_IFELSE( + [ + AC_LANG_SOURCE( + [[ + #include + #include + #include + + main() + { + printf("%" PRId64 "\n", (u_int64_t)1); + printf("%" PRIo64 "\n", (u_int64_t)1); + printf("%" PRIx64 "\n", (u_int64_t)1); + printf("%" PRIX64 "\n", (u_int64_t)1); + printf("%" PRIu64 "\n", (u_int64_t)1); + } + ]]) + ], + [ + AC_MSG_RESULT(yes) + ac_inttypes_h_defines_formats=yes + ], + [ + AC_MSG_RESULT(no) + ac_inttypes_h_defines_formats=no + ]) + ], + [ + # + # We don't have inttypes.h, so it obviously can't define those + # macros. + # + ac_inttypes_h_defines_formats=no + ]) +if test "$ac_inttypes_h_defines_formats" = yes; then + AC_DEFINE(INTTYPES_H_DEFINES_FORMATS,,[Define if defines PRI[doxu]64 macros]) +else + AC_CHECK_64BIT_FORMAT(ll, + [ + AC_CHECK_64BIT_FORMAT(L, + [ + AC_CHECK_64BIT_FORMAT(q, + [ + AC_MSG_ERROR([neither %llx nor %Lx nor %qx worked on a 64-bit integer]) + ]) + ]) + ]) +fi # Checks for libraries. AC_CHECK_FUNC(yp_match, , AC_CHECK_LIB(nsl, yp_match)) Index: hostfile.c =================================================================== RCS file: /cvs/openssh/hostfile.c,v retrieving revision 1.32 diff -u -r1.32 hostfile.c --- hostfile.c 2 Aug 2005 07:07:08 -0000 1.32 +++ hostfile.c 21 Nov 2005 17:56:51 -0000 @@ -88,7 +88,7 @@ return (-1); } if (ret != SHA_DIGEST_LENGTH) { - debug2("extract_salt: expected salt len %u, got %u", + debug2("extract_salt: expected salt len %u, got %d", salt_len, ret); return (-1); } Index: includes.h =================================================================== RCS file: /cvs/openssh/includes.h,v retrieving revision 1.77 diff -u -r1.77 includes.h --- includes.h 26 Aug 2005 20:15:20 -0000 1.77 +++ includes.h 21 Nov 2005 17:56:51 -0000 @@ -49,6 +49,9 @@ defined(GLOB_HAS_GL_MATCHC) # include #endif +#ifdef HAVE_INTTYPES_H +# include /* For format specification macros */ +#endif #ifdef HAVE_NETGROUP_H # include #endif Index: loginrec.c =================================================================== RCS file: /cvs/openssh/loginrec.c,v retrieving revision 1.70 diff -u -r1.70 loginrec.c --- loginrec.c 17 Jul 2005 07:26:44 -0000 1.70 +++ loginrec.c 21 Nov 2005 17:56:52 -0000 @@ -1589,7 +1589,7 @@ return (0); default: error("%s: Error reading from %s: Expecting %d, got %d", - __func__, LASTLOG_FILE, sizeof(last), ret); + __func__, LASTLOG_FILE, (int32_t)sizeof(last), ret); return (0); } @@ -1613,7 +1613,7 @@ int fd; struct utmp ut; struct sockaddr_storage from; - size_t fromlen = sizeof(from); + socklen_t fromlen = sizeof(from); struct sockaddr_in *a4; struct sockaddr_in6 *a6; time_t t; Index: progressmeter.c =================================================================== RCS file: /cvs/openssh/progressmeter.c,v retrieving revision 1.24 diff -u -r1.24 progressmeter.c --- progressmeter.c 16 Jun 2005 03:18:05 -0000 1.24 +++ progressmeter.c 21 Nov 2005 17:56:52 -0000 @@ -84,7 +84,7 @@ i++; bytes = (bytes + 512) / 1024; } - snprintf(buf, size, "%3lld.%1lld%c%s", + snprintf(buf, size, "%3" PRId64 ".%1" PRId64 "%c%s", (int64_t) (bytes + 5) / 100, (int64_t) (bytes + 5) / 10 % 10, unit[i], @@ -98,7 +98,7 @@ for (i = 0; bytes >= 10000 && unit[i] != 'T'; i++) bytes = (bytes + 512) / 1024; - snprintf(buf, size, "%4lld%c%s", + snprintf(buf, size, "%4" PRId64 "%c%s", (int64_t) bytes, unit[i], i ? "B" : " "); Index: scp.c =================================================================== RCS file: /cvs/openssh/scp.c,v retrieving revision 1.139 diff -u -r1.139 scp.c --- scp.c 3 Oct 2005 08:11:25 -0000 1.139 +++ scp.c 21 Nov 2005 17:56:52 -0000 @@ -561,7 +561,7 @@ goto next; } #define FILEMODEMASK (S_ISUID|S_ISGID|S_IRWXU|S_IRWXG|S_IRWXO) - snprintf(buf, sizeof buf, "C%04o %lld %s\n", + snprintf(buf, sizeof buf, "C%04o %" PRId64 " %s\n", (u_int) (stb.st_mode & FILEMODEMASK), (int64_t)stb.st_size, last); if (verbose_mode) { Index: sftp-server.c =================================================================== RCS file: /cvs/openssh/sftp-server.c,v retrieving revision 1.58 diff -u -r1.58 sftp-server.c --- sftp-server.c 3 Oct 2005 08:11:25 -0000 1.58 +++ sftp-server.c 21 Nov 2005 17:56:53 -0000 @@ -427,7 +427,7 @@ off = get_int64(); len = get_int(); - TRACE("read id %u handle %d off %llu len %d", id, handle, + TRACE("read id %u handle %d off %" PRIu64 " len %d", id, handle, (u_int64_t)off, len); if (len > sizeof buf) { len = sizeof buf; @@ -468,7 +468,7 @@ off = get_int64(); data = get_string(&len); - TRACE("write id %u handle %d off %llu len %d", id, handle, + TRACE("write id %u handle %d off %" PRIu64 " len %d", id, handle, (u_int64_t)off, len); fd = handle_to_fd(handle); if (fd >= 0) {