Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/bin/sh/bltin Avoid warning by using gcc'ism



details:   https://anonhg.NetBSD.org/src/rev/f7b8a538c74c
branches:  trunk
changeset: 814346:f7b8a538c74c
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Mar 16 22:36:21 2016 +0000

description:
Avoid warning by using gcc'ism

diffstat:

 bin/sh/bltin/bltin.h |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (21 lines):

diff -r b2654124b4a8 -r f7b8a538c74c bin/sh/bltin/bltin.h
--- a/bin/sh/bltin/bltin.h      Wed Mar 16 22:35:44 2016 +0000
+++ b/bin/sh/bltin/bltin.h      Wed Mar 16 22:36:21 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bltin.h,v 1.13 2008/10/12 01:40:37 dholland Exp $      */
+/*     $NetBSD: bltin.h,v 1.14 2016/03/16 22:36:21 christos Exp $      */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -60,7 +60,11 @@
 #define FILE struct output
 #define stdout out1
 #define stderr out2
+#ifdef __GNUC__
+#define _RETURN_INT(x) ({(x); 0;}) /* map from void foo() to int bar() */
+#else
 #define _RETURN_INT(x) ((x), 0) /* map from void foo() to int bar() */
+#endif
 #define fprintf(...)   _RETURN_INT(outfmt(__VA_ARGS__))
 #define printf(...)    _RETURN_INT(out1fmt(__VA_ARGS__))
 #define putc(c, file)  _RETURN_INT(outc(c, file))



Home | Main Index | Thread Index | Old Index