On Wed, Mar 17, 2004 at 04:45:30PM +0100, Toni Andjelkovic wrote: > On Wed, Mar 17 2004 (17:00:02 +0200), Artis Caune wrote: > > "pid_t" is signed int type, or am I missing something? > > You are right, pid_t is __int32_t, which is signed, so "%d" > is the correct format.
That's only correct for machines with 32-bit ints. In any case, POSIX only specifies that pid_t is a signed integer type... it could be any size supported by the implementation. For portability, you probably want to cast to the `biggest' type and use the appropriate printf specifier, e.g. printf("%ld", (long)pid_t); or printf("%jd", (intmax_t)pid_t); // C99 Cheers, -- Jacques Vidrine / [EMAIL PROTECTED] / [EMAIL PROTECTED] / [EMAIL PROTECTED] _______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"