Let's consider following code: #include <stdio.h> int main () { printf("%hi\n", 0xffff0010); return 0; } It gives "-65520" on several Linux systems with libc 6 (particularly in Gentoo Linux), but on FreeBSD with libc 4 and different versions of msvc gives "16". The same thing with hh length modifier (higher bits are not cutted off according to length modifier).
oddly enough, %hu works as expected :) i'll report this upstream
this has been fixed upstream and i'll add it to glibc-2.4-r2 and glibc-2.3.6-r4