From 9c7deb13f0e8432ea757903fa43400cbd43ba84a Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Fri, 15 Dec 2006 23:17:56 +0000 Subject: [PATCH] * remote-fileio.c (remote_fileio_mode_to_target): Use S_ISREG/S_ISDIR/S_ISCHR macros instead of S_IFREG/S_IFDIR/S_IFCHR. --- gdb/ChangeLog | 5 +++++ gdb/remote-fileio.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 943114595cb..7ef5e289b52 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2006-12-15 Mark Kettenis + + * remote-fileio.c (remote_fileio_mode_to_target): Use + S_ISREG/S_ISDIR/S_ISCHR macros instead of S_IFREG/S_IFDIR/S_IFCHR. + 2006-12-15 Daniel Jacobowitz * breakpoint.c (insert_bp_location): Add newline to note. diff --git a/gdb/remote-fileio.c b/gdb/remote-fileio.c index 96c4d958736..eb7ae382963 100644 --- a/gdb/remote-fileio.c +++ b/gdb/remote-fileio.c @@ -192,11 +192,11 @@ remote_fileio_mode_to_target (mode_t mode) { mode_t tmode = 0; - if (mode & S_IFREG) + if (S_ISREG(mode)) tmode |= FILEIO_S_IFREG; - if (mode & S_IFDIR) + if (S_ISDIR(mode)) tmode |= FILEIO_S_IFDIR; - if (mode & S_IFCHR) + if (S_ISCHR(mode)) tmode |= FILEIO_S_IFCHR; if (mode & S_IRUSR) tmode |= FILEIO_S_IRUSR; -- 2.30.2