simple c 's printf problem in mandrake8.0

eric fsshl@centurytel.net
Sat Dec 29 16:32:00 GMT 2001


"Bryan W. Headley" wrote:
> 
> eric wrote:
> 
> > Dear gcc programmers:
> >
> >   I use the mandrake8.0, test a simple c program
> > printf("hello world"), it did not print anything, until I add \n at the
> > end of the string.
> 
> Has nothing to do with the compiler. As Andrew said, it's because
> there's no flush(). But that doesn't answer the question, really:
> somebody did a flush.
> 
> 1. Debian and Redhat patched glibc to do a flush on exit().
> 2. The shell you are using does a flush() on return from the program.
> 
> I'm voting for #2. Question is, do you use the same shell between
> Mandrake, Debian, Redhat? E.g., are they all bash?


in mandrake8.0, recommand install, it in /bin/bash , I get from env.
please tell me how to emansipate the restriction so that without switch
platform to redhat or debian, my printf("hello world") still can print
without \n at the end of string.  I also test its c++ code, same thing ,
if I did not add endl or "\n", it just not print.

bash  as 2.04 after I use rpm -q bash on my mdk8

sincere, eric, http://www.ezinfocenter.com/4436786
               http://www.onlineexchange.com/shilin




 If so, what version?
> Identical all across? Then we have to see if someone patched the shell...
> 
> If you have Redhat 7.2, they give you both gcc 2.96 and 3.02 (gcc and
> gcc3). The latter still is not completely stable -- it has problems
> building kde across all hardware platforms, for example. But it's
> getting better and is most stable on the i386, as that's where the
> majority of the user base is (as more testers = better code.)
> 
> Still, avoid people who give you stupid answers like "our compiler is
> better". Axes to grind, but no trees to chop down. They just swing the
> thing in air...
> 
> --
> ____               .:.                 ____
> Bryan W. Headley - bheadley@interaccess.com



More information about the Gcc-help mailing list