diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2019-12-13 03:32:21 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2019-12-13 03:39:28 +0100 |
commit | 186e119bbd4a10895429ffe405ae96dc5c5634b8 (patch) | |
tree | 682816646e16dd89c3b71feba23150f3773da44b /sysdeps/mach/hurd/close_nocancel_nostatus.c | |
parent | fe75ee0ca65536352fcdaebfbf39aac9bee271f0 (diff) | |
download | glibc-186e119bbd4a10895429ffe405ae96dc5c5634b8.tar glibc-186e119bbd4a10895429ffe405ae96dc5c5634b8.tar.gz glibc-186e119bbd4a10895429ffe405ae96dc5c5634b8.tar.bz2 glibc-186e119bbd4a10895429ffe405ae96dc5c5634b8.zip |
hurd: Fix __close_nocancel_nostatus availability
Not only libc/rtld use __close_nocancel_nostatus.
* sysdeps/mach/hurd/Makefile [$(subdir) == io] (sysdep_routines): Add
close_nocancel_nostatus.
* sysdeps/mach/hurd/Versions (libc): Add __close_nocancel_nostatus to
GLIBC_PRIVATE.
* sysdeps/mach/hurd/not-cancel.h (__close_nocancel_nostatus): Declare
function instead of defining inline.
[IS_IN (libc) || IS_IN (rtld)] (__close_nocancel_nostatus): Make
function hidden.
* sysdeps/mach/hurd/close_nocancel_nostatus.c: New file.
Diffstat (limited to 'sysdeps/mach/hurd/close_nocancel_nostatus.c')
-rw-r--r-- | sysdeps/mach/hurd/close_nocancel_nostatus.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/sysdeps/mach/hurd/close_nocancel_nostatus.c b/sysdeps/mach/hurd/close_nocancel_nostatus.c new file mode 100644 index 0000000000..0c7c8acfba --- /dev/null +++ b/sysdeps/mach/hurd/close_nocancel_nostatus.c @@ -0,0 +1,30 @@ +/* Copyright (C) 1991-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#include <errno.h> +#include <unistd.h> +#include <hurd.h> +#include <hurd/fd.h> +#include <not-cancel.h> + +/* Close the file descriptor FD. */ +void +__close_nocancel_nostatus (int fd) +{ + HURD_FD_USE (fd, _hurd_fd_close (descriptor)); +} +libc_hidden_def (__close_nocancel_nostatus) |