From owner-svn-src-head@freebsd.org Mon Nov 26 23:35:57 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C964B1148C27 for ; Mon, 26 Nov 2018 23:35:57 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1.eu.mailhop.org (outbound1.eu.mailhop.org [52.28.251.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 312D9714BB for ; Mon, 26 Nov 2018 23:35:57 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1543275347; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=MolRgNg0aFmRrkYLsBKKsS5QXMCI+O6LYI2P17hGRAMDbFBTo95nAlGA/GbE9o/LpIYl7Yejn68Cn q0+3+LeFpi76mJGVbVVHmkqiN334XBmv6FMVJ8nE37yY72DJY5nXT80NcFZwQrWOBMUEiPuI9/Fybb Qrq1LvBQMZByEbT+JofYq4+F/al0CM9OrgQNcfx2hLDkLqsnq4rGddjoa8g43wdd5bOEBCLI8PB+jW U3PkDOBON3xVV0LLeqeCLmDFYafPLLTAkvdXDVbi8wk//5BZdo9eu8WiOgXqfT5A7Czs8TkgaXil45 UHrUPiaXcfIAyEcVbnX1iAMYJ7TLquQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:dkim-signature:from; bh=u64cyOEncdliR6UVEqYK8330m+aw28HhtAJiW9Xoi5E=; b=Yz4cJ4sk2LRpayUkz8gxr5o8x5ghysoGL85I1jqgL5XL80ht0pItnWTahCn3TvuuAREo6lvkiGYqT T2misiM8MtlFr+npbpRtH3aUywooPHluNKjs157jllm4OzPlTh6AEO91qi4++j8dg0JanwVVHUS1xK ++IwqEIVxMlH1S5VJyEa2ut9fjEy19KNzBI2Y5O+8fCsiwMGyIUH+mKQpYboNXTBTMjzqyNAF1nCBM bWZB1tpRJrH7TIgbtPT2vLUGPu2sA4XuCtwN17RnVkhF0BUQEjYGOuIHAhcFugEblTjJRQc/6yasTF kz/xvpLdc8CBK63HNAngTgpukPwmelw== ARC-Authentication-Results: i=1; outbound3.eu.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:from; bh=u64cyOEncdliR6UVEqYK8330m+aw28HhtAJiW9Xoi5E=; b=FbmW6CS9HMnpfOVznc7E0CD6wG7xbEbpml335a9DYx4C2g7CI7RuDhE+Fk7BgUKuFAo5LLAO+ZJct SMTGJfVwRE7LuHU+CFKGe/t0xzpJ43hkz09Swe3TErV2MQyp6beNc69VuilgV0qELgApGYu882nBkc 4rqPIORbNXd9nYTCYNQTEZlg9zyL1cAOcAoiCSeN0kZ5z7Xh3tz3YOjAdJ+Pf8vAqDhez+xijzyD4l 47yypi8yaPuribxqX88zNcP5cX9l1WO97IBtoDFQP2kjM6nz/o7rMn1OyhRL7reAZnYL8CwGa9C4d3 bzj/nA2u72E05Ykf9CIxcAiGx0aoWSQ== X-MHO-RoutePath: aGlwcGll X-MHO-User: fe74eeea-f1d3-11e8-8a28-a1efd8da9a94 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound3.eu.mailhop.org (Halon) with ESMTPSA id fe74eeea-f1d3-11e8-8a28-a1efd8da9a94; Mon, 26 Nov 2018 23:35:45 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id wAQNZidR032434; Mon, 26 Nov 2018 16:35:44 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1543275344.1860.28.camel@freebsd.org> Subject: Re: svn commit: r340617 - head/sys/netgraph From: Ian Lepore To: Eugene Grosbein , John Baldwin , src-committers@freebsd.org, svn-src-head@freebsd.org Date: Mon, 26 Nov 2018 16:35:44 -0700 In-Reply-To: <5e7d2e8e-2a06-e687-f4c1-5c30ee4c50be@freebsd.org> References: <201811190727.wAJ7RpDN052165@repo.freebsd.org> <5e7d2e8e-2a06-e687-f4c1-5c30ee4c50be@freebsd.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 312D9714BB X-Spamd-Result: default: False [0.37 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.16)[-0.164,0]; NEURAL_SPAM_LONG(0.58)[0.576,0]; ASN(0.00)[asn:16509, ipnet:52.28.0.0/16, country:US]; NEURAL_HAM_SHORT(-0.05)[-0.046,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 23:35:58 -0000 On Tue, 2018-11-27 at 06:29 +0700, Eugene Grosbein wrote: > 27.11.2018 4:26, John Baldwin wrote: > > > > > > > > >  /* Parse type for timeval */ > > >  static const struct ng_parse_struct_field > > > ng_source_timeval_type_fields[] = { > > > +#ifdef __LP64__ > > > + { "tv_sec", &ng_parse_int64_type } > > > , > > > + { "tv_usec", &ng_parse_int64_type > > > }, > > > +#else > > >   { "tv_sec", &ng_parse_int32_type } > > > , > > >   { "tv_usec", &ng_parse_int32_type > > > }, > > > +#endif > > >   { NULL } > > time_t (and thus tv_sec) is 64 bits on all but i386 now.  tv_usec > > is still a > > long, so follows LP64 though.  If this is trying to match an actual > > struct > > timeval then you might want something like this: > > > > #ifdef __i386__ > >     { "tv_sec",         &ng_parse_int32_type }, > > #else > >     { "tv_sec",         &ng_parse_int64_type }, > > #endif > > #ifdef __LP64__ > >     { "tv_usec",        &ng_parse_int32_type }, > > #else > >     { "tv_usec",        &ng_parse_int64_type }, > > #endif > I'm not sure I get it right: do you mean there is a difference for > some platform we have? I think there's a typo there... it makes more sense if the second test is #ifndef __LP64__ (or swap the 32 and 64 in the true/false legs of the test as shown). -- Ian