mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-27 16:51:06 -07:00
(underlying_strftime):
Set the buffer to a nonzero value before calling strftime, and check to see whether strftime has set the buffer to zero. This lets us distinguish between an empty buffer and an error. I'm installing this patch by hand now; it will be superseded whenever the glibc sources are propagated back to fsf.org.
This commit is contained in:
parent
6633b89142
commit
08b4600264
1 changed files with 2 additions and 1 deletions
|
|
@ -742,8 +742,9 @@ my_strftime (s, maxsize, format, tp)
|
|||
*u++ = modifier;
|
||||
*u++ = format_char;
|
||||
*u = '\0';
|
||||
ubuf[0] = '\1';
|
||||
len = strftime (ubuf, sizeof ubuf, ufmt, tp);
|
||||
if (len == 0)
|
||||
if (len == 0 && ubuf[0] != '\0')
|
||||
return 0;
|
||||
cpy (len, ubuf);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue