-# Zcmp and zdiff are used to invoke the cmp or the diff pro-
-# gram on compressed files. All options specified are passed
-# directly to cmp or diff. If only 1 file is specified, then
-# the files compared are file1 and an uncompressed file1.gz.
-# If two files are specified, then they are uncompressed (if
-# necessary) and fed to cmp or diff. The exit status from cmp
-# or diff is preserved.
-
-PATH="BINDIR:$PATH"; export PATH
-case "$0" in
- *cmp) prog=cmp ; comp=${CMP-cmp} ;;
- *) prog=diff; comp=${DIFF-diff} ;;
+# Copyright (C) 1998, 2002, 2006-2007, 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 1993 Jean-loup Gailly
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+case $1 in
+ --__cmp) shift
+ prog=cmp; cmp='${CMP-cmp}' ;;
+ *) prog=diff; cmp='${DIFF-diff}';;