From owner-freebsd-questions Wed Dec 15 5:14:47 1999 Delivered-To: freebsd-questions@freebsd.org Received: from thoth.mch.sni.de (thoth.mch.sni.de [192.35.17.2]) by hub.freebsd.org (Postfix) with ESMTP id 169541538B for ; Wed, 15 Dec 1999 05:14:31 -0800 (PST) (envelope-from andre.albsmeier@mchp.siemens.de) X-Envelope-Sender-Is: andre.albsmeier@mchp.siemens.de (at relayer thoth.mch.sni.de) Received: from mail2.siemens.de (mail2.siemens.de [139.25.208.11]) by thoth.mch.sni.de (8.9.3/8.9.3) with ESMTP id OAA04744 for ; Wed, 15 Dec 1999 14:14:26 +0100 (MET) Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.42.7]) by mail2.siemens.de (8.9.3/8.9.3) with ESMTP id OAA21253 for ; Wed, 15 Dec 1999 14:14:25 +0100 (MET) Received: (from daemon@localhost) by curry.mchp.siemens.de (8.9.3/8.9.3) id OAA84717 for ; Wed, 15 Dec 1999 14:14:25 +0100 (CET) Date: Wed, 15 Dec 1999 14:14:23 +0100 From: Andre Albsmeier To: freebsd-questions@freebsd.org Subject: mktime(), why does it fail? Message-ID: <19991215141423.A98888@internal> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG When trying to compile gnu tar-1.13, configure tries do determine if mktime() works. This fails; the following program demonstrates why: #include #include #include void main () { time_t t; struct tm tm; /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" instead of "TZ=America/Vancouver" in order to detect the bug even on systems that don't support the Olson extension, or don't have the full zoneinfo tables installed. */ putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); tm.tm_year = 98; tm.tm_mon = 3; tm.tm_mday = 5; tm.tm_hour = 2; tm.tm_min = 0; tm.tm_sec = 0; tm.tm_isdst = -1; t=mktime(&tm); printf("%lu, ", t); if (t== (time_t)-1) { printf("Error\n"); exit (1); } printf("OK\n"); } Now my question: Why does the mktime() call above not succeed under FreeBSD-3.4-RC? I think it should... -Andre -- "In a world without walls and fences, who needs windows and gates?" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message