Read the gnu libc FAQ, it contains info about why this happens, and it pretty much explains that the first example you show is not valid ANSI C. So in affect, it is a bug in the program to do that (since std{out,in,err} are not really constants, but are runtime dependant).
The example you show below is the needed change, and I've had to do it many times when we made the move to glibc 2.1 on sparc. It is correct, and portable. -- -----------=======-=-======-=========-----------=====------------=-=------ / Ben Collins -- ...on that fantastic voyage... -- Debian GNU/Linux \ ` [EMAIL PROTECTED] -- [EMAIL PROTECTED] -- [EMAIL PROTECTED] ' `---=========------=======-------------=-=-----=-===-======-------=--=---'