diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2001-05-24 18:26:20 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2001-05-24 18:26:20 +0000 |
commit | 483d4e680bd2a6db14835b1b4d65be33488d532b (patch) | |
tree | 129a4c95425cb37ed928ef53a27eb7dce5de3345 /gnu/usr.bin/perl/djgpp | |
parent | 8757fe6728b9db37919ad703b336ebbbc84413aa (diff) |
stock perl 5.6.1
Diffstat (limited to 'gnu/usr.bin/perl/djgpp')
-rw-r--r-- | gnu/usr.bin/perl/djgpp/config.over | 5 | ||||
-rw-r--r-- | gnu/usr.bin/perl/djgpp/djgpp.c | 20 |
2 files changed, 22 insertions, 3 deletions
diff --git a/gnu/usr.bin/perl/djgpp/config.over b/gnu/usr.bin/perl/djgpp/config.over index 5c252362c76..f9c167ec247 100644 --- a/gnu/usr.bin/perl/djgpp/config.over +++ b/gnu/usr.bin/perl/djgpp/config.over @@ -1,5 +1,5 @@ ln='cp' -pager='less' +pager='${DJDIR}/bin/less.exe' # fix extension names under DOS repair() @@ -34,7 +34,8 @@ repair() -e 's=file/=='\ -e 's=File/=='\ -e 's=glob=='\ - -e 's=Glob==' + -e 's=Glob=='\ + -e 's/storable/Storable/' } static_ext=$(repair "$static_ext") extensions=$(repair "$extensions") diff --git a/gnu/usr.bin/perl/djgpp/djgpp.c b/gnu/usr.bin/perl/djgpp/djgpp.c index c928851b766..4e390cfc59e 100644 --- a/gnu/usr.bin/perl/djgpp/djgpp.c +++ b/gnu/usr.bin/perl/djgpp/djgpp.c @@ -130,7 +130,6 @@ convretcode (pTHX_ int rc,char *prog,int fl) int do_aspawn (pTHX_ SV *really,SV **mark,SV **sp) { - dTHR; int rc; char **a,*tmps,**argv; STRLEN n_a; @@ -433,3 +432,22 @@ Perl_DJGPP_init (int *argcp,char ***argvp) strcpy (perlprefix,".."); } +int +djgpp_fflush (FILE *fp) +{ + int res; + + if ((res = fflush(fp)) == 0 && fp) { + Stat_t s; + if (Fstat(fileno(fp), &s) == 0 && !S_ISSOCK(s.st_mode)) + res = fsync(fileno(fp)); + } +/* + * If the flush succeeded but set end-of-file, we need to clear + * the error because our caller may check ferror(). BTW, this + * probably means we just flushed an empty file. + */ + if (res == 0 && fp && ferror(fp) == EOF) clearerr(fp); + + return res; +} |