From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yngve Svendsen To: Milan Zamazal Cc: gnats-devel@sources.redhat.com Subject: Re: Current Gnats 4 CVS broken on Solaris Date: Tue, 12 Jun 2001 13:23:00 -0000 Message-id: <5.1.0.14.2.20010612221913.00ba0828@10.10.1.1> References: <87g0d85psm.fsf@blackbird.zamazal.org> <5.0.0.25.2.20010530174652.00b23a10@mail.trd.clustra.com> <5.1.0.14.2.20010511013313.00ba72d8@iwww.clustra.com> <5.0.0.25.2.20010612171703.04c66ec0@mail.trd.clustra.com> X-SW-Source: 2001-q2/msg00172.html At 17:19 12.06.2001 +0200, Yngve Svendsen wrote: >At 17:15 10.06.2001 +0200, Milan Zamazal wrote: >> >>>>> "YS" == Yngve Svendsen writes: >> >> YS> Sorry, but it seems the configure check for %z support isn't >> YS> working right. >> >>You're right. strftime is going to become my nightmare. :-| I tried to >>fix it and also added a patch by Carl enabling numeric time zones also >>on systems not supporting `%z'. Please try whether it works or not. > >Unfortunately, the nightmare continues. "make all" results in the >following on a Solaris 7 system: [snip] On some systems, Solaris among them, isdigit() requires an explicit cast to int. The very simple patch below fixes the problem and makes the current GNATS 4 compile on both Solaris and Linux. I have compiled and done some testing, and as far as I can tell, all is now well on systems that don't support %z. - Yngve Index: misc.c =================================================================== RCS file: /cvs/gnats/gnats/gnats/misc.c,v retrieving revision 1.28 diff -u -p -r1.28 misc.c --- misc.c 2001/06/10 17:15:47 1.28 +++ misc.c 2001/06/12 20:21:01 @@ -567,7 +567,7 @@ gnats_strftime (char *s, size_t size, co { char buf[16]; strftime (buf, 16, "%z", brokentime); - have_strftime_with_z = isdigit (buf[1]); + have_strftime_with_z = isdigit ((int) (buf[1])); } if (have_strftime_with_z)