diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 17:47:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 17:47:29 +0000 |
commit | 4f5791ebd03eaec1c7da0865a383175b05102712 (patch) | |
tree | 8ce7b00f7a76baa386372422adebbe64510812d4 /third_party/heimdal/lib/hcrypto/libtommath/gen.pl | |
parent | Initial commit. (diff) | |
download | samba-upstream.tar.xz samba-upstream.zip |
Adding upstream version 2:4.17.12+dfsg.upstream/2%4.17.12+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/heimdal/lib/hcrypto/libtommath/gen.pl')
-rw-r--r-- | third_party/heimdal/lib/hcrypto/libtommath/gen.pl | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/third_party/heimdal/lib/hcrypto/libtommath/gen.pl b/third_party/heimdal/lib/hcrypto/libtommath/gen.pl new file mode 100644 index 0000000..332994d --- /dev/null +++ b/third_party/heimdal/lib/hcrypto/libtommath/gen.pl @@ -0,0 +1,20 @@ +#!/usr/bin/perl -w +# +# Generates a "single file" you can use to quickly +# add the whole source without any makefile troubles +# +use strict; +use warnings; + +open(my $out, '>', 'mpi.c') or die "Couldn't open mpi.c for writing: $!"; +foreach my $filename (glob 'bn*.c') { + open(my $src, '<', $filename) or die "Couldn't open $filename for reading: $!"; + print {$out} "/* Start: $filename */\n"; + print {$out} $_ while <$src>; + print {$out} "\n/* End: $filename */\n\n"; + close $src or die "Error closing $filename after reading: $!"; +} +print {$out} "\n/* EOF */\n"; +close $out or die "Error closing mpi.c after writing: $!"; + +system('perl -pli -e "s/\s*$//" mpi.c'); |