diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2024-01-23 20:06:33 +0100 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2024-01-31 20:11:57 +0100 |
commit | 219b2dff771d01d7be8e03adf068ac3b69a89363 (patch) | |
tree | 76987d764a9804aac233d25b2ca8ddced5868c7e | |
parent | 5353cb8ef8a5cf411ee3c3518edfd6f472abbe58 (diff) | |
download | newlib-219b2dff771d01d7be8e03adf068ac3b69a89363.zip newlib-219b2dff771d01d7be8e03adf068ac3b69a89363.tar.gz newlib-219b2dff771d01d7be8e03adf068ac3b69a89363.tar.bz2 |
Cygwin: devices.h: drop useless mode check
use IFTODT to generate type from mode.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
-rw-r--r-- | winsup/cygwin/local_includes/devices.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/winsup/cygwin/local_includes/devices.h b/winsup/cygwin/local_includes/devices.h index 1e035f9..c4f0612 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); } }; |