public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin/main] Cygwin: devices.h: drop useless mode check
@ 2024-02-01 11:39 Corinna Vinschen
0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2024-02-01 11:39 UTC (permalink / raw)
To: cygwin-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=219b2dff771d01d7be8e03adf068ac3b69a89363
commit 219b2dff771d01d7be8e03adf068ac3b69a89363
Author: Corinna Vinschen <corinna@vinschen.de>
AuthorDate: Tue Jan 23 20:06:33 2024 +0100
Commit: Corinna Vinschen <corinna@vinschen.de>
CommitDate: Wed Jan 31 20:11:57 2024 +0100
Cygwin: devices.h: drop useless mode check
use IFTODT to generate type from mode.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diff:
---
winsup/cygwin/local_includes/devices.h | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/winsup/cygwin/local_includes/devices.h b/winsup/cygwin/local_includes/devices.h
index 1e035f9d6a3e..c4f06127418c 100644
--- a/winsup/cygwin/local_includes/devices.h
+++ b/winsup/cygwin/local_includes/devices.h
@@ -15,7 +15,6 @@ typedef unsigned short _minor_t;
#define _minor(dev) ((dev) & ((1 << (sizeof (_minor_t) * 8)) - 1))
#define _major(dev) ((dev) >> (sizeof (_major_t) * 8))
-#include <sys/stat.h>
#include <dirent.h>
#include "cygheap_malloc.h"
@@ -383,9 +382,7 @@ public:
inline int exists () const {return exists_func (*this);}
unsigned char type () const
{
- if (S_ISBLK (_mode))
- return DT_BLK;
- return _mode >> 12;
+ return IFTODT (_mode);
}
};
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-02-01 11:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-01 11:39 [newlib-cygwin/main] Cygwin: devices.h: drop useless mode check 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).