From 6a9ed76db3e3d1cb36d246c9b3c22d220c2168a9 Mon Sep 17 00:00:00 2001 From: Wichert Akkerman Date: Mon, 22 Apr 2002 22:51:40 +0000 Subject: [PATCH] add DIFF #define --- ChangeLog | 7 ++++++- include/dpkg.h.in | 1 + main/configure.c | 7 ++++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index f6fbd0a9..f5abce3c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sun Apr 21 12:23:40 CEST 2002 Wichert Akkerman + + * include/dpkg.h.in: add DIFF #define + * main/configure.c: use it + Sun Apr 14 16:13:16 CEST 2002 Wichert Akkerman * man/en/deb-old.5.sgml: DocBook version of deb-old manpage @@ -7,7 +12,7 @@ Sun Apr 14 16:13:16 CEST 2002 Wichert Akkerman Sun Apr 14 00:49:09 CEST 2002 Wichert Akkerman - * scripts/controlllib.pl: accept multilpe consectucive empty lines + * scripts/controlllib.pl: accept multilpe consecutive empty lines Sat Apr 13 22:59:25 CEST 2002 Wichert Akkerman diff --git a/include/dpkg.h.in b/include/dpkg.h.in index 3ad1a3b0..826a0b2c 100644 --- a/include/dpkg.h.in +++ b/include/dpkg.h.in @@ -129,6 +129,7 @@ #define RM "rm" #define FIND "find" #define SHELL "sh" +#define DIFF "diff" #define SHELLENVIR "SHELL" diff --git a/main/configure.c b/main/configure.c index f41d8521..bac402d9 100644 --- a/main/configure.c +++ b/main/configure.c @@ -2,7 +2,8 @@ * dpkg - main program for package management * configure.c - configure packages * - * Copyright (C) 1995 Ian Jackson + * Copyright 1995 Ian Jackson + * Copyright 1999 Wichert Akkerman * * This is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as @@ -316,11 +317,11 @@ void deferred_configure(struct pkginfo *pkg) { char cmdbuf[1024]; p= getenv(PAGERENV); if (!p || !*p) p= DEFAULTPAGER; - sprintf(cmdbuf, "diff -Nu %.250s %.250s | %.250s", cdr.buf, cdr2.buf, p); + sprintf(cmdbuf, DIFF " -Nu %.250s %.250s | %.250s", cdr.buf, cdr2.buf, p); s= getenv(SHELLENV); if (!s || !*s) s= DEFAULTSHELL; execlp(s,s,"-c", cmdbuf, NULL); - ohshite(_("failed to run diff (%.250s)"), cmdbuf); + ohshite(_("failed to run %s (%.250s)"), DIFF, cmdbuf); } while ((r= waitpid(c1,&status,0)) == -1 && errno == EINTR); if (r != c1) { onerr_abort++; ohshite(_("wait for shell failed")); } -- 2.39.5