[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ns] problem with patch for ns windows



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
        else
-           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 -
$datafile 
            if [ $? = 0 ]; then
                echo Test output agrees with reference output
            else
                echo Test output differs from reference output
                success="false"
                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
$directory/$t"
                echo "Differences due to floating-point formatting are
not significant."

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
line 
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
correct?

Lots of thanks! 
-Adriana