Sender: rich AT phekda DOT freeserve DOT co DOT uk Message-ID: <3BDA8B05.142DDD80@phekda.freeserve.co.uk> Date: Sat, 27 Oct 2001 11:23:01 +0100 From: Richard Dawe X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.19 i586) X-Accept-Language: de,fr MIME-Version: 1.0 To: djgpp-workers AT delorie DOT com Subject: Re: Some build fixes for the test suite References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com Hello. Eli Zaretskii wrote: > > On Sun, 21 Oct 2001, Richard Dawe wrote: [snip] > > 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. But wouldn't you want the test to break, if size_t were changed? Otherwise you could hide the fact that the test needed some work, to cope with the size_t change. > > *** 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? > This is from tests/libc/ansi/dos/io/putpath.c: > > ! 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? You get a warning if you just do a cast, because some qualifiers are discarded (const, I guess). I've updated the tests to use unconst instead of strdup now. I'll check the unconst fixes in. Thanks for looking at the patch. Bye, Rich =] -- Richard Dawe http://www.phekda.freeserve.co.uk/richdawe/