delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/02/27/14:47:58

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:references:to:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=QzU5z6ZezMi0wIr4
6ImewYYta4lOZnGb9zOJ6Gd1xFsRfWJcmucy+MezQwCyVdeMiC/srj6foDjjaYTs
KQD8k4QWsZVcwVq1h8xDQD3tDE52+AFa5LfnlGhxY1Ueq1bQCBpynwO+MrbvM/vm
lEslygWZm7x3lt/Ks6HSvCxPMVA=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:references:to:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=J3HwuILjqM3R4XUtR/Qk0V
64fzM=; b=xVLPgJfeA+tPrptxCYI2RWdINZjJULd/cEOwv9NJo03ha8z5ftOoiY
IOkNWDg5alIPQBWaGBhow/sYuAwziZDXigholV6M2mgqGWCJoI7Trw/KtxzQ6Hnq
e1lK2IQhPUle9j9Opbt+LZq7Gpyu3PZ/6BmqHyLYy9PtO79aS+Jcw=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-16.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=
X-HELO: mailout04.t-online.de
Subject: [PATCH] Properly encapsulate multi-statement macro.
References: <6e96e314-0a4c-d3fa-83e3-902fb85d86c9 AT t-online DOT de>
To: cygwin AT cygwin DOT com
From: =?UTF-8?Q?Hans-Bernhard_Br=c3=b6ker?= <HBBroeker AT t-online DOT de>
X-Forwarded-Message-Id: <6e96e314-0a4c-d3fa-83e3-902fb85d86c9 AT t-online DOT de>
Message-ID: <7de8b3a1-d724-c451-979c-9067c8f78710@t-online.de>
Date: Thu, 27 Feb 2020 20:47:02 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0
MIME-Version: 1.0
In-Reply-To: <6e96e314-0a4c-d3fa-83e3-902fb85d86c9@t-online.de>
X-IsSubscribed: yes

  winsup/cygwin/fhandler_console.cc | 5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/winsup/cygwin/fhandler_console.cc 
b/winsup/cygwin/fhandler_console.cc
index 4ab9bcab8..353abd197 100644
--- a/winsup/cygwin/fhandler_console.cc
+++ b/winsup/cygwin/fhandler_console.cc
@@ -63,10 +63,11 @@ static struct fhandler_base::rabuf_t con_ra;
  static unsigned char wpbuf[WPBUF_LEN];
  static int wpixput;
  static unsigned char last_char;
-#define wpbuf_put(x) \
+#define wpbuf_put(x) do { \
    wpbuf[wpixput++] = x; \
    if (wpixput > WPBUF_LEN) \
-    wpixput--;
+    wpixput--; \
+} while(0)

  static void
  beep ()
--
2.21.0



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019