diff options
Diffstat (limited to 'libgloss/m68k/atari/atari-close.c')
-rw-r--r-- | libgloss/m68k/atari/atari-close.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libgloss/m68k/atari/atari-close.c b/libgloss/m68k/atari/atari-close.c new file mode 100644 index 0000000..a52049c --- /dev/null +++ b/libgloss/m68k/atari/atari-close.c @@ -0,0 +1,23 @@ +/* + Copyright (C) 2025 Mikael Hildenborg + SPDX-License-Identifier: BSD-2-Clause +*/ + +#include <_ansi.h> +#include "atari-gem_errno.h" +#include "atari-traps.h" + +int close(int fd) +{ + int err = GEM_EIHNDL; + if (fd >= 0) + { + err = trap1_3e((unsigned short)fd); + } + if (err < 0) + { + gem_error_to_errno(err); + return -1; + } + return 0; +} |