From: "Theodore Ts'o" <tytso@mit.edu>
To: Michael Forney <mforney@mforney.org>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH 2/2] libext2fs: use offsetof() from stddef.h
Date: Mon, 5 Jul 2021 22:55:24 -0400 [thread overview]
Message-ID: <YOPGHGlM2an3f8rK@mit.edu> (raw)
In-Reply-To: <20210414074128.31268-2-mforney@mforney.org>
On Wed, Apr 14, 2021 at 12:41:28AM -0700, Michael Forney wrote:
> offsetof is a standard C feature available from stddef.h, going
> back all the way to ANSI C.
>
> Signed-off-by: Michael Forney <mforney@mforney.org>
Thanks, applied.
> Perhaps there is some reason to prefer compiler builtins over libc
> that I'm not seeing?
It's because I pulled container_of from the kernel, and the kernel
header files has to provide offsetof since we don't use the standard
header files --- and it has to work across a bunch of compilers and
architectures.
- Ted
next prev parent reply other threads:[~2021-07-06 2:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-14 7:41 [PATCH 1/2] libext2fs: use statement-expression for container_of only on GNU-compatible compilers Michael Forney
2021-04-14 7:41 ` [PATCH 2/2] libext2fs: use offsetof() from stddef.h Michael Forney
2021-07-06 2:55 ` Theodore Ts'o [this message]
2021-07-06 0:28 ` [PATCH 1/2] libext2fs: use statement-expression for container_of only on GNU-compatible compilers Theodore Ts'o
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YOPGHGlM2an3f8rK@mit.edu \
--to=tytso@mit.edu \
--cc=linux-ext4@vger.kernel.org \
--cc=mforney@mforney.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).