public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin/main] Cygwin: lseek: propagate new SEEK_DATA and SEEK_HOLE to fhandler
@ 2023-08-09 15:25 Corinna Vinschen
  0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2023-08-09 15:25 UTC (permalink / raw)
  To: cygwin-cvs

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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-08-09 15:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-09 15:25 [newlib-cygwin/main] Cygwin: lseek: propagate new SEEK_DATA and SEEK_HOLE to fhandler Corinna Vinschen

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).