diff options
| author | djm <> | 2012-10-13 21:23:57 +0000 |
|---|---|---|
| committer | djm <> | 2012-10-13 21:23:57 +0000 |
| commit | 0f4e59be0458751f14ec603610fb285ff9737a1c (patch) | |
| tree | 51d00d308f46148b4b341133936e44706703ad8b /src/lib/libcrypto/util | |
| parent | 050e39dc2dfd5d05183a7283530fcaf13f832ba2 (diff) | |
| download | openbsd-0f4e59be0458751f14ec603610fb285ff9737a1c.tar.gz openbsd-0f4e59be0458751f14ec603610fb285ff9737a1c.tar.bz2 openbsd-0f4e59be0458751f14ec603610fb285ff9737a1c.zip | |
import OpenSSL-1.0.1c
Diffstat (limited to 'src/lib/libcrypto/util')
| -rw-r--r-- | src/lib/libcrypto/util/copy.pl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/libcrypto/util/copy.pl b/src/lib/libcrypto/util/copy.pl index e20b45530a..eba6d5815e 100644 --- a/src/lib/libcrypto/util/copy.pl +++ b/src/lib/libcrypto/util/copy.pl | |||
| @@ -8,9 +8,16 @@ use Fcntl; | |||
| 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 | |||
| 11 | my $arg; | 13 | my $arg; |
| 12 | 14 | ||
| 13 | foreach $arg (@ARGV) { | 15 | foreach $arg (@ARGV) { |
| 16 | if ($arg eq "-stripcr") | ||
| 17 | { | ||
| 18 | $stripcr = 1; | ||
| 19 | next; | ||
| 20 | } | ||
| 14 | $arg =~ s|\\|/|g; # compensate for bug/feature in cygwin glob... | 21 | $arg =~ s|\\|/|g; # compensate for bug/feature in cygwin glob... |
| 15 | foreach (glob $arg) | 22 | foreach (glob $arg) |
| 16 | { | 23 | { |
| @@ -49,6 +56,10 @@ foreach (@filelist) | |||
| 49 | || die "Can't Open $dfile"; | 56 | || die "Can't Open $dfile"; |
| 50 | while (sysread IN, $buf, 10240) | 57 | while (sysread IN, $buf, 10240) |
| 51 | { | 58 | { |
| 59 | if ($stripcr) | ||
| 60 | { | ||
| 61 | $buf =~ tr/\015//d; | ||
| 62 | } | ||
| 52 | syswrite(OUT, $buf, length($buf)); | 63 | syswrite(OUT, $buf, length($buf)); |
| 53 | } | 64 | } |
| 54 | close(IN); | 65 | close(IN); |
