X-Git-Url: https://git.efficios.com/?a=blobdiff_plain;f=libiberty%2Flrealpath.c;h=d6694c40349916b706d5ba05123d3a9059be3389;hb=c2ecccb33c307faa21f4d2f47348e7346b032d94;hp=ac914a7a4f403b09c90416c8e1fa3c6b52c1b48a;hpb=f211b8c0b91fc7b1657079a495f05a9a4d957821;p=deliverable%2Fbinutils-gdb.git diff --git a/libiberty/lrealpath.c b/libiberty/lrealpath.c index ac914a7a4f..d6694c4034 100644 --- a/libiberty/lrealpath.c +++ b/libiberty/lrealpath.c @@ -1,7 +1,7 @@ /* Libiberty realpath. Like realpath, but more consistent behavior. Based on gdb_realpath from GDB. - Copyright (C) 2003-2019 Free Software Foundation, Inc. + Copyright (C) 2003-2020 Free Software Foundation, Inc. This file is part of the libiberty library. @@ -49,9 +49,6 @@ components will be simplified. The returned value will be allocated using #ifdef HAVE_STRING_H #include #endif -#ifdef HAVE_FCNTL_H -#include -#endif /* On GNU libc systems the declaration is only visible with _GNU_SOURCE. */ #if defined(HAVE_CANONICALIZE_FILE_NAME) \ @@ -158,16 +155,3 @@ lrealpath (const char *filename) /* This system is a lost cause, just duplicate the filename. */ return strdup (filename); } - -/* Return true when FD file descriptor exists. */ - -int -is_valid_fd (int fd) -{ -#if defined(_WIN32) - HANDLE h = (HANDLE) _get_osfhandle (fd); - return h != (HANDLE) -1; -#else - return fcntl (fd, F_GETFD) >= 0; -#endif -}