Problem with sftp-server on Tru64 (long long type and %ll)

Chris Adams cmadams at hiwaay.net
Mon Feb 26 09:31:47 EST 2001


Once upon a time, mouring at etoh.eviladmin.org <mouring at etoh.eviladmin.org> said:
> A solution that you can test is to go into your config.h and set this:
> 
> /* Define if your snprintf is busted */
> /* #undef BROKEN_SNPRINTF */

Well, BROKEN_SNPRINTF is a noop - there is no code that uses this
define (it should probably be removed from the config header).

> Then recompile and see if sftp-server and sftp work correctly.   If that
> solves it then it may be better to use the internal snprintf() then
> Tru64's.

Recompiling with HAVE_SNPRINTF and HAVE_VSNPRINTF both undefined fixes
it (but of course make the resulting binaries larger).

However, is that the right thing to do?  Is st->st_size (defined as
off_t) really a long long?  It isn't under Tru64 or Linux/Alpha (or
really, long long is the same as just long and it is defined as long)
and it isn't under Linux/x86 unless additional defines are added for
large file support.

Only sftp-client.c and sftp-server.c seem to use long long and the %llu
format; what does scp do with large files?

Is there a standard that specifies "ll" as a valid format modifier for u
and d?  Without additional defines, off_t is usually a long anyway.

-- 
Chris Adams <cmadams at hiwaay.net>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.





More information about the openssh-unix-dev mailing list