diff options
Diffstat (limited to 'gl/lib/fdopendir.c')
-rw-r--r-- | gl/lib/fdopendir.c | 38 |
1 files changed, 1 insertions, 37 deletions
diff --git a/gl/lib/fdopendir.c b/gl/lib/fdopendir.c index 0f43d6f..bdbb2ea 100644 --- a/gl/lib/fdopendir.c +++ b/gl/lib/fdopendir.c @@ -1,5 +1,5 @@ /* provide a replacement fdopendir function - Copyright (C) 2004-2023 Free Software Foundation, Inc. + Copyright (C) 2004-2024 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -44,42 +44,6 @@ fdopendir (int fd) return dirp; } -# elif defined __KLIBC__ - -# include <InnoTekLIBC/backend.h> - -DIR * -fdopendir (int fd) -{ - char path[_MAX_PATH]; - DIR *dirp; - - /* Get a path from fd */ - if (__libc_Back_ioFHToPath (fd, path, sizeof (path))) - return NULL; - - dirp = opendir (path); - if (!dirp) - return NULL; - - /* Unregister fd registered by opendir() */ - _gl_unregister_dirp_fd (dirfd (dirp)); - - /* Register our fd */ - if (_gl_register_dirp_fd (fd, dirp)) - { - int saved_errno = errno; - - closedir (dirp); - - errno = saved_errno; - - dirp = NULL; - } - - return dirp; -} - # else /* We are not in control of the file descriptor of a DIR, and therefore have to play tricks with file descriptors before and after a call to opendir(). */ |