From owner-freebsd-current@FreeBSD.ORG Sat Nov 12 18:23:44 2005 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8BA5316A41F for ; Sat, 12 Nov 2005 18:23:44 +0000 (GMT) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 468F743D45 for ; Sat, 12 Nov 2005 18:23:44 +0000 (GMT) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.11/8.12.11) with ESMTP id jACINhdm004306; Sat, 12 Nov 2005 10:23:43 -0800 (PST) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.11/8.12.3/Submit) id jACINhb2004305; Sat, 12 Nov 2005 10:23:43 -0800 (PST) (envelope-from rizzo) Date: Sat, 12 Nov 2005 10:23:43 -0800 From: Luigi Rizzo To: current@freebsd.org Message-ID: <20051112102343.A4222@xorpc.icir.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i Cc: Subject: struct timeval tv_sec type mismatch ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Nov 2005 18:23:44 -0000 on freebsd 5.x and above, the tv_sec field of struct timeval has type 'long' (defined here: http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/sys/_timeval.h whereas apparently most platform have it as time_t, and i believe there are standards that require that: http://www.opengroup.org/onlinepubs/009695399/basedefs/sys/time.h.html Any reason to keep it as a 'long' ? The differences between these two types prevents from passing &tv.tv_sec to functions requiring a time_t * as arguments, which is apparently a relatively common practice. cheers luigi