Date: Sun, 21 Oct 2001 13:35:58 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Richard Dawe cc: DJGPP workers Subject: Re: Some build fixes for the test suite In-Reply-To: <3BD2AAB2.CAF5D96B@phekda.freeserve.co.uk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Sun, 21 Oct 2001, Richard Dawe wrote: > Some of the tests do not currently build with gcc 2.95.3. Below is a diff > that fixes some of the tests. Thanks; I have some comments. > The only objection I can see is that the putpath test now strdup's a bunch > of strings, but does not free them when the test exits. But these strings > are freed automatically on exit, right? All memory allocated by a program is freed when the program exits. > if (f->_cnt > last_count) > { > ! printf("Count: %5d Fill: %5d Bufsiz: %5d SoFar: %5d\n", > f->_cnt, f->_fillsize, f->_bufsiz, so_far); > } > last_count = f->_cnt; > --- 12,18 ---- > { > if (f->_cnt > last_count) > { > ! printf("Count: %5d Fill: %5ld Bufsiz: %5ld SoFar: %5d\n", > f->_cnt, f->_fillsize, f->_bufsiz, so_far); If we are nitpicking, lets pick all the nits ;-) Let's cast the size_t members to long (actually, unsigned long sounds better). That way, we don't need to do anything if some day the size_t typedef changes. > *** tests/libc/ansi/time/strftime.c 1997/11/02 15:23:56 1.1 > --- tests/libc/ansi/time/strftime.c 2001/10/14 21:01:37 > *************** compare (const char *fmt, const struct t > *** 28,33 **** > --- 28,35 ---- > int > main (void) > { > + #undef TZ > + char TZ[] = "TZ=GMT0"; I don't understand the reason for this one. Can you explain? > ! putenv(strdup("DJDIR=c:/djgpp2")); > ! putenv(strdup("HOME=c:\\home")); Yuck! Is this because of the "const char *" vs "char *" nuisance? If so, won't simple cast or `unconst' do?