New version of newlib ??

J. Johnston jjohnstn@cygnus.com
Wed Aug 25 16:16:00 GMT 1999


Stuart Adams wrote:
> 
> Is there going to be an update/new version of newlib at some
> point in the future ???
> 
> Also, are there any Y2K issues with newlib-1.8.1 ????
> 
> Thanks,
>  Stuart
> 
> --
> 
> Stuart Adams
> Bright Star Engineering Inc.
> 19 Enfield Drive
> Andover MA 01810 USA
> Tel: +1-978-470-8738
> Fax: +1-978-470-8878
> Email: sja@brightstareng.com
> Web: http://www.brightstareng.com/

Stuart,

  We are preparing to release an update for newlib in the next couple of weeks.
Regarding Y2K compliance, there was a fix applied to strftime after newlib-1.8.1
was released.  I have included a patch below.  The fix will be in the
next release.

-- Jeff Johnston (Cygnus Solutions)

Index: strftime.c
===================================================================
RCS file: /cvs/cvsfiles/devo/newlib/libc/time/strftime.c,v
retrieving revision 1.8
diff -c -p -r1.8 strftime.c
*** strftime.c  1994/04/07 10:55:52     1.8
--- strftime.c  1999/08/25 23:07:45
*************** _DEFUN (strftime, (s, maxsize, format, t
*** 404,411 ****
        case 'y':
          if (count < maxsize - 2)
            {
              sprintf (&s[count], "%2.2d",
!                      tim_p->tm_year);
              count += 2;
            }
          else
--- 404,414 ----
        case 'y':
          if (count < maxsize - 2)
            {
+             /* The year could be greater than 100, so we need the value
+                modulo 100.  The year could be negative, so we need to
+                correct for a possible negative remainder.  */
              sprintf (&s[count], "%2.2d",
!                      (tim_p->tm_year % 100 + 100) % 100);
              count += 2;
            }
          else


More information about the Newlib mailing list