public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org>
To: cygwin-cvs@sourceware.org
Subject: [newlib-cygwin/main] Cygwin: lseek: propagate new SEEK_DATA and SEEK_HOLE to fhandler
Date: Wed,  9 Aug 2023 15:25:16 +0000 (GMT)	[thread overview]
Message-ID: <20230809152516.E98713858020@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=b6fbe0fc2e062e6f0d155009da235574e39dbbe2

commit b6fbe0fc2e062e6f0d155009da235574e39dbbe2
Author:     Corinna Vinschen <corinna@vinschen.de>
AuthorDate: Wed Aug 9 16:56:40 2023 +0200
Commit:     Corinna Vinschen <corinna@vinschen.de>
CommitDate: Wed Aug 9 16:56:40 2023 +0200

    Cygwin: lseek: propagate new SEEK_DATA and SEEK_HOLE to fhandler
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/cygwin/syscalls.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index 04907b991c48..e4b3dd2f3c62 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -1559,7 +1559,7 @@ lseek (int fd, off_t pos, int dir)
 {
   off_t res;
 
-  if (dir != SEEK_SET && dir != SEEK_CUR && dir != SEEK_END)
+  if (dir < SEEK_SET || dir > SEEK_HOLE)
     {
       set_errno (EINVAL);
       res = -1;

                 reply	other threads:[~2023-08-09 15:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20230809152516.E98713858020@sourceware.org \
    --to=corinna@sourceware.org \
    --cc=cygwin-cvs@sourceware.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 read-only IMAP folder(s) and NNTP newsgroup(s).