On Wed, Sep 27, 2006 at 11:55:20AM -0700, Dan Price wrote:

> --- usr/src/cmd/zlogin/Makefile Mon Sep 11 23:06:16 2006
> +++ /dev/null   Wed Sep 27 11:24:43 2006
> @@ -1,47 +1,0 @@
> -#
> -#
> -# CDDL HEADER START
> -#
> -# The contents of this file are subject to the terms of the
> -# Common Development and Distribution License (the "License").
> -# You may not use this file except in compliance with the License.
> -#
> <..... snip: rest of file is here........>
> -lint:  lint_PROG
> -
> -include ../Makefile.targ
> --- /dev/null   Wed Sep 27 11:24:43 2006
> +++ usr/src/cmd/zlogin/fakefile Mon Sep 25 21:15:35 2006
> @@ -1,0 +1,47 @@
> +#
> +# CDDL HEADER START
> +#
> +# The contents of this file are subject to the terms of the
> +# Common Development and Distribution License (the "License").
> +# You may not use this file except in compliance with the License.
> +#
> <..... snip: rest of file is here........>
> 
> 
> However, patch(1) rejects this outright, and gpatch(1) prompts me for
> filenames and doesn't seem to want to create usr/src/cmd/zlogin/fakefile
> for me.  Is there any way to make this work right?

Solaris and GNU diff produce patches that are completely unusable with the
other's patch program when diffing against an empty file.  The problem,
ultimately, is that Solaris diff spits out "-1,0", while GNU diff uses
"0,0".  The format isn't standardized -- yet.  Apparently, the appropriate
POSIX subcommittee is looking at this, and their drafts appear to prefer
the "0,0" format.  That doesn't help us now.

I have a handful of fixes for patch in queue, including ones to accept the
GNU diff variant and to handle patches that create files, and to handle
patches that patch files that aren't in the current directory (as well as a
few others -- it's amazing that our patch works at all).  But it's all
buried behind other stuff.  You're welcome to take it over if you like.  :)

> (It's also *really* irritatingly asymmetric that we have /usr/bin/gpatch
> but not /usr/bin/gdiff...)

Indeed.

Danek
_______________________________________________
tools-discuss mailing list
[email protected]

Reply via email to