This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: strftime


>>>>> Roland McGrath writes:

Roland> The fileutils-4.0 version of strftime differs from the current libc one:
Roland> @@ -1041,6 +1043,7 @@ my_strftime (s, maxsize, format, tp ut_a
Roland>  	  add (1, *p = '\t');
Roland>  	  break;
 
Roland> +	case 'f':
Roland>  	case 'u':		/* POSIX.2 extension.  */
Roland>  	  DO_NUMBER (1, (tp->tm_wday - 1 + 7) % 7 + 1);
 
Roland> @@ -1235,7 +1238,7 @@ my_strftime (s, maxsize, format, tp ut_a
Roland>  	}
Roland>      }
 
Roland> -  if (p && maxsize != 0)
Roland> +  if (p && i < maxsize)
Roland>      *p = '\0';
Roland>    return i;
Roland>  }


Roland> This slight difference is enough to make fileutils use its own strftime
Roland> instead of libc's (it tests for %f).

This is fixed in the current fileutils test release (I checked 4.0h):

1999-04-06  Jim Meyering  <meyering@ascend.com>

        * lib/strftime.c: Update from master source in libc.

1999-04-06  Jim Meyering  <meyering@ascend.com>

        * strftime.m4: Remove test for %f.


Andreas
-- 
 Andreas Jaeger   aj@arthur.rhein-neckar.de    jaeger@informatik.uni-kl.de
  for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.de

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]