[ns] problem with patch for ns windows
Tue, 27 Mar 2001 18:10:28 +0200
Thanks a lot for your prompt response. I have already gone through the
FAQ and the other guidlines (in fact few times!) and it helped me to
reach this point, but now I am completely stuck.
I am resending my question hope to hear from you soon!
I need to build Ns under Windows 2000. After downloading the components
and compiling, downloaded
New Cygwin DLL 1.1.8 release, patch 25-2, and
Perl 5.6.1-1 from - csociety-ftp.ecn.purdue.edu/pub/cygwin
I moved the ns-tree, putting ns-root under my Cygwin dir.
Following the instructions, when trying to apply the following patch
(written into file.patch):
+++ test-all-template1.win Fri Jul 2 14:33:25 1999
@@ -116,14 +116,16 @@
cp $datafile.bk $datafile
mv $datafile.Z $directory/$t.Z
- uncompress -c $directory/$t.Z | cmp -s - $datafile
+# uncompress -c $directory/$t.Z | cmp -s - $datafile
+ gzip -dc $directory/$t.Z | perl -ne 'print $_;' | cmp -s -
if [ $? = 0 ]; then
echo Test output agrees with reference output
echo Test output differs from reference output
cp $datafile $directory/$t.test
- uncompress -c $directory/$t.Z > $directory/$t
+# uncompress -c $directory/$t.Z > $directory/$t
+ gzip -dc $directory/$t.Z > $directory/$t
echo "Diagnose with: diff $directory/$t.test
echo "Differences due to floating-point formatting are
from ~ns/tcl/test/ directory doing:
patch test-all-template.win file.patch
I get the following message:
Missing header for unified diff at line 2 of patch
Patching file ‘test-all-template.win’ patch unexpectedly ends in middle
Hunk #1 failed at 116.
1 out of 1 hunk Failed.
Please let me know how shall I proceed and if the above steps are
Lots of thanks!