Here comes the output from the testprog:

Script started on Mon Nov 03 18:01:53 2003
sh-2.05$ ./testprog 
The result is 255
�sh-2.05$ 
script done on Mon Nov 03 18:02:00 2003

Regards / Paul D

Sun 2003.11.02 21:16, "Brian Candler" wrote:
> On Sun, Nov 02, 2003 at 09:11:34PM +0000, Brian Candler wrote:
> > and the problem is that putchar(255) is returning EOF (-1) instead of 255.
> > Stupid Solaris. So, this function needs rewriting without using putchar.
> 
> Can you also compile and run the attached program and post its response here
> just to confirm the diagnosis (or else we can dig a bit deeper to try and
> find the actual problem)
> 
> Thanks,
> 
> Brian.

> /* Compile and run as:
>  *    gcc -Wall -o testprog testprog.c
>  *    ./testprog >/dev/null
>  */
> 
> #include <stdio.h>
> 
> int main(void)
> {
>       int res = putchar(255);
>       fprintf(stderr, "The result is %d\n", res);
>       return 0;
> }


Reply via email to