Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/sysinst Make the debug version compilable with mode...



details:   https://anonhg.NetBSD.org/src/rev/5312ef4ef861
branches:  trunk
changeset: 445560:5312ef4ef861
user:      martin <martin%NetBSD.org@localhost>
date:      Fri Nov 02 18:07:33 2018 +0000

description:
Make the debug version compilable with modern gcc.
Do debugging for system(3) calls only when DEBUG_SYSTEM is defined.

diffstat:

 usr.sbin/sysinst/run.c |  11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diffs (25 lines):

diff -r 28b3deab1abb -r 5312ef4ef861 usr.sbin/sysinst/run.c
--- a/usr.sbin/sysinst/run.c    Fri Nov 02 15:01:18 2018 +0000
+++ b/usr.sbin/sysinst/run.c    Fri Nov 02 18:07:33 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: run.c,v 1.5 2014/12/30 10:10:22 martin Exp $   */
+/*     $NetBSD: run.c,v 1.6 2018/11/02 18:07:33 martin Exp $   */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -59,8 +59,13 @@
 
 #define MAXBUF 256
 
-#ifdef DEBUG
-#define Xsystem(y) printf ("%s\n", y), 0
+#if defined(DEBUG) && defined(DEBUG_SYSTEM)
+static inline int
+Xsystem(const char *y)
+{
+       printf ("%s\n", y);
+       return 0;
+}
 #else
 #define Xsystem(y) system(y)
 #endif



Home | Main Index | Thread Index | Old Index