diff options
Diffstat (limited to 'gdb/common/common-utils.c')
-rw-r--r-- | gdb/common/common-utils.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/gdb/common/common-utils.c b/gdb/common/common-utils.c index 8d839d1..24b3936 100644 --- a/gdb/common/common-utils.c +++ b/gdb/common/common-utils.c @@ -20,7 +20,6 @@ #include "common-defs.h" #include "common-utils.h" #include "host-defs.h" -#include <sys/stat.h> #include <ctype.h> /* The xmalloc() (libiberty.h) family of memory management routines. @@ -412,37 +411,6 @@ stringify_argv (const std::vector<char *> &args) /* See common/common-utils.h. */ -bool -is_regular_file (const char *name, int *errno_ptr) -{ - struct stat st; - const int status = stat (name, &st); - - /* Stat should never fail except when the file does not exist. - If stat fails, analyze the source of error and return true - unless the file does not exist, to avoid returning false results - on obscure systems where stat does not work as expected. */ - - if (status != 0) - { - if (errno != ENOENT) - return true; - *errno_ptr = ENOENT; - return false; - } - - if (S_ISREG (st.st_mode)) - return true; - - if (S_ISDIR (st.st_mode)) - *errno_ptr = EISDIR; - else - *errno_ptr = EINVAL; - return false; -} - -/* See common/common-utils.h. */ - ULONGEST align_up (ULONGEST v, int n) { |