From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 0/2 v2] syscalls/sendfile: Convert sendfile{08, 09} to the new API
Date: Wed, 26 May 2021 11:11:50 +0200 [thread overview]
Message-ID: <YK4Q1iJz0/i4ZSxc@yuki> (raw)
In-Reply-To: <YK0XBktEIyGkhAsT@pevik>
Hi!
> By accident, I changed
> off_t before_pos, after_pos;
> to:
> OFF_T before_pos, after_pos;
>
> @Cyril: should it be reverted?
There is a define in the Makefile that defines OFF_T to off64_t for
_FILE_OFFSET_BITS=64 but that looks like a workaround for buggy libc.
The _FILE_OFFSET_BITS=64 should, when code is compiled on 32bit
platform, change the 32bit off_t to a 64bit off_t.
I.e. when you compile following:
int main(void)
{
printf("%zu\n", sizeof(off_t));
return 0;
}
on a 32bit (or with -m32) it should print 4
on a 32bit with -D_FILE_OFFSET_BITS=64 it should print 8
on a 64bit it should print 8 regardless
As far as I can tell we should remove the OFF_T handling from the
Makefile here instead.
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2021-05-26 9:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-20 9:24 [LTP] [PATCH 0/2 v2] syscalls/sendfile: Convert sendfile{08, 09} to the new API Xie Ziyao
2021-05-20 9:24 ` [LTP] [PATCH 1/2 v2] syscalls/sendfile: Convert sendfile08 " Xie Ziyao
2021-05-20 9:24 ` [LTP] [PATCH 2/2 v2] syscalls/sendfile: Convert sendfile09 " Xie Ziyao
2021-05-25 15:25 ` [LTP] [PATCH 0/2 v2] syscalls/sendfile: Convert sendfile{08, 09} " Petr Vorel
2021-05-26 9:11 ` Cyril Hrubis [this message]
2021-05-26 10:32 ` Petr Vorel
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=YK4Q1iJz0/i4ZSxc@yuki \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.