[RFC] Strftime return value when S is a null pointer
Paolo Carlini
pcarlini@suse.de
Fri Aug 20 15:51:00 GMT 2004
Hi,
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?
Thanks in advance,
Paolo.
More information about the Libstdc++
mailing list