dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jilles Tjoelker <jilles@stack.nl>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: dash@vger.kernel.org, 759230@bugs.debian.org
Subject: Re: shell: Always use explicit large file API
Date: Sat, 9 May 2020 15:13:08 +0200	[thread overview]
Message-ID: <20200509131308.GA4393@stack.nl> (raw)
In-Reply-To: <20200507134212.GA17032@gondor.apana.org.au>

On Thu, May 07, 2020 at 11:42:12PM +1000, Herbert Xu wrote:
> There are some remaining stat/readdir calls in dash that may lead
> to spurious EOVERFLOW errors on 32-bit platforms.  This patch changes
> them (as well as open(2)) to use the explicit large file API.

> Reported-by: Tatsuki Sugiura <sugi@nemui.org>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

> diff --git a/configure.ac b/configure.ac
> index 5dab5aa..dbd97d8 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -144,8 +144,13 @@ AC_CHECK_FUNC(stat64,, [
>  	AC_DEFINE(fstat64, fstat, [64-bit operations are the same as 32-bit])
>  	AC_DEFINE(lstat64, lstat, [64-bit operations are the same as 32-bit])
>  	AC_DEFINE(stat64, stat, [64-bit operations are the same as 32-bit])
> +	AC_DEFINE(readdir64, readdir,
> +		  [64-bit operations are the same as 32-bit])
> +	AC_DEFINE(dirent64, dirent,
> +		  [64-bit operations are the same as 32-bit])
>  ])
> [snip]

Is it possible to use AC_SYS_LARGEFILE and the normal
fstat/lstat/readdir/dirent/open/etc instead of the non-standard "64"
interfaces?

I understand that dash formerly used the "64" interfaces selectively, so
that the binary could be a bit smaller by avoiding 64-bit numbers where
they were not necessary. Now that the feature "supports files with inode
numbers that do not fit in 32 bits" is considered essential, this
complexity seems unnecessary.

I'm sorry for not providing a patch.

-- 
Jilles Tjoelker

      reply	other threads:[~2020-05-09 13:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-07 13:42 shell: Always use explicit large file API Herbert Xu
2020-05-09 13:13 ` Jilles Tjoelker [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=20200509131308.GA4393@stack.nl \
    --to=jilles@stack.nl \
    --cc=759230@bugs.debian.org \
    --cc=dash@vger.kernel.org \
    --cc=herbert@gondor.apana.org.au \
    /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).