]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: work harder to avoid doing this ever again
authorRuss Cox <rsc@golang.org>
Fri, 24 Sep 2010 18:52:10 +0000 (14:52 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 24 Sep 2010 18:52:10 +0000 (14:52 -0400)
TBR=adg
CC=golang-dev
https://golang.org/cl/2218044

src/pkg/syscall/mksyscall.sh

index d785823b149dac5c9a25c8a2f4dd5a33fba75bf1..79d19d0d0c630dedad96a497e25748132f10ac6f 100755 (executable)
@@ -77,6 +77,11 @@ while(<>) {
        my @in = parseparamlist($in);
        my @out = parseparamlist($out);
 
+       # Try in vain to keep people from editing this file.
+       # The theory is that they jump into the middle of the file
+       # without reading the header.
+       $text .= "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n";
+
        # Go function header.
        my $out_decl = @out ? sprintf(" (%s)", join(', ', @out)) : "";
        $text .= sprintf "func %s(%s)%s {\n", $func, join(', ', @in), $out_decl;