diff options
author | Jim Cromie <jcromie@cpan.org> | 2008-03-11 12:16:14 -0600 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2008-03-15 17:30:19 +0000 |
commit | b6b9a09997c80269af874aff41936e014ed728f7 (patch) | |
tree | 461c4ca1dd9e80df65f170edfb6797c4eafe2a22 /reentr.pl | |
parent | b2866d4731cba846ea38e592b806a44f665742ca (diff) | |
download | perl-b6b9a09997c80269af874aff41936e014ed728f7.tar.gz |
Re: [patch] refine make regen to be more selective
Message-ID: <47D720CE.7060004@gmail.com>
Date: Tue, 11 Mar 2008 18:16:14 -0600
p4raw-id: //depot/perl@33537
Diffstat (limited to 'reentr.pl')
-rw-r--r-- | reentr.pl | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -13,7 +13,7 @@ BEGIN { use strict; use Getopt::Std; my %opts; -getopts('U', \%opts); +getopts('Uv', \%opts); my %map = ( V => "void", @@ -40,8 +40,8 @@ my %map = ( # Example #3: S_CBI means type func_r(const char*, char*, int) -safer_unlink 'reentr.h'; -die "reentr.h: $!" unless open(H, ">reentr.h"); +# safer_unlink 'reentr.h'; +die "reentr.pl: $!" unless open(H, ">reentr.h-new"); binmode H; select H; print <<EOF; @@ -789,11 +789,12 @@ typedef struct { EOF close(H); +safer_rename('reentr.h-new', 'reentr.h'); # Prepare to write the reentr.c. -safer_unlink 'reentr.c'; -die "reentr.c: $!" unless open(C, ">reentr.c"); +# safer_unlink 'reentr.c'; +die "reentr.c: $!" unless open(C, ">reentr.c-new"); binmode C; select C; print <<EOF; @@ -1090,6 +1091,9 @@ Perl_reentrant_retry(const char *f, ...) /* ex: set ro: */ EOF +close(C); +safer_rename('reentr.c-new', 'reentr.c'); + __DATA__ asctime S |time |const struct tm|B_SB|B_SBI|I_SB|I_SBI crypt CC |crypt |struct crypt_data|B_CCS|B_CCD|D=CRYPTD* |