Newsgroups: comp.sources.d Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!csus.edu!borland.com!davison From: davison@borland.com (Wayne Davison) Subject: Re: Problems with Patch not creating new files Message-ID: <1991Apr30.165545.6408@borland.com> Organization: Borland International References: <1991Apr27.150844.5719@telesys.cts.com> Date: Tue, 30 Apr 1991 16:55:45 GMT Kevin W. Reed (kreed@telesys.cts.com) writes: >I have the (I believe) latest and greatest version of Patch Yes, patch level 12u3 is definitely the one to be running, as it contains bug fixes and the unified context diff support that aren't in Larry Wall's last release, patch level 12. This version of patch is currently being maintained by David J. MacKenzie (djm@eng.umd.edu), and is usually found wherever GNU sources are hanging out, since GNU diff v1.15 generates the unified context diff format. >[I] seem to have problems when a patch file attempts to create a new >file (compared against /dev/null). The file creation support in unchanged in recent memory. The problem you describe will result from a incorrect context diff header, so it sounds like SCO Xenix's version of diff isn't working right. A correct header lists the old hunk at line number 0. If this is any other number, patch will assume that the file already exists somewhere, and prompt you for the name of the file to patch if it can't find it. The easiest way to fix this is to grab GNU diff v1.15 from an archive site and use it for all your diffing. And while you're at it, give the unified output a try -- you might find it easier to read, as well as more compact. -- \ /| / /|\/ /| /(_) Wayne Davison (_)/ |/ /\|/ / |/ \ davison@borland.com (W A Y N e) wdavison@mcimail.com (447-5895@mcimail.com)