On some systems, the gnulib configuration will decide to define open
and/or close as macros to replace the POSIX C functions. This
interferes with using those names in C++ class or namespace scopes.
gdbsupport/
* event-pipe.cc (event_pipe::open): Renamed to ...
(event_pipe::open_pipe): ... this.
(event_pipe::close): Renamed to ...
(event_pipe::close_pipe): ... this.
* event-pipe.h (class event_pipe): Updated.
gdb/
* inf-ptrace.h (async_file_open, async_file_close): Updated.
gdbserver/
* gdbserver/linux-low.cc (linux_process_target::async): Likewise.
protected:
/* Helper routines for interacting with the async event pipe. */
bool async_file_open ()
- { return m_event_pipe.open (); }
+ { return m_event_pipe.open_pipe (); }
void async_file_close ()
- { m_event_pipe.close (); }
+ { m_event_pipe.close_pipe (); }
void async_file_flush ()
{ m_event_pipe.flush (); }
void async_file_mark ()
if (enable)
{
- if (!linux_event_pipe.open ())
+ if (!linux_event_pipe.open_pipe ())
{
gdb_sigmask (SIG_UNBLOCK, &mask, NULL);
{
delete_file_handler (linux_event_pipe.event_fd ());
- linux_event_pipe.close ();
+ linux_event_pipe.close_pipe ();
}
gdb_sigmask (SIG_UNBLOCK, &mask, NULL);
event_pipe::~event_pipe ()
{
if (is_open ())
- close ();
+ close_pipe ();
}
/* See event-pipe.h. */
if (fcntl (m_fds[0], F_SETFL, O_NONBLOCK) == -1
|| fcntl (m_fds[1], F_SETFL, O_NONBLOCK) == -1)
{
- close ();
+ close_pipe ();
return false;
}
/* See event-pipe.h. */
void
-event_pipe::close ()
+event_pipe::close_pipe ()
{
::close (m_fds[0]);
::close (m_fds[1]);
DISABLE_COPY_AND_ASSIGN (event_pipe);
/* Create a new pipe. */
- bool open ();
+ bool open_pipe ();
/* Close the pipe. */
- void close ();
+ void close_pipe ();
/* True if the event pipe has been opened. */
bool is_open () const