If I recall correctly "%lld" tends not to be very portable -- for some integer types, some machines/compilers complain if it is there -- some complain if it isn't there. My usual method of satisfying "everyone" is to use "%ld" and to explicitly cast the corresponding argument to (long) if there is a complaint.