Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] Change handrolled strftime to strftime in zftp.c
> 2019/03/23 19:11, Wesley Schwengle <wesleyschwengle@xxxxxxxxx> wrote:
>
> + strftime(tmbuf, 15, "%Y%m%d%H%M%S", tm);
zsh has its own ztrftime() (which works on systems without strftime())
and we can use it here.
I tried it and of course it worked, but I noticed another (unrelated)
problem. If I build zsh with --enable-zsh-debug, and test on my Mac,
% zmodload zsh/zftp
% zftp local flame
zftp.c:2519: Shell compiled with wrong off_t size
On Darwin (and 64 bit Linux) both long and off_t are 64 bit. In
configure.ac, line 975 and below, it says OFF_T_IS_64_BIT is
defined only if LONG_IS_64_BIT is NOT defined (i.e., long is 32 bit)
and off_t is 64 bit. But in zftp.c, line 2518 (before patch),
#ifdef OFF_T_IS_64_BIT
printf("%s %s\n", output64(sz), mt);
#else
DPUTS(sizeof(sz) > 4, "Shell compiled with wrong off_t size");
printf("%ld %s\n", (long)sz, mt);
#endif
Should we replace "#ifdef OFF_T_IS_64_BIT" by "#ifndef OFF_T_IS_64_BIT"?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author