From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28400 invoked by alias); 30 Dec 2001 00:32:54 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 28373 invoked from network); 30 Dec 2001 00:32:54 -0000 Received: from unknown (HELO mailnw.centurytel.net) (209.206.160.237) by sources.redhat.com with SMTP; 30 Dec 2001 00:32:54 -0000 Received: from centurytel.net (pppoe1292.ka.centurytel.net [64.91.60.22]) by mailnw.centurytel.net (8.11.6/8.11.6) with ESMTP id fBU0Wqr02881; Sat, 29 Dec 2001 16:32:52 -0800 (PST) Message-ID: <3C2DFEFE.2936B9FF@centurytel.net> Date: Sat, 29 Dec 2001 16:32:00 -0000 From: eric Organization: onlineexchange X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.3-20mdk i686) X-Accept-Language: en MIME-Version: 1.0 To: "Bryan W. Headley" CC: gcc-help@gcc.gnu.org Subject: Re: simple c 's printf problem in mandrake8.0 References: <3C2DD7CC.E7C8FAA8@centurytel.net> <3C2E4939.6070304@interaccess.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2001-12/txt/msg00182.txt.bz2 "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