From owner-freebsd-bugs Sat Jan 8 12:10: 5 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 9D40E14E13 for ; Sat, 8 Jan 2000 12:10:02 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id MAA69548; Sat, 8 Jan 2000 12:10:02 -0800 (PST) (envelope-from gnats@FreeBSD.org) Date: Sat, 8 Jan 2000 12:10:02 -0800 (PST) Message-Id: <200001082010.MAA69548@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Ken Harrenstien Subject: Re: bin/15981: rcp -p fails when times have high bit set Reply-To: Ken Harrenstien Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR bin/15981; it has been noted by GNATS. From: Ken Harrenstien To: Bruce Evans Cc: klh@netcom.com, freebsd-gnats-submit@FreeBSD.ORG Subject: Re: bin/15981: rcp -p fails when times have high bit set Date: Sat, 8 Jan 100 11:59:38 PST > Not under systems with signed time_t like FreeBSD. Using %ul would > break times before the epoch (about 1970). Sigh. OK, I didn't realize this was a conscious decision in FreeBSD. I assume there are good reasons for this (to me) surprising choice. If there is anything that explains the rationale, I would like to read about it. In particular, what's the plan for Jan 18, 2038? Thanks. > > >Fix: > > Don't create files with an st_mtime that is before the epoch. Well, the files in question are created by FreeBSD's user-FTP when retrieving them from a SunOS system, which responds to MDTM with "213 191000107192503". Looks like the old BSD ftp did something like printf("19%2d", t->tm_year). Should we: (a) do nothing and continue to get screwed, (b) test for negatives and substitute current time, (c) test for this case (eg by checking string length) and DWIM it, (d) convince Sun to fix their code (hahahahaha) ? --Ken To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message