This is the mail archive of the
mailing list for the glibc project.
Re: [RFC] Strftime return value when S is a null pointer
- From: Ian Lance Taylor <ian at wasabisystems dot com>
- To: Paolo Carlini <pcarlini at suse dot de>
- Cc: libc-alpha at sources dot redhat dot com, libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: 20 Aug 2004 12:09:22 -0400
- Subject: Re: [RFC] Strftime return value when S is a null pointer
- References: <41261D82.firstname.lastname@example.org>
Paolo Carlini <email@example.com> 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