use strict;
use warnings;
use Config;

my $out = $ARGV[0];
my $in = $out . '.in';

my $t;
{
    local $/;
    open my $fh, '<', $in
        or die 'open: ', $in, ': ', $!;
    $t = <$fh>;
}

$t =~ s{\@SIZEOF_INT\@}{$Config{intsize}}sg;
$t =~ s{\@SIZEOF_LONG\@}{$Config{longsize}}sg;
$t =~ s{\@SIZEOF_LONG_LONG\@}{$Config{longlongsize}}sg;
$t =~ s{\@SIZEOF_SHORT\@}{$Config{shortsize}}sg;

open my $fh, '>', $out
    or die 'open: ', $out, ': ', $!;
print $fh $t;

exit 0;
