From 825b388289a0feaf41a982c162b93acc5b293e6e Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 13 Apr 2004 09:04:22 +0000 Subject: * winsup.h (IMPLEMENT_STATUS_FLAG): New macro to define status flag accessor methods unambiguously. * fhandler.h: Use IMPLEMENT_STATUS_FLAG throughout where possible. * fhandler_termios.cc (fhandler_termios::tcinit): Call corrected accessor for initialized status flag. * mtinfo.h (class mtinfo_drive): Use IMPLEMENT_STATUS_FLAG throughout. * path.cc (fs_info::update): Remove duplicate call to flags(). * path.h (struct fs_info): Use IMPLEMENT_STATUS_FLAG where possible. (path_conv::is_auto_device): Fix spacing. * tty.h (class tty_min): Use IMPLEMENT_STATUS_FLAG throughout. --- winsup/cygwin/winsup.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'winsup/cygwin/winsup.h') diff --git a/winsup/cygwin/winsup.h b/winsup/cygwin/winsup.h index 3e132a174..40649f1be 100644 --- a/winsup/cygwin/winsup.h +++ b/winsup/cygwin/winsup.h @@ -138,6 +138,11 @@ extern HANDLE title_mutex; /**************************** Convenience ******************************/ +/* Used to define status flag accessor methods */ +#define IMPLEMENT_STATUS_FLAG(type,flag) \ + void flag (type val) { status.flag = (val); } \ + type flag () const { return (type) status.flag; } + /* Used when treating / and \ as equivalent. */ #define isdirsep(ch) \ ({ \ -- cgit v1.2.3