/* scoped_fd, automatically close a file descriptor
- Copyright (C) 2018-2020 Free Software Foundation, Inc.
+ Copyright (C) 2018-2022 Free Software Foundation, Inc.
This file is part of GDB.
#define COMMON_SCOPED_FD_H
#include <unistd.h>
-#include "filestuff.h"
+#include "gdb_file.h"
/* A smart-pointer-like class to automatically close a file descriptor. */
public:
explicit scoped_fd (int fd = -1) noexcept : m_fd (fd) {}
- scoped_fd (scoped_fd &&other)
+ scoped_fd (scoped_fd &&other) noexcept
: m_fd (other.m_fd)
{
other.m_fd = -1;