All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@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 12:32:48 +0200	[thread overview]
Message-ID: <YK4j0Pw4ECqjFWTj@pevik> (raw)
In-Reply-To: <YK4Q1iJz0/i4ZSxc@yuki>

Hi Cyril,

> 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.
Thanks for info. I noticed Makefile myself, but didn't know the background.

> 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
Yep (verified myself).

> As far as I can tell we should remove the OFF_T handling from the
> Makefile here instead.
OK, I'll send a patch which removes off64_t from Makefile and use
always off_t.

Kind regards,
Petr

      reply	other threads:[~2021-05-26 10:32 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
2021-05-26 10:32     ` Petr Vorel [this message]

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=YK4j0Pw4ECqjFWTj@pevik \
    --to=pvorel@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.