This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Strftime return value when S is a null pointer


Paolo Carlini <pcarlini@suse.de> writes:

> I'm working on a libstdc++-v3 problem report. In order to fix it
> properly, I must
> be sure about the value returned by strftime when S is a null
> pointer. Indeed,
> according to the glibc docs
> 
>     "If S is a null pointer, `strftime' does not actually write
>      anything, but instead returns the number of characters it would
>      have written."
> 
> and this is rather nice (not nice as snprintf, but, anyway). The
> problem is that I
> cannot find in C99 anything *mandating* this specific behavior.
> 
> Is it a glibc specific feature? In case, as far as glibc is concerned,
> can we rely upon
> it for all the recent, current (and, likely, future) releases?

This behaviour would be glibc specific.  It is not true on NetBSD, for
example.

Ian


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