Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(384)

Side by Side Diff: openssl/util/copy.pl

Issue 9254031: Upgrade chrome's OpenSSL to same version Android ships with. (Closed) Base URL: http://src.chromium.org/svn/trunk/deps/third_party/openssl/
Patch Set: '' Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « openssl/util/clean-depend.pl ('k') | openssl/util/cygwin.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/local/bin/perl 1 #!/usr/local/bin/perl
2 2
3 use Fcntl; 3 use Fcntl;
4 4
5 5
6 # copy.pl 6 # copy.pl
7 7
8 # Perl script 'copy' comment. On Windows the built in "copy" command also 8 # Perl script 'copy' comment. On Windows the built in "copy" command also
9 # copies timestamps: this messes up Makefile dependencies. 9 # copies timestamps: this messes up Makefile dependencies.
10 10
11 my $stripcr = 0;
12
13 my $arg; 11 my $arg;
14 12
15 foreach $arg (@ARGV) { 13 foreach $arg (@ARGV) {
16 if ($arg eq "-stripcr")
17 {
18 $stripcr = 1;
19 next;
20 }
21 $arg =~ s|\\|/|g; # compensate for bug/feature in cygwin glob... 14 $arg =~ s|\\|/|g; # compensate for bug/feature in cygwin glob...
22 foreach (glob $arg) 15 foreach (glob $arg)
23 { 16 {
24 push @filelist, $_; 17 push @filelist, $_;
25 } 18 }
26 } 19 }
27 20
28 $fnum = @filelist; 21 $fnum = @filelist;
29 22
30 if ($fnum <= 1) 23 if ($fnum <= 1)
(...skipping 18 matching lines...) Expand all
49 } 42 }
50 else 43 else
51 { 44 {
52 $dfile = $dest; 45 $dfile = $dest;
53 } 46 }
54 sysopen(IN, $_, O_RDONLY|O_BINARY) || die "Can't Open $_"; 47 sysopen(IN, $_, O_RDONLY|O_BINARY) || die "Can't Open $_";
55 sysopen(OUT, $dfile, O_WRONLY|O_CREAT|O_TRUNC|O_BINARY) 48 sysopen(OUT, $dfile, O_WRONLY|O_CREAT|O_TRUNC|O_BINARY)
56 || die "Can't Open $dfile"; 49 || die "Can't Open $dfile";
57 while (sysread IN, $buf, 10240) 50 while (sysread IN, $buf, 10240)
58 { 51 {
59 if ($stripcr)
60 {
61 $buf =~ tr/\015//d;
62 }
63 syswrite(OUT, $buf, length($buf)); 52 syswrite(OUT, $buf, length($buf));
64 } 53 }
65 close(IN); 54 close(IN);
66 close(OUT); 55 close(OUT);
67 print "Copying: $_ to $dfile\n"; 56 print "Copying: $_ to $dfile\n";
68 } 57 }
69 58
70 59
OLDNEW
« no previous file with comments | « openssl/util/clean-depend.pl ('k') | openssl/util/cygwin.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698