Module Name: src Committed By: martin Date: Fri Nov 2 18:07:33 UTC 2018
Modified Files: src/usr.sbin/sysinst: run.c Log Message: Make the debug version compilable with modern gcc. Do debugging for system(3) calls only when DEBUG_SYSTEM is defined. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/sysinst/run.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.sbin/sysinst/run.c diff -u src/usr.sbin/sysinst/run.c:1.5 src/usr.sbin/sysinst/run.c:1.6 --- src/usr.sbin/sysinst/run.c:1.5 Tue Dec 30 10:10:22 2014 +++ src/usr.sbin/sysinst/run.c Fri Nov 2 18:07:33 2018 @@ -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