Facts first: (quote from "man 3 printf")
z A following integer conversion corresponds to a size_t or ssize_t argument. (Linux libc5 has Z with this meaning. Don't use
it.)
CONFORMING TO
The fprintf, printf, sprintf, vprintf, vfprintf, and vsprintf functions conform to ANSI X3.159-1989 ("ANSI C") and ISO/IEC
9899:1999 ("ISO C99"). The snprintf and vsnprintf functions conform to ISO/IEC 9899:1999.
So, there's reason for "%z". Are you really poses AIX machine?
I understand that there is a reason for "%z". What I'm trying to say is:
1) Not all Unix flavors have "%zd"
2) IRIX does not have it, for sure.
3) Taking a quick look at man pages of printf for AIX, HP-UX and Solaris, there is
no mention of a specific format descriptor for size_t . Probably it means that
"%zd% is an unvalid format descriptor on such machines.
4) I have only a direct experience on IRIX.
5) Your "man 3 printf" is probably issued on a Linux machine. Isn't it? The point
is that I'm not talking about Linux.
Cheers
--
Gaznevada