From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 9f357495 for ; Mon, 25 Mar 2019 12:14:15 +0000 (UTC) Received: (qmail 20445 invoked by alias); 25 Mar 2019 12:14:04 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 44173 Received: (qmail 10678 invoked by uid 1010); 25 Mar 2019 12:14:03 -0000 X-Qmail-Scanner-Diagnostics: from rcpt-expgw.biglobe.ne.jp by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.1/25398. spamassassin: 3.4.2. Clear:RC:0(133.208.98.3):SA:0(-2.6/5.0):. Processed in 0.854278 secs); 25 Mar 2019 12:14:03 -0000 X-Envelope-From: takimoto-j@kba.biglobe.ne.jp X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at spf01.biglobe.ne.jp designates 133.208.98.3 as permitted sender) X-Biglobe-Sender: From: Jun T Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\)) Subject: Re: [PATCH] Change handrolled strftime to strftime in zftp.c Date: Mon, 25 Mar 2019 21:13:27 +0900 References: <20190323101135.14344-1-wesley@mintlab.nl> <20190323101135.14344-2-wesley@mintlab.nl> To: zsh-workers@zsh.org In-Reply-To: <20190323101135.14344-2-wesley@mintlab.nl> Message-Id: X-Mailer: Apple Mail (2.3445.102.3) X-Biglobe-Spnum: 57104 > 2019/03/23 19:11, Wesley Schwengle 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"?