bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Let's remove Gnulib's ctime module


From: Bruno Haible
Subject: Re: Let's remove Gnulib's ctime module
Date: Sat, 10 Feb 2024 10:53:31 +0100

Paul Eggert wrote:
> >> So CTIME_BUFSIZE should be 35?
> > With 50 years of computer science experience, we should have learned
> > the lesson to allocate more room than sounds necessary*now*. If
> > now you think 35 will be sufficient for all times, then we should
> > better choose twice that value: 70.
> 
> We needn't be that pessimistic. We can use something like this:
> 
>    #define CTIME_BUFSIZE \
>      (sizeof "Wed Jun 30 21:49:08 \n" \
>       + INT_STRLEN_BOUND (time_t) - 7)

This formula reflects *today*'s expectations. My point is that we
should be prepared for the unexpected events. Such as the U.S.
adopting the French Republican calendar with its longer month
names (germinal, brumaire, etc.). Or that the abbreviation and
padding habits change.

Bruno






reply via email to

[Prev in Thread] Current Thread [Next in Thread]