From owner-svn-src-head@freebsd.org Tue Nov 27 00:15:32 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 386671149AC9 for ; Tue, 27 Nov 2018 00:15:32 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A2F0872B81 for ; Tue, 27 Nov 2018 00:15:31 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io1-xd2c.google.com with SMTP id w7so15514509iom.12 for ; Mon, 26 Nov 2018 16:15:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=d0Cm1wzoc1R4F7D/w496ir0uH2xi8BrStpIDx5TEBBQ=; b=fgYe9qUtFZiOziFBCyqr+QnrrVBPjnWvc0BOsq4miFGbQFx4ToahFeRbs33mbS1mj6 880Y7yYGclkABhi8RXO/S4fkMrCMRAfwaf3yBpvq3GrAqdwlWV80wg//1XDV67htYq6q eBuuIQenLQDD1pR4hrDprZ0H7kqU662tq44T1sMOGM+wmgKOiwWEbKkYZA3jqp3HSjP1 2BkBv2g58KDQBihvU72CHd2VH0QQuds4LsfLQPPs5ZVF9xPoq8T5Rzt973RAB5CK2k9P 4XWInRmGVnwCecN0POPXLjxvlzNqPE3jppEEdZ9FC2XKgu1Omky+wqu1o/Xv75WbmWX9 cvuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=d0Cm1wzoc1R4F7D/w496ir0uH2xi8BrStpIDx5TEBBQ=; b=g1/ngayby0alNOMRfoYDS87nQR2xWBbKok4NhMnzIr/6kgE6H/lTrgf7Jdpa0gchvY 6cODMVeaNRewPkgGROeDEaDwg5WeXPzCCTIB0PgWbpd8IPi/NSHlhqCLQ0t8nWZfZuv2 RMKNrDoexnq2Y2NogUivSF5y2BM37coSJxeYiheAwFFm9GU9kKucTW8CZupjV84oU5LQ rNWZO+8QyKlb2qcoeXvJ1Ae9bcEvCEHk1Ag8qJJk66ur0+ehtrKUwjteMLC422/RwiyF 2pMIFuSS/hKDrKAnaqekwWUp9ysXkRUJkoxJ7H6bGYenMmlifKO781+h2fMdl4l2fJF/ iCZg== X-Gm-Message-State: AA+aEWYLrItFDqe2cGiAe9zC8awzr8DWUGdEirBcpMoJ6ZHFOPSfTSsW lNaMW1/eNBQe2DGJJuU7DP7OA6PjJ+sdA6WVjxZa6g== X-Google-Smtp-Source: AFSGD/WwNAxagYkOyJtBnsNm0DjCF/W39/UOwOxpjCc37oUdEkWNaQraApaa0OmViYzDcZn1tCi/0762t4dlxEs5KiA= X-Received: by 2002:a5e:d808:: with SMTP id l8mr8684150iok.299.1543277730747; Mon, 26 Nov 2018 16:15:30 -0800 (PST) MIME-Version: 1.0 References: <201811190727.wAJ7RpDN052165@repo.freebsd.org> <5e7d2e8e-2a06-e687-f4c1-5c30ee4c50be@freebsd.org> In-Reply-To: <5e7d2e8e-2a06-e687-f4c1-5c30ee4c50be@freebsd.org> From: Warner Losh Date: Mon, 26 Nov 2018 17:15:19 -0700 Message-ID: Subject: Re: svn commit: r340617 - head/sys/netgraph To: eugen@freebsd.org Cc: John Baldwin , src-committers , svn-src-head@freebsd.org X-Rspamd-Queue-Id: A2F0872B81 X-Spamd-Result: default: False [-5.31 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: ALT1.aspmx.l.google.com]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[c.2.d.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_LAST(0.00)[]; IP_SCORE(-2.34)[ip: (-8.45), ipnet: 2607:f8b0::/32(-1.78), asn: 15169(-1.37), country: US(-0.09)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Server: mx1.freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Tue, 27 Nov 2018 00:15:32 -0000 On Mon, Nov 26, 2018 at 4:29 PM 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? > time_t is 64-bits in FreeBSD for all architectures regardless of __LP64__, except it's 32-bits on i386. Warner